initial commit
[platform/upstream/libconfig.git] / doc / LGPL.texi
1 @c \input texinfo.tex    @c -*-texinfo-*-
2 @c 
3 @c %**start of header
4
5 @c All text is ignored before the setfilename.
6 @setfilename LGPL.info
7
8 @center GNU LESSER GENERAL PUBLIC LICENSE
9 @center Version 2.1, February 1999
10
11 @sp 1
12
13 Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc.,
14 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
15
16 Everyone is permitted to copy and distribute verbatim copies of this
17 license document, but changing it is not allowed.
18
19 [This is the first released version of the Lesser GPL.  It also counts
20 as the successor of the GNU Library Public License, version 2, hence the
21 version number 2.1.]
22
23 @sp 1
24 @center Preamble
25 @sp 1
26
27 The licenses for most software are designed to take away your freedom to
28 share and change it.  By contrast, the GNU General Public Licenses are
29 intended to guarantee your freedom to share and change free software--to
30 make sure the software is free for all its users.
31
32 This license, the Lesser General Public License, applies to some
33 specially designated software packages--typically libraries--of the Free
34 Software Foundation and other authors who decide to use it.  You can use
35 it too, but we suggest you first think carefully about whether this
36 license or the ordinary General Public License is the better strategy to
37 use in any particular case, based on the explanations below.
38
39 When we speak of free software, we are referring to freedom of use, not
40 price.  Our General Public Licenses are designed to make sure that you
41 have the freedom to distribute copies of free software (and charge for
42 this service if you wish); that you receive source code or can get it if
43 you want it; that you can change the software and use pieces of it in
44 new free programs; and that you are informed that you can do these
45 things.
46
47 To protect your rights, we need to make restrictions that forbid
48 distributors to deny you these rights or to ask you to surrender these
49 rights.  These restrictions translate to certain responsibilities for
50 you if you distribute copies of the library or if you modify it.
51
52 For example, if you distribute copies of the library, whether gratis or
53 for a fee, you must give the recipients all the rights that we gave you.
54 You must make sure that they, too, receive or can get the source code.
55 If you link other code with the library, you must provide complete
56 object files to the recipients, so that they can relink them with the
57 library after making changes to the library and recompiling it.  And you
58 must show them these terms so they know their rights.
59
60 We protect your rights with a two-step method: (1) we copyright the
61 library, and (2) we offer you this license, which gives you legal
62 permission to copy, distribute and/or modify the library.
63
64 To protect each distributor, we want to make it very clear that there is
65 no warranty for the free library.  Also, if the library is modified by
66 someone else and passed on, the recipients should know that what they
67 have is not the original version, so that the original author's
68 reputation will not be affected by problems that might be introduced by
69 others.
70
71 Finally, software patents pose a constant threat to the existence of any
72 free program.  We wish to make sure that a company cannot effectively
73 restrict the users of a free program by obtaining a restrictive license
74 from a patent holder.  Therefore, we insist that any patent license
75 obtained for a version of the library must be consistent with the full
76 freedom of use specified in this license.
77
78 Most GNU software, including some libraries, is covered by the ordinary
79 GNU General Public License.  This license, the GNU Lesser General Public
80 License, applies to certain designated libraries, and is quite different
81 from the ordinary General Public License.  We use this license for
82 certain libraries in order to permit linking those libraries into
83 non-free programs.
84
85 When a program is linked with a library, whether statically or using a
86 shared library, the combination of the two is legally speaking a
87 combined work, a derivative of the original library.  The ordinary
88 General Public License therefore permits such linking only if the entire
89 combination fits its criteria of freedom.  The Lesser General Public
90 License permits more lax criteria for linking other code with the
91 library.
92
93 We call this license the ``Lesser'' General Public License because it does
94 Less to protect the user's freedom than the ordinary General Public
95 License.  It also provides other free software developers Less of an
96 advantage over competing non-free programs.  These disadvantages are the
97 reason we use the ordinary General Public License for many libraries.
98 However, the Lesser license provides advantages in certain special
99 circumstances.
100
101 For example, on rare occasions, there may be a special need to encourage
102 the widest possible use of a certain library, so that it becomes a
103 de-facto standard.  To achieve this, non-free programs must be allowed
104 to use the library.  A more frequent case is that a free library does
105 the same job as widely used non-free libraries.  In this case, there is
106 little to gain by limiting the free library to free software only, so we
107 use the Lesser General Public License.
108
109 In other cases, permission to use a particular library in non-free
110 programs enables a greater number of people to use a large body of free
111 software.  For example, permission to use the GNU C Library in non-free
112 programs enables many more people to use the whole GNU operating system,
113 as well as its variant, the GNU/Linux operating system.
114
115 Although the Lesser General Public License is Less protective of the
116 users' freedom, it does ensure that the user of a program that is linked
117 with the Library has the freedom and the wherewithal to run that program
118 using a modified version of the Library.
119
120 The precise terms and conditions for copying, distribution and
121 modification follow.  Pay close attention to the difference between a
122 ``work based on the library'' and a ``work that uses the library''.  The
123 former contains code derived from the library, whereas the latter must
124 be combined with the library in order to run.
125
126 @page
127
128 @center GNU LESSER GENERAL PUBLIC LICENSE
129 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
130
131 @enumerate 0
132
133 @sp 1
134 @item
135 This License Agreement applies to any software library or other program
136 which contains a notice placed by the copyright holder or other
137 authorized party saying it may be distributed under the terms of this
138 Lesser General Public License (also called ``this License'').  Each
139 licensee is addressed as ``you''.
140
141 A ``library'' means a collection of software functions and/or data
142 prepared so as to be conveniently linked with application programs
143 (which use some of those functions and data) to form executables.
144
145 The ``Library'', below, refers to any such software library or work which
146 has been distributed under these terms.  A ``work based on the Library''
147 means either the Library or any derivative work under copyright law:
148 that is to say, a work containing the Library or a portion of it, either
149 verbatim or with modifications and/or translated straightforwardly into
150 another language.  (Hereinafter, translation is included without
151 limitation in the term ``modification''.)
152
153 ``Source code'' for a work means the preferred form of the work for making
154 modifications to it.  For a library, complete source code means all the
155 source code for all modules it contains, plus any associated interface
156 definition files, plus the scripts used to control compilation and
157 installation of the library.
158
159 Activities other than copying, distribution and modification are not
160 covered by this License; they are outside its scope.  The act of running
161 a program using the Library is not restricted, and output from such a
162 program is covered only if its contents constitute a work based on the
163 Library (independent of the use of the Library in a tool for writing
164 it).  Whether that is true depends on what the Library does and what the
165 program that uses the Library does.
166
167 @sp 1
168 @item
169 You may copy and distribute verbatim copies of the Library's complete
170 source code as you receive it, in any medium, provided that you
171 conspicuously and appropriately publish on each copy an appropriate
172 copyright notice and disclaimer of warranty; keep intact all the notices
173 that refer to this License and to the absence of any warranty; and
174 distribute a copy of this License along with the Library.
175
176 You may charge a fee for the physical act of transferring a copy, and
177 you may at your option offer warranty protection in exchange for a fee.
178
179 @sp 1
180 @item
181 You may modify your copy or copies of the Library or any portion of it,
182 thus forming a work based on the Library, and copy and distribute such
183 modifications or work under the terms of Section 1 above, provided that
184 you also meet all of these conditions:
185
186 @enumerate a
187
188 @item
189 The modified work must itself be a software library.
190
191 @sp 1
192 @item
193 You must cause the files modified to carry prominent notices stating
194 that you changed the files and the date of any change.
195
196 @sp 1
197 @item
198 You must cause the whole of the work to be licensed at no charge to all
199 third parties under the terms of this License.
200
201 @sp 1
202 @item
203 If a facility in the modified Library refers to a function or a table of
204 data to be supplied by an application program that uses the facility,
205 other than as an argument passed when the facility is invoked, then you
206 must make a good faith effort to ensure that, in the event an
207 application does not supply such function or table, the facility still
208 operates, and performs whatever part of its purpose remains meaningful.
209
210 (For example, a function in a library to compute square roots has a
211 purpose that is entirely well-defined independent of the application.
212 Therefore, Subsection 2d requires that any application-supplied function
213 or table used by this function must be optional: if the application does
214 not supply it, the square root function must still compute square
215 roots.)
216
217 @end enumerate
218
219 These requirements apply to the modified work as a whole.  If
220 identifiable sections of that work are not derived from the Library, and
221 can be reasonably considered independent and separate works in
222 themselves, then this License, and its terms, do not apply to those
223 sections when you distribute them as separate works.  But when you
224 distribute the same sections as part of a whole which is a work based on
225 the Library, the distribution of the whole must be on the terms of this
226 License, whose permissions for other licensees extend to the entire
227 whole, and thus to each and every part regardless of who wrote it.
228
229 Thus, it is not the intent of this section to claim rights or contest
230 your rights to work written entirely by you; rather, the intent is to
231 exercise the right to control the distribution of derivative or
232 collective works based on the Library.
233
234 In addition, mere aggregation of another work not based on the Library
235 with the Library (or with a work based on the Library) on a volume of a
236 storage or distribution medium does not bring the other work under the
237 scope of this License.
238
239 @sp 1
240 @item
241 You may opt to apply the terms of the ordinary GNU General Public
242 License instead of this License to a given copy of the Library.  To do
243 this, you must alter all the notices that refer to this License, so that
244 they refer to the ordinary GNU General Public License, version 2,
245 instead of to this License.  (If a newer version than version 2 of the
246 ordinary GNU General Public License has appeared, then you can specify
247 that version instead if you wish.)  Do not make any other change in
248 these notices.
249
250 Once this change is made in a given copy, it is irreversible for that
251 copy, so the ordinary GNU General Public License applies to all
252 subsequent copies and derivative works made from that copy.
253
254 This option is useful when you wish to copy part of the code of the
255 Library into a program that is not a library.
256
257 @sp 1
258 @item
259 You may copy and distribute the Library (or a portion or derivative of
260 it, under Section 2) in object code or executable form under the terms
261 of Sections 1 and 2 above provided that you accompany it with the
262 complete corresponding machine-readable source code, which must be
263 distributed under the terms of Sections 1 and 2 above on a medium
264 customarily used for software interchange.
265
266 If distribution of object code is made by offering access to copy from a
267 designated place, then offering equivalent access to copy the source
268 code from the same place satisfies the requirement to distribute the
269 source code, even though third parties are not compelled to copy the
270 source along with the object code.
271
272 @sp 1
273 @item
274 A program that contains no derivative of any portion of the Library, but
275 is designed to work with the Library by being compiled or linked with
276 it, is called a ``work that uses the Library''.  Such a work, in
277 isolation, is not a derivative work of the Library, and therefore falls
278 outside the scope of this License.
279
280 However, linking a ``work that uses the Library'' with the Library creates
281 an executable that is a derivative of the Library (because it contains
282 portions of the Library), rather than a ``work that uses the library''.
283 The executable is therefore covered by this License.  Section 6 states
284 terms for distribution of such executables.
285
286 When a ``work that uses the Library'' uses material from a header file
287 that is part of the Library, the object code for the work may be a
288 derivative work of the Library even though the source code is not.
289 Whether this is true is especially significant if the work can be linked
290 without the Library, or if the work is itself a library.  The threshold
291 for this to be true is not precisely defined by law.
292
293 If such an object file uses only numerical parameters, data structure
294 layouts and accessors, and small macros and small inline functions (ten
295 lines or less in length), then the use of the object file is
296 unrestricted, regardless of whether it is legally a derivative work.
297 (Executables containing this object code plus portions of the Library
298 will still fall under Section 6.)
299
300 Otherwise, if the work is a derivative of the Library, you may
301 distribute the object code for the work under the terms of Section 6.
302 Any executables containing that work also fall under Section 6, whether
303 or not they are linked directly with the Library itself.
304
305 @sp 1
306 @item
307 As an exception to the Sections above, you may also combine or link a
308 ``work that uses the Library'' with the Library to produce a work
309 containing portions of the Library, and distribute that work under terms
310 of your choice, provided that the terms permit modification of the work
311 for the customer's own use and reverse engineering for debugging such
312 modifications.
313
314 You must give prominent notice with each copy of the work that the
315 Library is used in it and that the Library and its use are covered by
316 this License.  You must supply a copy of this License.  If the work
317 during execution displays copyright notices, you must include the
318 copyright notice for the Library among them, as well as a reference
319 directing the user to the copy of this License.  Also, you must do one
320 of these things:
321
322 @enumerate a
323
324 @sp 1
325 @item
326 Accompany the work with the complete corresponding machine-readable
327 source code for the Library including whatever changes were used in the
328 work (which must be distributed under Sections 1 and 2 above); and, if
329 the work is an executable linked with the Library, with the complete
330 machine-readable ``work that uses the Library'', as object code and/or
331 source code, so that the user can modify the Library and then relink to
332 produce a modified executable containing the modified Library.  (It is
333 understood that the user who changes the contents of definitions files
334 in the Library will not necessarily be able to recompile the application
335 to use the modified definitions.)
336
337 @sp 1
338 @item
339 Use a suitable shared library mechanism for linking with the Library.  A
340 suitable mechanism is one that (1) uses at run time a copy of the
341 library already present on the user's computer system, rather than
342 copying library functions into the executable, and (2) will operate
343 properly with a modified version of the library, if the user installs
344 one, as long as the modified version is interface-compatible with the
345 version that the work was made with.
346
347 @sp 1
348 @item
349 Accompany the work with a written offer, valid for at least three years,
350 to give the same user the materials specified in Subsection 6a, above,
351 for a charge no more than the cost of performing this distribution.
352
353 @sp 1
354 @item
355 If distribution of the work is made by offering access to copy from a
356 designated place, offer equivalent access to copy the above specified
357 materials from the same place.
358
359 @sp 1
360 @item
361 Verify that the user has already received a copy of these materials or
362 that you have already sent this user a copy.
363
364 @end enumerate
365
366 For an executable, the required form of the ``work that uses the Library''
367 must include any data and utility programs needed for reproducing the
368 executable from it.  However, as a special exception, the materials to
369 be distributed need not include anything that is normally distributed
370 (in either source or binary form) with the major components (compiler,
371 kernel, and so on) of the operating system on which the executable runs,
372 unless that component itself accompanies the executable.
373
374 It may happen that this requirement contradicts the license restrictions
375 of other proprietary libraries that do not normally accompany the
376 operating system.  Such a contradiction means you cannot use both them
377 and the Library together in an executable that you distribute.
378
379 @sp 1
380 @item
381 You may place library facilities that are a work based on the Library
382 side-by-side in a single library together with other library facilities
383 not covered by this License, and distribute such a combined library,
384 provided that the separate distribution of the work based on the Library
385 and of the other library facilities is otherwise permitted, and provided
386 that you do these two things:
387
388 @enumerate a
389
390 @sp 1
391 @item
392 Accompany the combined library with a copy of the same work based on the
393 Library, uncombined with any other library facilities.  This must be
394 distributed under the terms of the Sections above.
395
396 @sp 1
397 @item
398 Give prominent notice with the combined library of the fact that part of
399 it is a work based on the Library, and explaining where to find the
400 accompanying uncombined form of the same work.
401
402 @end enumerate
403
404 @sp 1
405 @item
406 You may not copy, modify, sublicense, link with, or distribute the
407 Library except as expressly provided under this License.  Any attempt
408 otherwise to copy, modify, sublicense, link with, or distribute the
409 Library is void, and will automatically terminate your rights under this
410 License.  However, parties who have received copies, or rights, from you
411 under this License will not have their licenses terminated so long as
412 such parties remain in full compliance.
413
414 @sp 1
415 @item
416 You are not required to accept this License, since you have not signed
417 it.  However, nothing else grants you permission to modify or distribute
418 the Library or its derivative works.  These actions are prohibited by
419 law if you do not accept this License.  Therefore, by modifying or
420 distributing the Library (or any work based on the Library), you
421 indicate your acceptance of this License to do so, and all its terms and
422 conditions for copying, distributing or modifying the Library or works
423 based on it.
424
425 @sp 1
426 @item
427 Each time you redistribute the Library (or any work based on the
428 Library), the recipient automatically receives a license from the
429 original licensor to copy, distribute, link with or modify the Library
430 subject to these terms and conditions.  You may not impose any further
431 restrictions on the recipients' exercise of the rights granted herein.
432 You are not responsible for enforcing compliance by third parties with
433 this License.
434
435 @sp 1
436 @item
437 If, as a consequence of a court judgment or allegation of patent
438 infringement or for any other reason (not limited to patent issues),
439 conditions are imposed on you (whether by court order, agreement or
440 otherwise) that contradict the conditions of this License, they do not
441 excuse you from the conditions of this License.  If you cannot
442 distribute so as to satisfy simultaneously your obligations under this
443 License and any other pertinent obligations, then as a consequence you
444 may not distribute the Library at all.  For example, if a patent license
445 would not permit royalty-free redistribution of the Library by all those
446 who receive copies directly or indirectly through you, then the only way
447 you could satisfy both it and this License would be to refrain entirely
448 from distribution of the Library.
449
450 If any portion of this section is held invalid or unenforceable under
451 any particular circumstance, the balance of the section is intended to
452 apply, and the section as a whole is intended to apply in other
453 circumstances.
454
455 It is not the purpose of this section to induce you to infringe any
456 patents or other property right claims or to contest validity of any
457 such claims; this section has the sole purpose of protecting the
458 integrity of the free software distribution system which is implemented
459 by public license practices.  Many people have made generous
460 contributions to the wide range of software distributed through that
461 system in reliance on consistent application of that system; it is up to
462 the author/donor to decide if he or she is willing to distribute
463 software through any other system and a licensee cannot impose that
464 choice.
465
466 This section is intended to make thoroughly clear what is believed to be
467 a consequence of the rest of this License.
468
469 @sp 1
470 @item
471 If the distribution and/or use of the Library is restricted in certain
472 countries either by patents or by copyrighted interfaces, the original
473 copyright holder who places the Library under this License may add an
474 explicit geographical distribution limitation excluding those countries,
475 so that distribution is permitted only in or among countries not thus
476 excluded.  In such case, this License incorporates the limitation as if
477 written in the body of this License.
478
479 @sp 1
480 @item
481 The Free Software Foundation may publish revised and/or new versions of
482 the Lesser General Public License from time to time.  Such new versions
483 will be similar in spirit to the present version, but may differ in
484 detail to address new problems or concerns.
485
486 Each version is given a distinguishing version number.  If the Library
487 specifies a version number of this License which applies to it and ``any
488 later version'', you have the option of following the terms and
489 conditions either of that version or of any later version published by
490 the Free Software Foundation.  If the Library does not specify a license
491 version number, you may choose any version ever published by the Free
492 Software Foundation.
493
494 @sp 1
495 @item
496 If you wish to incorporate parts of the Library into other free programs
497 whose distribution conditions are incompatible with these, write to the
498 author to ask for permission.  For software which is copyrighted by the
499 Free Software Foundation, write to the Free Software Foundation; we
500 sometimes make exceptions for this.  Our decision will be guided by the
501 two goals of preserving the free status of all derivatives of our free
502 software and of promoting the sharing and reuse of software generally.
503
504 @sp 1
505 @center NO WARRANTY
506 @sp 1
507
508 @item
509 BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
510 THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
511 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
512 PROVIDE THE LIBRARY ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER
513 EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
514 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE
515 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH
516 YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
517 NECESSARY SERVICING, REPAIR OR CORRECTION.
518
519 @sp 1
520 @item
521 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
522 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
523 REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
524 DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
525 DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY
526 (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
527 INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
528 THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR
529 OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
530
531 @end enumerate
532
533 @sp 1
534 @center END OF TERMS AND CONDITIONS
535 @sp 1
536 @page
537 @center How to Apply These Terms to Your New Libraries
538
539 If you develop a new library, and you want it to be of the greatest
540 possible use to the public, we recommend making it free software that
541 everyone can redistribute and change.  You can do so by permitting
542 redistribution under these terms (or, alternatively, under the terms of
543 the ordinary General Public License).
544
545 To apply these terms, attach the following notices to the library.  It
546 is safest to attach them to the start of each source file to most
547 effectively convey the exclusion of warranty; and each file should have
548 at least the ``copyright'' line and a pointer to where the full notice is
549 found.
550
551 @format
552 @t{
553 <one line to give the library's name and a brief idea of what it does.>
554 Copyright (C) <year>  <name of author>
555
556 This library is free software; you can redistribute it and/or
557 modify it under the terms of the GNU Lesser General Public
558 License as published by the Free Software Foundation; either
559 version 2 of the License, or (at your option) any later version.
560
561 This library is distributed in the hope that it will be useful,
562 but WITHOUT ANY WARRANTY; without even the implied warranty of
563 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
564 Lesser General Public License for more details.
565
566 You should have received a copy of the GNU Lesser General Public
567 License along with this library; if not, write to the Free Software
568 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
569 }
570 @end format
571
572 Also add information on how to contact you by electronic and paper mail.
573
574 You should also get your employer (if you work as a programmer) or your
575 school, if any, to sign a ``copyright disclaimer'' for the library, if
576 necessary.  Here is a sample; alter the names:
577
578 @format
579 @t{
580 Yoyodyne, Inc., hereby disclaims all copyright interest in the
581 library `Frob' (a library for tweaking knobs) written by James Random Hacker.
582
583 <signature of Ty Coon>, 1 April 1990
584 Ty Coon, President of Vice
585 }
586 @end format
587
588 That's all there is to it!
589
590 @c @bye