aclocal: When checking for `environ', don't find `__environ'.
[cfd] / lgpl.tex
1 % \iffalse <meta-comment>
2 %
3 % $Id: lgpl.tex,v 1.2 2004/04/08 01:36:24 mdw Exp $
4 %
5 % The GNU Library General Public License as a LaTeX section
6 %
7 % (c) 1989, 1991 Free Software Foundation, Inc.
8 % LaTeX markup and minor formatting changes by Mark Wooding
9 %
10
11 % --- Chapter heading ---
12 %
13 % We don't know whether this ought to be a section or a chapter. Easy.
14 % We'll see if chapters are possible.
15 %
16 % \fi
17
18 \begingroup
19 \makeatletter
20
21 \edef\next#1#2#3{\relax
22 \ifx\chapter\@@undefined
23 \ifx\documentclass\@notprerr#2\else#3\fi
24 \else#1\fi
25 }
26
27 \expandafter\endgroup\next
28 {
29 \let\gpltoplevel\chapter
30 \let\gplsec\section
31 \let\gplend\endinput
32 }{
33 \let\gpltoplevel\section
34 \let\gplsec\subsection
35 \let\gplend\endinput
36 }{
37 \documentclass[a4paper]{article}
38 \def\gpltoplevel#1{%
39 \vspace*{1in}%
40 \hbox to\hsize{\hfil\LARGE\bfseries#1\hfil}%
41 \vspace{1in}%
42 }
43 \let\gplsec\section
44 \def\gplend{\end{document}}
45 \advance\textwidth1in
46 \advance\oddsidemargin-.5in
47 \sloppy
48 \begin{document}
49 }
50
51 %^^A-------------------------------------------------------------------------
52 \gpltoplevel{The GNU Library General Public License}
53
54 The following is the text of the GNU Library General Public License, under
55 the terms of which this software is distrubuted.
56
57 \vspace{12pt}
58
59 \begin{center}
60 \textbf{GNU LIBRARY GENERAL PUBLIC LICENSE} \\
61 Version 2, June 1991
62 \end{center}
63
64 \begin{center}
65 Copyright \copyright\ 1989, 1991 Free Software Foundation, Inc. \\
66 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
67
68 Everyone is permitted to copy and distribute verbatim copies \\
69 of this license document, but changing it is not allowed.
70 \end{center}
71
72
73 \gplsec{Preamble}
74
75 The licenses for most software are designed to take away your freedom to
76 share and change it. By contrast, the GNU General Public Licenses are
77 intended to guarantee your freedom to share and change free software--to make
78 sure the software is free for all its users.
79
80 This license, the Library General Public License, applies to some specially
81 designated Free Software Foundation software, and to any other libraries
82 whose authors decide to use it. You can use it for your libraries, too.
83
84 When we speak of free software, we are referring to freedom, not price. Our
85 General Public Licenses are designed to make sure that you have the freedom
86 to distribute copies of free software (and charge for this service if you
87 wish), that you receive source code or can get it if you want it, that you
88 can change the software or use pieces of it in new free programs; and that
89 you know you can do these things.
90
91 To protect your rights, we need to make restrictions that forbid anyone to
92 deny you these rights or to ask you to surrender the rights. These
93 restrictions translate to certain responsibilities for you if you distribute
94 copies of the library, or if you modify it.
95
96 For example, if you distribute copies of the library, whether gratis or for a
97 fee, you must give the recipients all the rights that we gave you. You must
98 make sure that they, too, receive or can get the source code. If you link a
99 program with the library, you must provide complete object files to the
100 recipients so that they can relink them with the library, after making
101 changes to the library and recompiling it. And you must show them these
102 terms so they know their rights.
103
104 Our method of protecting your rights has two steps: (1) copyright the
105 library, and (2) offer you this license which gives you legal permission to
106 copy, distribute and/or modify the library.
107
108 Also, for each distributor's protection, we want to make certain that
109 everyone understands that there is no warranty for this free library. If the
110 library is modified by someone else and passed on, we want its recipients to
111 know that what they have is not the original version, so that any problems
112 introduced by others will not reflect on the original authors' reputations.
113
114 Finally, any free program is threatened constantly by software patents. We
115 wish to avoid the danger that companies distributing free software will
116 individually obtain patent licenses, thus in effect transforming the program
117 into proprietary software. To prevent this, we have made it clear that any
118 patent must be licensed for everyone's free use or not licensed at all.
119
120 Most GNU software, including some libraries, is covered by the ordinary GNU
121 General Public License, which was designed for utility programs. This
122 license, the GNU Library General Public License, applies to certain
123 designated libraries. This license is quite different from the ordinary one;
124 be sure to read it in full, and don't assume that anything in it is the same
125 as in the ordinary license.
126
127 The reason we have a separate public license for some libraries is that they
128 blur the distinction we usually make between modifying or adding to a program
129 and simply using it. Linking a program with a library, without changing the
130 library, is in some sense simply using the library, and is analogous to
131 running a utility program or application program. However, in a textual and
132 legal sense, the linked executable is a combined work, a derivative of the
133 original library, and the ordinary General Public License treats it as such.
134
135 Because of this blurred distinction, using the ordinary General Public
136 License for libraries did not effectively promote software sharing, because
137 most developers did not use the libraries. We concluded that weaker
138 conditions might promote sharing better.
139
140 However, unrestricted linking of non-free programs would deprive the users of
141 those programs of all benefit from the free status of the libraries
142 themselves. This Library General Public License is intended to permit
143 developers of non-free programs to use free libraries, while preserving your
144 freedom as a user of such programs to change the free libraries that are
145 incorporated in them. (We have not seen how to achieve this as regards
146 changes in header files, but we have achieved it as regards changes in the
147 actual functions of the Library.) The hope is that this will lead to faster
148 development of free libraries.
149
150 The precise terms and conditions for copying, distribution and modification
151 follow. Pay close attention to the difference between a ``work based on the
152 library'' and a ``work that uses the library''. The former contains code
153 derived from the library, while the latter only works together with the
154 library.
155
156 Note that it is possible for a library to be covered by the ordinary General
157 Public License rather than by this special one.
158
159
160 \gplsec{Terms and conditions for copying, distribution and modification}
161
162 \begin{enumerate}
163
164 \makeatletter \setcounter{\@listctr}{-1} \makeatother
165
166 \item [0.] This License Agreement applies to any software library which
167 contains a notice placed by the copyright holder or other authorized
168 party saying it may be distributed under the terms of this Library
169 General Public License (also called ``this License''). Each licensee
170 is addressed as ``you''.
171
172 A ``library'' means a collection of software functions and/or data
173 prepared so as to be conveniently linked with application programs
174 (which use some of those functions and data) to form executables.
175
176 The ``Library'', below, refers to any such software library or work
177 which has been distributed under these terms. A ``work based on the
178 Library'' means either the Library or any derivative work under
179 copyright law: that is to say, a work containing the Library or a
180 portion of it, either verbatim or with modifications and/or translated
181 straightforwardly into another language. (Hereinafter, translation is
182 included without limitation in the term ``modification''.)
183
184 ``Source code'' for a work means the preferred form of the work for
185 making modifications to it. For a library, complete source code means
186 all the source code for all modules it contains, plus any associated
187 interface definition files, plus the scripts used to control
188 compilation and installation of the library.
189
190 Activities other than copying, distribution and modification are not
191 covered by this License; they are outside its scope. The act of
192 running a program using the Library is not restricted, and output from
193 such a program is covered only if its contents constitute a work based
194 on the Library (independent of the use of the Library in a tool for
195 writing it). Whether that is true depends on what the Library does and
196 what the program that uses the Library does.
197
198 \item [1.] You may copy and distribute verbatim copies of the Library's
199 complete source code as you receive it, in any medium, provided that
200 you conspicuously and appropriately publish on each copy an appropriate
201 copyright notice and disclaimer of warranty; keep intact all the
202 notices that refer to this License and to the absence of any warranty;
203 and distribute a copy of this License along with the Library.
204
205 You may charge a fee for the physical act of transferring a copy, and
206 you may at your option offer warranty protection in exchange for a fee.
207
208 \item [2.] You may modify your copy or copies of the Library or any portion
209 of it, thus forming a work based on the Library, and copy and
210 distribute such modifications or work under the terms of Section 1
211 above, provided that you also meet all of these conditions:
212
213 \begin{enumerate}
214
215 \item [(a)] The modified work must itself be a software library.
216
217 \item [(b)] You must cause the files modified to carry prominent
218 notices stating that you changed the files and the date of any
219 change.
220
221 \item [(c)] You must cause the whole of the work to be licensed at no
222 charge to all third parties under the terms of this License.
223
224 \item [(d)] If a facility in the modified Library refers to a function
225 or a table of data to be supplied by an application program that
226 uses the facility, other than as an argument passed when the
227 facility is invoked, then you must make a good faith effort to
228 ensure that, in the event an application does not supply such
229 function or table, the facility still operates, and performs
230 whatever part of its purpose remains meaningful.
231
232 (For example, a function in a library to compute square roots has
233 a purpose that is entirely well-defined independent of the
234 application. Therefore, Subsection 2d requires that any
235 application-supplied function or table used by this function must
236 be optional: if the application does not supply it, the square
237 root function must still compute square roots.)
238
239 \end{enumerate}
240
241 These requirements apply to the modified work as a whole. If
242 identifiable sections of that work are not derived from the Library,
243 and can be reasonably considered independent and separate works in
244 themselves, then this License, and its terms, do not apply to those
245 sections when you distribute them as separate works. But when you
246 distribute the same sections as part of a whole which is a work based
247 on the Library, the distribution of the whole must be on the terms of
248 this License, whose permissions for other licensees extend to the
249 entire whole, and thus to each and every part regardless of who wrote
250 it.
251
252 Thus, it is not the intent of this section to claim rights or contest
253 your rights to work written entirely by you; rather, the intent is to
254 exercise the right to control the distribution of derivative or
255 collective works based on the Library.
256
257 In addition, mere aggregation of another work not based on the Library
258 with the Library (or with a work based on the Library) on a volume of a
259 storage or distribution medium does not bring the other work under the
260 scope of this License.
261
262 \item [3.] You may opt to apply the terms of the ordinary GNU General Public
263 License instead of this License to a given copy of the Library. To do
264 this, you must alter all the notices that refer to this License, so
265 that they refer to the ordinary GNU General Public License, version 2,
266 instead of to this License. (If a newer version than version 2 of the
267 ordinary GNU General Public License has appeared, then you can specify
268 that version instead if you wish.) Do not make any other change in
269 these notices.
270
271 Once this change is made in a given copy, it is irreversible for that
272 copy, so the ordinary GNU General Public License applies to all
273 subsequent copies and derivative works made from that copy.
274
275 This option is useful when you wish to copy part of the code of the
276 Library into a program that is not a library.
277
278 \item [4.] You may copy and distribute the Library (or a portion or
279 derivative of it, under Section 2) in object code or executable form
280 under the terms of Sections 1 and 2 above provided that you accompany
281 it with the complete corresponding machine-readable source code, which
282 must be distributed under the terms of Sections 1 and 2 above on a
283 medium customarily used for software interchange.
284
285 If distribution of object code is made by offering access to copy from
286 a designated place, then offering equivalent access to copy the source
287 code from the same place satisfies the requirement to distribute the
288 source code, even though third parties are not compelled to copy the
289 source along with the object code.
290
291 \item [5.] A program that contains no derivative of any portion of the
292 Library, but is designed to work with the Library by being compiled or
293 linked with it, is called a ``work that uses the Library''. Such a
294 work, in isolation, is not a derivative work of the Library, and
295 therefore falls outside the scope of this License.
296
297 However, linking a ``work that uses the Library'' with the Library
298 creates an executable that is a derivative of the Library (because it
299 contains portions of the Library), rather than a ``work that uses the
300 library''. The executable is therefore covered by this License.
301 Section 6 states terms for distribution of such executables.
302
303 When a ``work that uses the Library'' uses material from a header file
304 that is part of the Library, the object code for the work may be a
305 derivative work of the Library even though the source code is not.
306 Whether this is true is especially significant if the work can be
307 linked without the Library, or if the work is itself a library. The
308 threshold for this to be true is not precisely defined by law.
309
310 If such an object file uses only numerical parameters, data structure
311 layouts and accessors, and small macros and small inline functions (ten
312 lines or less in length), then the use of the object file is
313 unrestricted, regardless of whether it is legally a derivative work.
314 (Executables containing this object code plus portions of the Library
315 will still fall under Section 6.)
316
317 Otherwise, if the work is a derivative of the Library, you may
318 distribute the object code for the work under the terms of Section 6.
319 Any executables containing that work also fall under Section 6, whether
320 or not they are linked directly with the Library itself.
321
322 \item [6.] As an exception to the Sections above, you may also compile or
323 link a ``work that uses the Library'' with the Library to produce a
324 work containing portions of the Library, and distribute that work under
325 terms of your choice, provided that the terms permit modification of
326 the work for the customer's own use and reverse engineering for
327 debugging such modifications.
328
329 You must give prominent notice with each copy of the work that the
330 Library is used in it and that the Library and its use are covered by
331 this License. You must supply a copy of this License. If the work
332 during execution displays copyright notices, you must include the
333 copyright notice for the Library among them, as well as a reference
334 directing the user to the copy of this License. Also, you must do one
335 of these things:
336
337 \begin{enumerate}
338
339 \item [(a)] Accompany the work with the complete corresponding
340 machine-readable source code for the Library including whatever
341 changes were used in the work (which must be distributed under
342 Sections 1 and 2 above); and, if the work is an executable linked
343 with the Library, with the complete machine-readable ``work that
344 uses the Library'', as object code and/or source code, so that
345 the user can modify the Library and then relink to produce a
346 modified executable containing the modified Library. (It is
347 understood that the user who changes the contents of definitions
348 files in the Library will not necessarily be able to recompile
349 the application to use the modified definitions.)
350
351 \item [(b)] Accompany the work with a written offer, valid for at
352 least three years, to give the same user the materials specified
353 in Subsection 6a, above, for a charge no more than the cost of
354 performing this distribution.
355
356 \item [(c)] If distribution of the work is made by offering access to
357 copy from a designated place, offer equivalent access to copy the
358 above specified materials from the same place.
359
360 \item [(d)] Verify that the user has already received a copy of these
361 materials or that you have already sent this user a copy.
362
363 \end{enumerate}
364
365 For an executable, the required form of the ``work that uses the
366 Library'' must include any data and utility programs needed for
367 reproducing the executable from it. However, as a special exception,
368 the source code distributed need not include anything that is normally
369 distributed (in either source or binary form) with the major
370 components (compiler, kernel, and so on) of the operating system on
371 which the executable runs, unless that component itself accompanies
372 the executable.
373
374 It may happen that this requirement contradicts the license
375 restrictions of other proprietary libraries that do not normally
376 accompany the operating system. Such a contradiction means you cannot
377 use both them and the Library together in an executable that you
378 distribute.
379
380 \item [7.] You may place library facilities that are a work based on the
381 Library side-by-side in a single library together with other library
382 facilities not covered by this License, and distribute such a combined
383 library, provided that the separate distribution of the work based on
384 the Library and of the other library facilities is otherwise
385 permitted, and provided that you do these two things:
386
387 \begin{enumerate}
388
389 \item [(a)] Accompany the combined library with a copy of the same work
390 based on the Library, uncombined with any other library
391 facilities. This must be distributed under the terms of the
392 Sections above.
393
394 \item [(b)] Give prominent notice with the combined library of the fact
395 that part of it is a work based on the Library, and explaining
396 where to find the accompanying uncombined form of the same work.
397
398 \end{enumerate}
399
400 \item [8.] You may not copy, modify, sublicense, link with, or distribute
401 the Library except as expressly provided under this License. Any
402 attempt otherwise to copy, modify, sublicense, link with, or distribute
403 the Library is void, and will automatically terminate your rights under
404 this License. However, parties who have received copies, or rights,
405 from you under this License will not have their licenses terminated so
406 long as such parties remain in full compliance.
407
408 \item [9.] You are not required to accept this License, since you have not
409 signed it. However, nothing else grants you permission to modify or
410 distribute the Library or its derivative works. These actions are
411 prohibited by law if you do not accept this License. Therefore, by
412 modifying or distributing the Library (or any work based on the
413 Library), you indicate your acceptance of this License to do so, and
414 all its terms and conditions for copying, distributing or modifying the
415 Library or works based on it.
416
417 \item [10.] Each time you redistribute the Library (or any work based on the
418 Library), the recipient automatically receives a license from the
419 original licensor to copy, distribute, link with or modify the Library
420 subject to these terms and conditions. You may not impose any further
421 restrictions on the recipients' exercise of the rights granted herein.
422 You are not responsible for enforcing compliance by third parties to
423 this License.
424
425 \item [11.] If, as a consequence of a court judgment or allegation of patent
426 infringement or for any other reason (not limited to patent issues),
427 conditions are imposed on you (whether by court order, agreement or
428 otherwise) that contradict the conditions of this License, they do not
429 excuse you from the conditions of this License. If you cannot
430 distribute so as to satisfy simultaneously your obligations under this
431 License and any other pertinent obligations, then as a consequence you
432 may not distribute the Library at all. For example, if a patent
433 license would not permit royalty-free redistribution of the Library by
434 all those who receive copies directly or indirectly through you, then
435 the only way you could satisfy both it and this License would be to
436 refrain entirely from distribution of the Library.
437
438 If any portion of this section is held invalid or unenforceable under
439 any particular circumstance, the balance of the section is intended to
440 apply, and the section as a whole is intended to apply in other
441 circumstances.
442
443 It is not the purpose of this section to induce you to infringe any
444 patents or other property right claims or to contest validity of any
445 such claims; this section has the sole purpose of protecting the
446 integrity of the free software distribution system which is implemented
447 by public license practices. Many people have made generous
448 contributions to the wide range of software distributed through that
449 system in reliance on consistent application of that system; it is up
450 to the author/donor to decide if he or she is willing to distribute
451 software through any other system and a licensee cannot impose that
452 choice.
453
454 This section is intended to make thoroughly clear what is believed to
455 be a consequence of the rest of this License.
456
457 \item [12.] If the distribution and/or use of the Library is restricted in
458 certain countries either by patents or by copyrighted interfaces, the
459 original copyright holder who places the Library under this License may
460 add an explicit geographical distribution limitation excluding those
461 countries, so that distribution is permitted only in or among countries
462 not thus excluded. In such case, this License incorporates the
463 limitation as if written in the body of this License.
464
465 \item [13.] The Free Software Foundation may publish revised and/or new
466 versions of the Library General Public License from time to time. Such
467 new versions will be similar in spirit to the present version, but may
468 differ in detail to address new problems or concerns.
469
470 Each version is given a distinguishing version number. If the Library
471 specifies a version number of this License which applies to it and
472 ``any later version'', you have the option of following the terms and
473 conditions either of that version or of any later version published by
474 the Free Software Foundation. If the Library does not specify a
475 license version number, you may choose any version ever published by
476 the Free Software Foundation.
477
478 \item [14.] If you wish to incorporate parts of the Library into other free
479 programs whose distribution conditions are incompatible with these,
480 write to the author to ask for permission. For software which is
481 copyrighted by the Free Software Foundation, write to the Free Software
482 Foundation; we sometimes make exceptions for this. Our decision will
483 be guided by the two goals of preserving the free status of all
484 derivatives of our free software and of promoting the sharing and reuse
485 of software generally.
486
487 \begin{center}
488 NO WARRANTY
489 \end{center}
490
491 \bfseries
492
493 \item [15.] Because the Library is licensed free of charge, there is no
494 warranty for the Library, to the extent permitted by applicable law.
495 Except when otherwise stated in writing the copyright holders and/or
496 other parties provide the Library ``as is'' without warranty of any
497 kind, either expressed or implied, including, but not limited to, the
498 implied warranties of merchantability and fitness for a particular
499 purpose. The entire risk as to the quality and performance of the
500 Library is with you. Should the Library prove defective, you assume
501 the cost of all necessary servicing, repair or correction.
502
503 \item [16.] In no event unless required by applicable law or agreed to in
504 writing will any copyright holder, or any other party who may modify
505 and/or redistribute the Library as permitted above, be liable to you
506 for damages, including any general, special, incidental or
507 consequential damages arising out of the use or inability to use the
508 Library (including but not limited to loss of data or data being
509 rendered inaccurate or losses sustained by you or third parties or a
510 failure of the Library to operate with any other software), even if
511 such holder or other party has been advised of the possibility of such
512 damages.
513
514 \end{enumerate}
515
516 \begin{center}
517 \textbf{END OF TERMS AND CONDITIONS}
518 \end{center}
519
520
521 \gplsec{Appendix: How to apply these terms to your new libraries}
522
523 If you develop a new library, and you want it to be of the greatest possible
524 use to the public, we recommend making it free software that everyone can
525 redistribute and change. You can do so by permitting redistribution under
526 these terms (or, alternatively, under the terms of the ordinary General
527 Public License).
528
529 To apply these terms, attach the following notices to the library. It is
530 safest to attach them to the start of each source file to most effectively
531 convey the exclusion of warranty; and each file should have at least the
532 ``copyright'' line and a pointer to where the full notice is found.
533
534 \begin{verbatim}
535 <one line to give the library's name and a brief idea of what it does.>
536 Copyright (C) <year> <name of author>
537
538 This library is free software; you can redistribute it and/or
539 modify it under the terms of the GNU Library General Public
540 License as published by the Free Software Foundation; either
541 version 2 of the License, or (at your option) any later version.
542
543 This library is distributed in the hope that it will be useful,
544 but WITHOUT ANY WARRANTY; without even the implied warranty of
545 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
546 Library General Public License for more details.
547
548 You should have received a copy of the GNU Library General Public License
549 along with this library; if not, write to the Free Software Foundation,
550 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
551 \end{verbatim}
552
553 Also add information on how to contact you by electronic and paper mail.
554
555 You should also get your employer (if you work as a programmer) or your
556 school, if any, to sign a ``copyright disclaimer'' for the library, if
557 necessary. Here is a sample; alter the names:
558
559 \begin{verbatim}
560 Yoyodyne, Inc., hereby disclaims all copyright interest in the
561 library `Frob' (a library for tweaking knobs) written by James
562 Random Hacker.
563
564 <signature of Ty Coon>, 1 April 1990
565 Ty Coon, President of Vice
566 \end{verbatim}
567
568 That's all there is to it!
569
570 \gplend