]>
Commit | Line | Data |
---|---|---|
8f861f08 RP |
1 | \input texinfo @c -*-para-*- |
2 | @setfilename configure.info | |
3 | @settitle Cygnus Configure | |
4 | ||
5 | @node top, What Configure Does, (dir), (dir) | |
6 | ||
7 | This file documents the configuration system used and distributed by | |
8 | Cygnus Support. | |
9 | ||
10 | @menu | |
11 | * What Configure Does:: What Configure Does | |
12 | * Invoking:: Invoking | |
13 | * How It Does It:: How It Does It | |
14 | * Canonical Triples And Config.Subr:: Canonical Triples And Config.Subr | |
15 | * Native Ports:: Native Ports | |
16 | * Adding Hosts Or Targets:: Adding Hosts Or Targets | |
17 | * Adding Configure To Existing Programs:: Adding Configure To Existing Programs | |
18 | * Makefile Support:: Makefile Support | |
19 | * Known Bugs:: Known Bugs | |
20 | @end menu | |
21 | ||
22 | @node What Configure Does, Invoking, top, top | |
23 | @chapter Invoking | |
24 | ||
25 | The usual way to invoke @code{configure} is as follows: | |
26 | @example | |
27 | configure @var{host} | |
28 | @end example | |
29 | This asks @code{configure} to prepare the source to be compiled in a | |
30 | @var{host} environment with programs and files to be installed in | |
31 | @file{/usr/local}. | |
32 | ||
33 | NOTE: support for multiple hosts is at least temporarily suspended. | |
34 | ||
35 | If more than one host is specified on the command line, then | |
36 | configurations are created for each and @code{-subdirs} is assumed. | |
37 | ||
38 | @table @code | |
39 | ||
40 | @item -datadir=@var{dir} | |
41 | This option requests that the source be configured so that host | |
42 | independent files will be installed in @var{dir}. | |
43 | ||
44 | This option sets the @code{configure} variable @code{datadir}. If | |
45 | @code{datadir} is not empty, generated Makefiles will have their | |
46 | @code{datadir} variables set to this value. (See @xref{Install Details}.) | |
47 | ||
48 | @item -gas | |
49 | Notifies @code{configure} that the @sc{GNU} assembler is available on | |
50 | all specified hosts. | |
51 | ||
52 | @item -help | |
53 | Displays a quick summary of how to invoke @code{configure}. | |
54 | ||
55 | @item -host=@var{host} | |
56 | FIXME: I don't think this option should be documented. | |
57 | ||
58 | @item -namesubdir=@var{name} | |
59 | Asks that any subdirectories created by the @code{-subdirs} option be | |
60 | named @var{name}. Note that using multiple hosts with | |
61 | @code{-namesubdir=} isn't terribly useful. | |
62 | ||
63 | NOTE: support for this option is at least temporary suspended. | |
64 | ||
65 | @item -nfp | |
66 | Notifies @code{configure} that all of the specified hosts have @emph{no | |
67 | floating point} units. | |
68 | ||
69 | @item -norecursion | |
70 | Asks @code{configure} to configure only this directory. Any | |
71 | subdirectories are ignored. This is used by the executable shell script | |
72 | @file{config.status} to reconfigure the current directory. | |
73 | (@xref{FIXME:config.status}. | |
74 | ||
75 | @item -objdir=@var{dir} | |
76 | Asks @code{configure} to create the build tree in @var{dir}. The | |
77 | default is to use the source tree as the build tree. The source | |
78 | directory is assumed to be @file{.}. | |
79 | ||
80 | NOTE: support for this option is at least temporary suspended. | |
81 | ||
82 | @item -prefix=@var{dir} | |
83 | This option requests that the source be configured so that programs and | |
84 | files will be installed in @var{dir}. | |
85 | ||
86 | This option sets the @code{configure} variable @code{prefix}. If | |
87 | @code{prefix} is not empty, generated Makefiles will have their | |
88 | @code{prefix} variables set to this value. (See @xref{Install Details}.) | |
89 | ||
90 | @item -recurring | |
91 | This option is used internally by @code{configure} when recurring on | |
92 | subdirectories. It's sole purpose is to supress status output. It can | |
93 | be overriden with the @code{-verbose} option. | |
94 | ||
95 | @item -rm | |
96 | Asks @code{configure} to @emph{remove} a configuration rather than | |
97 | create one. | |
98 | ||
99 | @item -site=@var{site} | |
100 | Asks that Makefiles be generated using site specific Makefiles for | |
101 | @var{site}. (@xref{FIXME: site specific Makefiles}.) | |
102 | ||
103 | @item -srcdir=@var{_dir} | |
104 | Tells @code{configure} that the sources are located in @var{dir}. The | |
105 | build directory is assumed to be @file{.}. | |
106 | ||
107 | @item -subdirs | |
108 | Asks that configurations be placed in subdirectories named | |
109 | @file{H-@var{host}} of each build directory, for each host specified. | |
110 | If this configuration is not native, (@var{host} is not @var{target}), | |
111 | then he subdir will be named @file{X-@var{host}-@var{target}} instead. | |
112 | ||
113 | NOTE: support for this option is at least temporary suspended. | |
114 | ||
115 | @item -target=@var{target} | |
116 | Requests that the sources be configured to target the @var{target} | |
117 | machine. If no targets are specified explicitly, the target is assumed | |
118 | to be the same as the host. If multiple targets are specified, | |
119 | configurations for each are created and @code{-subdirs} is assumed. | |
120 | ||
121 | NOTE: support for multiple targets is at least temporarily suspended. | |
122 | ||
123 | @item -tmpdir=@var{tmpdir} | |
124 | Sets the directory in which @code{configure} creates temporary files to | |
125 | @var{tmpdir}. | |
126 | ||
127 | @item -verbose | |
128 | @item -v | |
129 | Asks that @code{configure} print status lines for each directory | |
130 | configured. Normally, only the status lines for the current directory | |
131 | are printed. | |
132 | ||
133 | @item -x | |
134 | Tells @code{configure} that @sc{MIT} style @sc{X11} header files and | |
135 | libraries are available on this machine, even if they are not normally | |
136 | available. | |
137 | ||
138 | @end table | |
139 | ||
140 | @node Using Configure, Canonical Triples And Config.Subr, Invoking, top | |
141 | @chapter Using Configure | |
142 | ||
143 | Configure prepares source directories in anticipation of building. | |
144 | Source cannot be built until it has been configured. The choices | |
145 | and options available at configuration time generally have valid | |
146 | defaults, but the defaults do not cover all cases. The choices | |
147 | available include: | |
148 | ||
149 | @menu | |
150 | * Install Locations:: Where to install things once they are built | |
151 | * Build Directories:: Where to build object files | |
152 | * Host:: Host | |
153 | * Target:: Target | |
154 | * Local Conventions:: Local Conventions | |
155 | @end menu | |
156 | ||
157 | @node Install Locations, Build Directories, What Configure Does, What Configure Does | |
158 | @section Install Locations | |
159 | ||
160 | @cindex Where to install | |
161 | ||
162 | Using the default configuration, @code{make install} will create a | |
163 | single tree of files, some of which are programs. The location of this | |
164 | tree is determined by the value of the variable @code{$(prefix)}. The | |
165 | default value of @code{$(prefix)} is @file{/usr/local}. This is | |
166 | probably correct for native tools installed on only one host. | |
167 | ||
168 | @menu | |
169 | * prefix:: Changing the default install directory | |
170 | * datadir:: How to separate host independent files | |
171 | from host dependent files when | |
172 | installing for multiple hosts | |
173 | * Install Details:: Full descriptions of all installation | |
174 | subdirectories | |
175 | @end menu | |
176 | ||
177 | @node prefix, datadir, Install Locations, Install Locations | |
178 | @subsection Changing the default install directory | |
179 | ||
180 | @cindex Changing the default install directory | |
181 | @cindex The prefix directory | |
182 | ||
183 | In the default configuration, all files are installed in subdirectories | |
184 | of @file{/usr/local}. The actual location is determined by the value of | |
185 | the @code{configure} variable @code{$@{prefix@}} which determines the | |
186 | value of the Makefile variable @code{$(prefix)}. | |
187 | ||
188 | You can also set the value of the Makefile variable @code{$(prefix)} | |
189 | explicitly each time you invoke @code{make} if you are so inclined, but | |
190 | because many programs have this location compiled in, you must specify | |
191 | the @code{$(prefix)} value precisely on each invocation of @code{make} | |
192 | or you will end up with a broken installation. | |
193 | ||
194 | To make this easier, the value of the @code{configure} variable | |
195 | @code{$@{prefix@}} can be set on the command line to @code{configure} | |
196 | using the option @code{-prefix=}. (See @xref{prefix}). | |
197 | ||
198 | ||
199 | @node datadir, Install Details, prefix, Install Locations | |
200 | @subsection Installing for multiple hosts | |
201 | ||
202 | @cindex Configuring for multiple hosts | |
203 | @cindex Sharing host independent files | |
204 | @cindex The datadir directory | |
205 | @cindex Installing host independent files | |
206 | ||
207 | Host independent files are installed in subdirectories of | |
208 | @file{/usr/local/lib}. The actual location is determined by the value | |
209 | of the @code{configure} variable @code{$@{datadir@}} which determines | |
210 | the value of the Makefile variable @code{$(datadir)}. By default, the | |
211 | value of @code{$@{datadir@}} is @code{$@{prefix@}/lib}. This makes | |
212 | single host installs simple, and simplifies changing the default | |
213 | location for the install tree, but doesn't allow for multiple hosts to | |
214 | effectively share host independent files. | |
215 | ||
216 | To configure so that multiple hosts can share common files, use | |
217 | something like: | |
218 | ||
219 | @example | |
220 | configure @var{host1} -prefix=/usr/gnu/H-@var{host1} -datadir=/usr/gnu/H-independent | |
221 | make all info install install-info clean | |
222 | configure @var{host2} -prefix=/usr/gnu/H-@var{host2} -datadir=/usr/gnu/H-independent | |
223 | make all info install install-info | |
224 | @end example | |
225 | ||
226 | The first line configures the source for @var{host1} in such a way that | |
227 | host specific programs will be placed in subdirectories of | |
228 | @file{/usr/gnu/H-@var{host1}} and host independent files will be placed | |
229 | in @file{/usr/gnu/H-independent}. (See @xref{datadir}.) | |
230 | ||
231 | The second line builds and installs all programs for @var{host1}, | |
232 | including both host independent and host dependent files. | |
233 | ||
234 | The third line reconfigures the source for @var{host2} in such a way | |
235 | that host specific programs will be placed in subdirectories of | |
236 | @file{/usr/gnu/H-@var{host2}} and host independent files will again be | |
237 | placed in @file{/usr/gnu/H-independent}. | |
238 | ||
239 | The fourth line builds and installs all programs for @var{host2}. Host | |
240 | dependent files will be installed in new directories but the host | |
241 | independent files will be installed @emph{on top of} the host | |
242 | independent files installed for @var{host1}. This results in a single | |
243 | copy of the host independent files suitable for use by both hosts. | |
244 | ||
245 | ||
246 | @node Install Details, , datadir, Install Locations | |
247 | @subsection Full descriptions of all installation subdirectories | |
248 | ||
249 | In any install, a number of standard directories are created. Their | |
250 | actual names are determined by Makefile variables. Some of the | |
251 | defaults for Makefile variables can be changed at configure time using | |
252 | command line options to @code{configure}. For more information on the | |
253 | standard directories or the Makefile variables, please refer to | |
254 | @cite{standards.text}. | |
255 | ||
256 | Note that @code{configure} does not create @code{srcdir} at any time. | |
257 | This is not an installation directory. (@xref{}.) | |
258 | ||
259 | All makefile variables can be overridden on the command line to | |
260 | @code{make}. (See @xref{Overriding, Overriding Variables, Overriding | |
261 | Variables, make, Make}.) If you do so, you will need to specify the | |
262 | value precisely the same way for each invocation of @code{make} or you | |
263 | risk ending up with a broken installation. This is because many | |
264 | programs have the locations of other programs or files compiled into | |
265 | them. If you find yourself overriding any of the variables frequently, | |
266 | you should consider site depedent Makefile fragments. (See @xref{}.) | |
267 | ||
268 | During @code{make install}, the following standard directories will be | |
269 | created and populated: | |
270 | ||
271 | @vindex prefix | |
272 | @defvr {Makefile and configure} prefix | |
273 | By default, the value of this variable determines the root of the | |
274 | installation tree. It may be overridden with the @code{-srcdir=} | |
275 | command line option to @code{configure}. (@xref{Invoking}.) The | |
276 | default value for @code{prefix} is @file{/usr/local}. | |
277 | @end defvr | |
278 | ||
279 | @vindex bindir | |
280 | @defvr Makefile bindir | |
281 | The value of this variable names a directory intended to contain binary | |
282 | programs that users can run. The default value for @code{bindir} | |
283 | depends on @code{prefix} so @code{bindir} is normally changed | |
284 | only indirectly through @code{prefix}. The default value for | |
285 | @code{$(bindir)} is @code{prefix}@file{/bin}. | |
286 | @end defvr | |
287 | ||
288 | @vindex datadir | |
289 | @defvr {Makefile and configure} datadir | |
290 | The value of this variable names a directory intended to contain host | |
291 | independent files. The @code{configure} variable, which is used to set | |
292 | the default value of the Makefile variable, can be set at configure time | |
293 | using the @code{-datadir=} option to @code{configure}. | |
294 | (@xref{Invoking}.) The default value for @code{datadir} is | |
295 | @code{prefix}@file{/lib}. | |
296 | @end defvr | |
297 | ||
298 | @vindex libdir | |
299 | @defvr Makefile libdir | |
300 | The value of this variable names a directory intended to hold libraries | |
301 | and support programs. The default value for @code{libdir} | |
302 | depends on @code{prefix} so @code{libdir} is normally changed | |
303 | only indirectly through @code{prefix}. The default value for | |
304 | @code{libdir} is @code{prefix}@file{/lib}. | |
305 | @end defvr | |
306 | ||
307 | @vindex mandir | |
308 | @defvr Makefile mandir | |
309 | The value of this variable names a directory intended to hold @emph{man} | |
310 | format man pages. The default value for @code{mandir} | |
311 | depends on @code{prefix} so @code{mandir} is normally changed | |
312 | only indirectly through @code{prefix}. The default value for | |
313 | @code{mandir} is @code{datadir}@file{/man}. | |
314 | @end defvr | |
315 | ||
316 | @vindex man@var{N}dir | |
317 | @defvr Makefile man@var{N}dir | |
318 | There are eight of these variables named @code{man1dir}, @code{man2dir}, | |
319 | etc. They are intended to name the specific directories which hold the | |
320 | man pages of their respective sections. That is, @code{man1dir} holds | |
321 | @file{emacs.1}, the man page for the emacs program while @code{man5dir} | |
322 | holds the man page describing the @code{rcs} data file format, called | |
323 | @file{rcsfile.5}. The default value for @code{man@var{N}dir} | |
324 | depends on @code{prefix} so @code{man@var{N}dir} is normally changed | |
325 | only indirectly through @code{prefix}. The default value for | |
326 | @code{man@var{N}dir} is @code{mandir}@file{/man@var{N}}. | |
327 | @end defvr | |
328 | ||
329 | @vindex manext | |
330 | @defvr Makefile manext | |
331 | The makefile variable manext is not supported by the @code{configure}. | |
332 | The @sc{gnu} coding standards do not call for @code{man1ext}, | |
333 | @code{man2ext}, so the intended use for @code{manext} is not clear. | |
334 | (See also @xref{FIXME:extensions}.) | |
335 | @end defvr | |
336 | ||
337 | @vindex infodir | |
338 | @defvr Makefile infodir | |
339 | The value of this variable names a directory intended to hold | |
340 | @emph{info} format documentation. The default value for @code{infodir} | |
341 | depends on @code{prefix} so @code{infodir} is normally changed | |
342 | only indirectly through @code{prefix}. The default value for | |
343 | @code{infodir} is @code{datadir}@file{/info}. | |
344 | @end defvr | |
345 | ||
346 | @vindex docdir | |
347 | @defvr Makefile docdir | |
348 | The value of this variable names a directory intended to hold any | |
349 | documentation that is in a format other than @emph{info} or @emph{man}. | |
350 | The default value for @code{docdir} depends on @code{prefix} so | |
351 | @code{docdir} is normally changed only indirectly through @code{prefix}. | |
352 | The default value for @code{docdir} is @code{datadir}@file{/doc}. Note | |
353 | that this variable is an extension to the @sc{gnu} coding standards. | |
354 | (See also @xref{FIXME:extensions}.) | |
355 | @end defvr | |
356 | ||
357 | @vindex includedir | |
358 | @defvr Makefile includedir | |
359 | The value of this variable names a directory intended to hold the | |
360 | headers files that accompany the libraries installed in @code{libdir}. | |
361 | The default value for @code{includedir} depends on @code{prefix} so | |
362 | @code{includedir} is normally changed only indirectly through @code{prefix}. The default value for | |
363 | @code{includedir} is @code{prefix}@file{/include}. | |
364 | @end defvr | |
365 | ||
366 | ||
367 | @node Build Directories, Host, Install Locations, What Configure Does | |
368 | @section Build Directories | |
369 | ||
370 | ||
371 | @node Host, Target, Build Directories, What Configure Does | |
372 | @section Host | |
373 | ||
374 | ||
375 | @node Target, Local Conventions, Host, What Configure Does | |
376 | @section Target | |
377 | ||
378 | ||
379 | @node Local Conventions, , Target, What Configure Does | |
380 | @section Local Conventions | |
381 | ||
382 | ||
383 | ||
384 | @node How It Does It, How It Does It, What Configure Does, top | |
385 | @chapter How It Does It | |
386 | ||
387 | When configure runs, it does the following things. | |
388 | ||
389 | @itemize @bullet | |
390 | ||
391 | @item Create Directories | |
392 | When configure is run with either of the | |
393 | ||
394 | @itemize @minus | |
395 | @item Parallels Source Tree (If -Srcdir) | |
396 | @item Adds Subdirs (If -Subdir) | |
397 | @end itemize | |
398 | ||
399 | @item Generates Makefiles | |
400 | @item Generates .Gdbinit | |
401 | @item Makes Symlinks | |
402 | @item Misc (Usually File Editting) | |
403 | @item generates config.status | |
404 | @end itemize | |
405 | ||
406 | @node Canonical Triples And Config.Subr, Native Ports, How It Does It, top | |
407 | @chapter Canonical Triples And Config.Subr | |
408 | ||
409 | ||
410 | @menu | |
411 | * Config.Subr Calling Convention:: Config.Subr Calling Convention | |
412 | * Definition Of Canonical Triples:: Definition Of Canonical Triples | |
413 | * Maps Aliases To Canonical Triples:: Maps Aliases To Canonical Triples | |
414 | * Validates Canonical Triples:: Validates Canonical Triples | |
415 | @end menu | |
416 | ||
417 | @node Config.Subr Calling Convention, Definition Of Canonical Triples, Canonical Triples And Config.Subr, Canonical Triples And Config.Subr | |
418 | @section Config.Subr Calling Convention | |
419 | ||
420 | ||
421 | @node Definition Of Canonical Triples, Maps Aliases To Canonical Triples, Config.Subr Calling Convention, Canonical Triples And Config.Subr | |
422 | @section Definition Of Canonical Triples | |
423 | ||
424 | ||
425 | @node Maps Aliases To Canonical Triples, Validates Canonical Triples, Definition Of Canonical Triples, Canonical Triples And Config.Subr | |
426 | @section Maps Aliases To Canonical Triples | |
427 | ||
428 | ||
429 | @node Validates Canonical Triples, , Maps Aliases To Canonical Triples, Canonical Triples And Config.Subr | |
430 | @section Validates Canonical Triples | |
431 | ||
432 | ||
433 | ||
434 | @node Native Ports, Adding Hosts Or Targets, Canonical Triples And Config.Subr, top | |
435 | @chapter Native Ports | |
436 | ||
437 | ||
438 | ||
439 | @menu | |
440 | * Add A Host:: Add A Host | |
441 | * Port An Existing Target:: Port An Existing Target | |
442 | * Add A Target:: Add A Target | |
443 | * Build Host & Target:: Build Host & Target | |
444 | * Build New Target On Some Other Host:: Build New Target On Some Other Host | |
445 | @end menu | |
446 | ||
447 | @node Add A Host, Port An Existing Target, Native Ports, Native Ports | |
448 | @section Add A Host | |
449 | ||
450 | ||
451 | @node Port An Existing Target, Add A Target, Add A Host, Native Ports | |
452 | @section Port An Existing Target | |
453 | ||
454 | ||
455 | @node Add A Target, Build Host & Target, Port An Existing Target, Native Ports | |
456 | @section Add A Target | |
457 | ||
458 | ||
459 | @node Build Host & Target, Build New Target On Some Other Host, Add A Target, Native Ports | |
460 | @section Build Host & Target | |
461 | ||
462 | ||
463 | @node Build New Target On Some Other Host, , Build Host & Target, Native Ports | |
464 | @section Build New Target On Some Other Host | |
465 | ||
466 | ||
467 | ||
468 | @node Adding Hosts Or Targets, Adding Configure To Existing Programs, Native Ports, top | |
469 | @chapter Adding Hosts Or Targets | |
470 | ||
471 | ||
472 | ||
473 | @menu | |
474 | * Add Canonical Triple To Config.Subr (Cf Config.Subr):: Add Canonical Triple To Config.Subr (Cf Config.Subr) | |
475 | * (Optional) Add Alias (Cf Config.Subr):: | |
476 | * Monte Carlo - Configure ; Make:: Monte Carlo - Configure ; Make | |
477 | * Remedies:: Remedies | |
478 | @end menu | |
479 | ||
480 | @node Add Canonical Triple To Config.Subr (Cf Config.Subr), (Optional) Add Alias (Cf Config.Subr), Adding Hosts Or Targets, Adding Hosts Or Targets | |
481 | @section Add Canonical Triple To Config.Subr (Cf Config.Subr) | |
482 | ||
483 | ||
484 | @node (Optional) Add Alias (Cf Config.Subr), Monte Carlo - Configure ; Make, Add Canonical Triple To Config.Subr (Cf Config.Subr), Adding Hosts Or Targets | |
485 | @section (Optional) Add Alias (Cf Config.Subr) | |
486 | ||
487 | ||
488 | @node Monte Carlo - Configure ; Make, Remedies, (Optional) Add Alias (Cf Config.Subr), Adding Hosts Or Targets | |
489 | @section Monte Carlo - Configure ; Make | |
490 | ||
491 | ||
492 | @node Remedies, , Monte Carlo - Configure ; Make, Adding Hosts Or Targets | |
493 | @section Remedies | |
494 | ||
495 | ||
496 | @menu | |
497 | * Automagic Config:: Automagic Config | |
498 | * Symlinked Files:: Symlinked Files | |
499 | * Makefile Fragments (Cf Configure.In):: Makefile Fragments (Cf Configure.In) | |
500 | @end menu | |
501 | ||
502 | @node Automagic Config, Symlinked Files, Remedies, Remedies | |
503 | @subsection Automagic Config | |
504 | ||
505 | ||
506 | @node Symlinked Files, Makefile Fragments (Cf Configure.In), Automagic Config, Remedies | |
507 | @subsection Symlinked Files | |
508 | ||
509 | ||
510 | @node Makefile Fragments (Cf Configure.In), , Symlinked Files, Remedies | |
511 | @subsection Makefile Fragments (Cf Configure.In) | |
512 | ||
513 | @node Adding Configure To Existing Programs, Known Bugs, Adding Hosts Or Targets, top | |
514 | @chapter Adding Configure To Existing Programs | |
515 | ||
516 | ||
517 | If you are writing a new program, don't worry about porting issues or | |
518 | configure until it is running reasonably on some host. Then refer | |
519 | back to this section. | |
520 | ||
521 | @menu | |
522 | * Makefile Support:: Makefile Support | |
523 | * Automagic Configuration:: Automagic Configuration | |
524 | @end menu | |
525 | ||
526 | @node Makefile Support, Automagic Configuration, Adding Configure To Existing Programs, Adding Configure To Existing Programs | |
527 | @section Makefile Support | |
528 | ||
529 | ||
530 | @menu | |
531 | * Makefile Host Support - Move It To Host Fragments:: Makefile Host Support - Move It To Host Fragments | |
532 | * Add Standard Macros (Template Follows):: Add Standard Macros (Template Follows) | |
533 | @end menu | |
534 | ||
535 | @node Makefile Host Support - Move It To Host Fragments, Add Standard Macros (Template Follows), Makefile Support, Makefile Support | |
536 | @subsection Makefile Host Support - Move It To Host Fragments | |
537 | ||
538 | ||
539 | @node Add Standard Macros (Template Follows), , Makefile Host Support - Move It To Host Fragments, Makefile Support | |
540 | @subsection Add Standard Macros (Template Follows) | |
541 | ||
542 | @itemize @bullet | |
543 | @item as defined in standards.text | |
544 | @item also add | |
545 | ||
546 | @itemize @minus | |
547 | @item includedir | |
548 | This macro defines the directory in which to install any headers files that should be made available to users. | |
549 | @item docdir | |
550 | This macro defines where to install any documentation that is not either a man page or an info file. For man pages, see mandir, | |
551 | for info, see infodir. | |
552 | @end itemize | |
553 | ||
554 | @item template | |
555 | ||
556 | @example | |
557 | ||
558 | # Makefile for GNU tar program. | |
559 | ||
560 | # | |
561 | # Makefile | |
562 | # Copyright (C) 1990, 1991 Cygnus Support | |
563 | # | |
564 | # This file is free software; you can redistribute it and/or modify | |
565 | # it under the terms of the GNU General Public License as published by | |
566 | # the Free Software Foundation; either version 2 of the License, or | |
567 | # (at your option) any later version. | |
568 | # | |
569 | # This program is distributed in the hope that it will be useful, | |
570 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
571 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
572 | # GNU General Public License for more details. | |
573 | # | |
574 | # You should have received a copy of the GNU General Public License | |
575 | # along with this program; if not, write to the Free Software | |
576 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
577 | # | |
578 | ||
579 | srcdir = . | |
580 | ||
581 | prefix = /usr/local | |
582 | ||
583 | bindir = $(prefix)/bin | |
584 | datadir = $(prefix)/lib | |
585 | libdir = $(prefix)/lib | |
586 | mandir = $(datadir)/man | |
587 | man1dir = $(mandir)/man1 | |
588 | man2dir = $(mandir)/man2 | |
589 | man3dir = $(mandir)/man3 | |
590 | man4dir = $(mandir)/man4 | |
591 | man5dir = $(mandir)/man5 | |
592 | man6dir = $(mandir)/man6 | |
593 | man7dir = $(mandir)/man7 | |
594 | man8dir = $(mandir)/man8 | |
595 | man9dir = $(mandir)/man9 | |
596 | infodir = $(datadir)/info | |
597 | includedir = $(prefix)/include | |
598 | docdir = $(datadir)/doc | |
599 | ||
600 | SHELL = /bin/sh | |
601 | ||
602 | INSTALL = install -c | |
603 | INSTALL_PROGRAM = $(INSTALL) | |
604 | INSTALL_DATA = $(INSTALL) | |
605 | ||
606 | AR = ar | |
607 | AR_FLAGS = qv | |
608 | BISON = bison | |
609 | MAKEINFO = makeinfo | |
610 | RANLIB = ranlib | |
611 | ||
612 | # In order to disable remote-tape support, add -DNO_REMOTE to the | |
613 | # appropriate DEFS line, and remove rtape_lib.* from LOCAL_@{SRC,OBJ@} | |
614 | # For Ultrix 3.1, you will have to compile rtape_lib.c with -DUSG. | |
615 | # Add -DUSE_REXEC to use rexec for remote tape operations | |
616 | # instead of forking rsh or remsh. | |
617 | # | |
618 | # If tar fails to properly print error msgs, or core-dumps doing same, | |
619 | # you may need to change which version of msg...() you are using. | |
620 | # To do so, add one of the following to your DEFS= line | |
621 | # -DSTDC_MSG If you are using an ANSI compiler, and have vfprintf(). | |
622 | # -DVARARGS_MSG If you have varargs.h and vfprintf() | |
623 | # -DDOPRNT_MSG If you have _doprnt(), and no useful varargs support | |
624 | # -DLOSING_MSG If nothing else works. | |
625 | # | |
626 | # Some non-BSD systems may have to add -DNEED_TZSET in order to have getdate.y | |
627 | # compile correctly. | |
628 | # | |
629 | # If you have a system V system which defines size_t, add -DHAVE_SIZE_T. | |
630 | # If you have a system which defines strstr, add -DHAVE_STRSTR. | |
631 | # | |
632 | # If you can't use remote tar with the rmt library, you can still get | |
633 | # some stuff to work right by adding -DUSE_REXEC. | |
634 | # | |
635 | # Some people's systems define a prototype for signal handlers which | |
636 | # require them to be declared as void. If you get such problems in | |
637 | # rtape_lib, function command, then define -DSIGNAL_VOID. | |
638 | # | |
639 | # getdate.y has 8 shift/reduce conflicts. | |
640 | # | |
641 | # In addition to setting DEFS appropriately for your system, you might | |
642 | # have to hand edit the #defines and #undefs in port.c. | |
643 | # | |
644 | ||
645 | ## GNU version | |
646 | DEFS = -DBSD42 | |
647 | LOCAL_SRC = | |
648 | LOCAL_OBJ = | |
649 | LDFLAGS = | |
650 | LIBS = -lutils | |
651 | LINT = lint | |
652 | LINTFLAGS = -abchx | |
653 | DEF_AR_FILE = \"-\" | |
654 | DEFBLOCKING = 20 | |
655 | O = o | |
656 | @end example | |
657 | ||
658 | #### Host, target, and site specific Makefile fragments come in here. | |
659 | ### | |
660 | ||
661 | @itemize @bullet | |
662 | @item Identify Nonstandard Macros | |
663 | @itemize @minus | |
664 | @item Put Defaults Before The Fragment Hook (Cf) | |
665 | @item Move Non-Defaults To Makefile Fragments (Cf) | |
666 | @item Map To Those Fragments In Configure.In (Cf) | |
667 | @end itemize | |
668 | ||
669 | @item Fragment Hook | |
670 | ||
671 | @itemize @minus | |
672 | @item Should Follow Standard And Non-Standard Macros | |
673 | @item Should Preceed All Targets | |
674 | @item Looks Like | |
675 | #### Host, target, and site specific Makefile fragments come in here. | |
676 | ### | |
677 | ||
678 | The line beginning with four hashes is the important part. The comment and the line beginning with three hashes are only | |
679 | a conventional convenience. | |
680 | @end itemize | |
681 | ||
682 | @item Makefile Fragments | |
683 | @item Host | |
684 | @item Target | |
685 | @item Site | |
686 | @item Mv Makefile Makefile.In | |
687 | @item Standard Targets | |
688 | @item All (Should Be The Default) | |
689 | @item Install | |
690 | @item Clean | |
691 | @item Info | |
692 | @item Install-Info | |
693 | @item Clean-Info | |
694 | @item The Config Subdirectory | |
695 | @item Configure.In | |
696 | @item Declarations | |
697 | @item Srctrigger | |
698 | @item Srcname | |
699 | @item Configdirs | |
700 | @item Target_Dependent | |
701 | @item Per-Host | |
702 | @item Per-Target | |
703 | @item Post-Target | |
704 | @item Available Variables | |
705 | ||
706 | @defvar{host} | |
707 | Contains the actual name that the user entered for the host. Since many | |
708 | things that the user could enter would map to the same canonical triple, | |
709 | this variable is innappropriate to use for picking available | |
710 | configurations. For that, use @code{host_cpu}, @code{host_vendor}, | |
711 | and/or @code{host_os}. This variable is useful, however, for error | |
712 | messages. | |
713 | @end defvar | |
714 | ||
715 | @defvar{host_cpu} | |
716 | Contains the first element of the canonical triple representing the host | |
717 | as returned by @file{config.subr}. This is occasionally used to | |
718 | distinguish between minor variations of a particular vendor's operating | |
719 | system and sometimes to determine variations in binary format between | |
720 | the host and the target. | |
721 | @end defvar | |
722 | ||
723 | @defvar{host_vendor} | |
724 | Contains the second element of the canonical triple representing the | |
725 | host as returned by @file{config.subr}. This is usually used to | |
726 | distinguish betwen the numerous variations between @emph{common} | |
727 | operating systems. | |
728 | @end defvar | |
729 | ||
730 | @defvar{host_os} | |
731 | Contains the the third element of the canonical triple representing the | |
732 | host as returned by @file{config.subr}. | |
733 | @end defvar | |
734 | ||
735 | @defvar{target} | |
736 | Contains the actual name that the user entered for the target. Since many | |
737 | things that the user could enter would map to the same canonical triple, | |
738 | this variable is innappropriate to use for picking available | |
739 | configurations. For that, use @code{target_cpu}, @code{target_vendor}, | |
740 | and/or @code{target_os}. This variable is useful, however, for error | |
741 | messages. | |
742 | @end defvar | |
743 | ||
744 | @defvar{target_cpu} | |
745 | Contains the first element of the canonical triple representing the | |
746 | target as returned by @file{config.subr}. This is used heavily by | |
747 | programs involved in building programs, like the compiler, assembler, | |
748 | linker, etc. Most programs will not need the @code{target} variables at | |
749 | all, but this one could conceivably be used to build a program, for | |
750 | instance, that operated on binary data files whose byte order or | |
751 | alignment are other than that of the system on which the program is | |
752 | running. | |
753 | @end defvar | |
754 | ||
755 | @defvar{target_vendor} | |
756 | Contains the second element of the canonical triple representing the | |
757 | target as returned by @file{config.subr}. This is usually used to | |
758 | distinguish betwen the numerous variations between @emph{common} | |
759 | operating systems or object file formats. Sometimes it is used to | |
760 | switch between different flavors of users interfaces. | |
761 | @end defvar | |
762 | ||
763 | @defvar{target_os} | |
764 | Contains the the third element of the canonical triple representing the | |
765 | target as returned by @file{config.subr}. This variable is used by | |
766 | development tools to distinguish between subtle variations in object | |
767 | file formats that some vendors use across operating system releases. It | |
768 | might also be use to decide which libraries to build or what user | |
769 | interface the tool should provide. | |
770 | @end defvar | |
771 | ||
772 | @defvar{nfp} | |
773 | Is set to @code{true} if the user invoked configure with the @code{-nfp} | |
774 | command line option, otherwise it is empty. This is a request to target | |
775 | a machine with @emph{no floating point} unit, even if the machine ordinarily | |
776 | has a floating point unit available. This option has no negation. | |
777 | @end defvar | |
778 | ||
779 | @defvar{gas} | |
780 | Is set to @code{true} if the user invoked configure with the @code{-gas} | |
781 | command line option, otherwise it is empty. This is a request to assume | |
782 | that the target machine has gas available even if it ordinarily does | |
783 | not. The converse option, @code{-no-gas} is not available. | |
784 | @end defvar | |
785 | ||
786 | @defvar{x} | |
787 | Is set to @code{true} if the user invoked configure with the @code{-x} | |
788 | command line option, otherwise it is empty. This is a request to assume | |
789 | that @sc{mit x11} compatible headers files and libraries are available, | |
790 | regardless of what is normally available on this host. | |
791 | @end defvar | |
792 | ||
793 | @defvar{srcdir} | |
794 | Is set to the name of the directory containing the source for this | |
795 | program. This will be different from @file{.} if the user has | |
796 | specified either the @code{-srcdir=} or the @code{-subdirs} options. | |
797 | Note that @code{srcdir} is not necessarily an absolute path. | |
798 | @end defvar | |
799 | ||
800 | @defvar{host_makefile_frag} | |
801 | Is set to a file name representing to the default Makefile fragment for | |
802 | this host. It may be set in @file{configure.in} to overide this | |
803 | default. | |
804 | @end defvar | |
805 | ||
806 | @defvar{target_makefile_frag} | |
807 | Is set to a file name representing to the default Makefile fragment for | |
808 | this target. It may be set in @file{configure.in} to overide this | |
809 | default. | |
810 | @end defvar | |
811 | ||
812 | @defvar{site_makefile_frag} | |
813 | Is set to a file name representing to the default Makefile fragment for | |
814 | this host. It may be set in @file{configure.in} to overide this | |
815 | default. Normally @code{site_makefile_frag} is empty, but will have a | |
816 | value if the user specified @code{-site=} on the command line. This | |
817 | variable should probably not be overridden. | |
818 | @end defvar | |
819 | ||
820 | @defvar{Makefile} | |
821 | Is set to the name of the generated @file{Makefile}. Normally this | |
822 | value is precisely @file{Makefile} but some programs may want something | |
823 | else. | |
824 | @end defvar | |
825 | ||
826 | @defvar{removing} | |
827 | Is normally empty but will be set to some non-empty value if the user | |
828 | specified @code{-rm} on the command line. That is, if @code{removing} | |
829 | is non-empty, then configure is @emph{removing} a configuration rather | |
830 | than creating one. | |
831 | @end defvar | |
832 | ||
833 | @defvar{files} | |
834 | If this variable is non-empty following the @code{per-target:} section, | |
835 | then each word in it's value will be the target of a symbolic link | |
836 | named in the @code{links} variable. | |
837 | @end defvar | |
838 | ||
839 | @defvar{links} | |
840 | If the @code{files} variable is non-empty following the | |
841 | @code{per-target:} section, then symbolic links will be created with the | |
842 | first word of links pointing to the first word of files, the second word of | |
843 | links pointing to the second word of files, and so on. | |
844 | @end defvar | |
845 | ||
846 | @end itemize | |
847 | @end itemize | |
848 | ||
849 | @node Automagic Configuration, , Makefile Support, Adding Configure To Existing Programs | |
850 | @section Automagic Configuration | |
851 | ||
852 | ||
853 | @menu | |
854 | * Should Be Used If Prep'D Files Don'T Exist:: Should Be Used If Prep'D Files Don'T Exist | |
855 | @end menu | |
856 | ||
857 | @node Should Be Used If Prep'D Files Don'T Exist, , Automagic Configuration, Automagic Configuration | |
858 | @subsection Should Be Used If Prep'D Files Don'T Exist | |
859 | ||
860 | ||
861 | ||
862 | @node Known Bugs, Variables Index, Adding Configure To Existing Programs, top | |
863 | @chapter Known Bugs | |
864 | ||
865 | The following bugs are known to exist. | |
866 | ||
867 | @itemize @bullet | |
868 | ||
869 | @item | |
870 | There is no way to query about known hosts, known targets, or the | |
871 | porting or testing status of any configuration. | |
872 | ||
873 | @item | |
874 | The negations to the options @code{-gas}, @code{-x}, and @code{-nfp} are | |
875 | not available. | |
876 | ||
877 | @end itemize | |
878 | ||
879 | @node Variables Index, Concept Index, Known Bugs, top | |
880 | @unnumbered Variable Index | |
881 | ||
882 | @printindex vr | |
883 | ||
884 | @node Concept Index, , Variables Index, top | |
885 | @unnumbered Concept Index | |
886 | ||
887 | @printindex cp | |
888 | ||
889 | @summarycontents | |
890 | @contents | |
891 | @bye | |
892 | ||
893 | @c Local Variables: | |
894 | @c fill-column: 79 | |
895 | @c outline-regexp: "@chap" | |
896 | @c End: | |
897 | @c (setq outline-regexp "@chapt\\\|@unnum\\\|@setf\\\|@conte\\\|@sectio\\\|@subsect\\\|@itemize\\\|@defvar{") |