Given the above, it is possible that SWI-Prolog packages and
extensions will rely on the GPL.91On
the Unix version, the default toplevel uses the GNU readline library for
command-line editing. This library is distributed under the GPL. In
practice this problem is small as most final applications have Prolog
embedded, without direct access to the commandline and therefore without
need for libreadline
. The predicates below
allow for registering license requirements for Prolog files and foreign
modules. The predicate eval_license/0
reports which components from the currenly configured system are
distributed under copy-left and open source enforcing licenses (the GPL)
and therefore must be replaced before distributing linked applications
under non-free license conditions.
GPL
license as well as which components prohibit
the use of other license conditions.libgcc
,
the GNU-C runtime library facing similar technical issues.
As a special exception, if you link this library with other files, compiled with SWI-Prolog, to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License.
This should be the default for software contributed to the SWI-Prolog project as it allows the community to prosper both in the free and non-free world. Still, people using SWI-Prolog to create non-free applications must contribute sources to improvements they make to the community.
Other licenses known to the system are guile
, gnu_ada
,
x11
, expat
, sml
, public_domain
,
cryptix
, bsd
, zlib
, constlgpl_compatible
and gpl_compatible
. New licenses can be defined by adding
clauses for the multifile predicate license:license/3. Below is an
example. The second argument is either gpl
or lgpl
to indicate compatibility to these licenses. Other values cause the
license to interpreted as proprietary. Proprietary licenses are
reported by eval_license/0.
See the file boot/license.pl
for details.
:- multifile license:license/3. license:license(mylicense, lgpl, [ comment('My personal license'), url('http://www.mine.org/license.html') ]). :- license(mylicense).