run_command "${SRC_OUT}"-config "${DIST_DIR}"/src ./Setup.sh
run_command "${DOC_OUT}"-config "${DIST_DIR}"/doc reconf
-plugin ()
-{
- if [[ -f Makefile ]]; then
- my_make distclean
- else
- [[ -f config.h.in ]] || cmd autoheader
- cmd autoconf
- fi
-}
-
for plugin in $PLUGINS; do
D="${DIST_DIR}"/src/$plugin
- run_command "${OUTPUT_DIR}"/$plugin-config "${DIST_DIR}"/src/$plugin plugin
+ run_command "${OUTPUT_DIR}"/$plugin-config \
+ "${DIST_DIR}"/src/$plugin \
+ ./autogen.sh
done
# Clean up after autoconf
This file contains the trampoline functions --- one for each declared
C extern or callback. It includes the @file{mit-scheme.h} header
file, found in the @code{AUXDIR} directory ---
-e.g. @file{/usr/local/lib/mit-scheme/}.
+e.g. @file{/usr/local/lib/mit-scheme-i386/}.
@item prhello-const.c
This file contains a C program that creates
@verbatiminclude prhello-Makefile
@end example
+The FFI also supports libraries created by GNU automake (libtool).
+The source distribution includes several simple plugins. Each uses a
+portable Makefile.am to build and install its shared object.
@node Hello World, GNU Free Documentation License, Compiling and Linking, Top
@chapter Hello World
+AUXDIR=/usr/local/lib/mit-scheme-i386
+
install: build
- echo '(install-shim "$(DESTDIR)" "prhello")' \
- | mit-scheme --batch-mode
+ install -m 644 prhello-types.bin $(AUXDIR)
+ install -m 644 prhello-const.bin $(AUXDIR)
+ install -m 644 prhello-shim.so $(AUXDIR)
+
+uninstall:
+ rm $(AUXDIR)/prhello-*
clean:
rm prhello-const* prhello-types* prhello-shim*
build: prhello-shim.so prhello-types.bin prhello-const.bin
prhello-shim.so: prhello-shim.o
- echo "(link-shim)" \
- | mit-scheme --batch-mode -- -o $@ $^ `pkg-config --libs gtk+-2.0`
+ $(CC) -shared -fPIC -o $@ $^ `pkg-config --libs gtk+-3.0`
prhello-shim.o: prhello-shim.c
- echo '(compile-shim)' \
- | mit-scheme --batch-mode -- `pkg-config --cflags gtk+-2.0` -c $<
+ $(CC) -I$(AUXDIR) -Wall -fPIC `pkg-config --cflags gtk+-3.0` -o $@ -c $<
prhello-shim.c prhello-const.c prhello-types.bin: prhello.cdecl
echo '(generate-shim "prhello" "#include <gtk/gtk.h>")' \
./prhello-const
prhello-const: prhello-const.o
- $(CC) -o $@ $^ $(LDFLAGS) `pkg-config --libs gtk+-2.0`
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) `pkg-config --libs gtk+-3.0`
prhello-const.o: prhello-const.c
- $(CC) `pkg-config --cflags gtk+-2.0` $(CFLAGS) -o $@ -c $<
+ $(CC) `pkg-config --cflags gtk+-3.0` $(CFLAGS) -o $@ -c $<
(extern void
g_signal_connect
- (object (* GtkObject))
+ (instance gpointer)
(name (* gchar))
- (CALLBACK GtkSignalFunc)
+ (CALLBACK GCallback)
(ID gpointer))
-(typedef GtkSignalFunc (* mumble))
+(typedef GCallback (* mumble))
(callback gboolean
delete_event
maybe_mkdir lib
maybe_link lib/include ../microcode
maybe_link lib/mit-scheme.h ../microcode/pruxffi.h
-maybe_link lib/shim-config.scm ../microcode/shim-config.scm
maybe_link lib/optiondb.scm ../etc/optiondb.scm
maybe_link lib/compiler ../compiler
--- /dev/null
+To find out what should go in this file, see "Information For
+Maintainers of GNU Software" (maintain.texi), the section called
+"Recording Changes".
+
+Matt Birkholz Everything up to the initial automake conversion.
--- /dev/null
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+\f
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+\f
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+\f
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+\f
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
--- /dev/null
+-*-Text-*-
+
+Please see the git commit log:
+
+$ git clone git://git.savannah.gnu.org/mit-scheme.git
+$ git log origin/master -- src/blowfish/ | more
--- /dev/null
+## Process this file with automake to produce Makefile.in
+##
+## Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+## 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+## 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+## Massachusetts Institute of Technology
+##
+## This file is part of MIT/GNU Scheme.
+##
+## MIT/GNU Scheme is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## MIT/GNU Scheme is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with MIT/GNU Scheme; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+## USA.
+
+ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST = autogen.sh
+
+MIT_SCHEME_EXE = @MIT_SCHEME_EXE@
+scmlibdir = $(libdir)/mit-scheme-@MIT_SCHEME_ARCH@
+scmlib_blowfishdir = $(scmlibdir)/blowfish
+
+scmlib_LTLIBRARIES = blowfish-shim.la
+scmlib_DATA = blowfish-types.bin blowfish-const.bin
+scmlib_blowfish_DATA = make.scm
+scmlib_blowfish_DATA += blowfish.scm blowfish.bin blowfish.bci blowfish.com
+scmlib_blowfish_DATA += blowfish-@MIT_SCHEME_OS_SUFFIX@.pkd
+
+##info_TEXINFOS = blowfish.texi
+
+AM_CPPFLAGS = -I$(scmlibdir)
+
+blowfish_shim_la_LIBADD = blowfish-adapter.lo
+blowfish_shim_la_LDFLAGS = -module -avoid-version -shared
+
+noinst_PROGRAMS = blowfish-const
+blowfish_const_SOURCES = blowfish-const.c blowfish-shim.h
+
+blowfish-shim.c blowfish-const.c blowfish-types.bin: \
+ blowfish.cdecl blowfish-shim.h
+ echo '(generate-shim "blowfish" "#include \"blowfish-shim.h\"")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+
+blowfish-const.bin: blowfish-const.scm
+ echo '(sf "blowfish-const")' | $(MIT_SCHEME_EXE) --batch-mode
+
+blowfish-const.scm: blowfish-const
+ ./blowfish-const
+
+blowfish.bin blowfish.bci blowfish.com blowfish-@MIT_SCHEME_OS_SUFFIX@.pkd: \
+ blowfish.scm blowfish-const.bin blowfish-types.bin
+ echo '(load "compile.scm")' | $(MIT_SCHEME_EXE) --batch-mode
+
+CLEANFILES = blowfish-const* blowfish-shim.c
+CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd
+CLEANFILES += test
+
+TESTS = check-scm
+
+install-data-hook uninstall-data-hook:
+ echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+++ /dev/null
-# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
-# 2015, 2016 Massachusetts Institute of Technology
-#
-# This file is part of MIT/GNU Scheme.
-#
-# MIT/GNU Scheme is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# MIT/GNU Scheme is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with MIT/GNU Scheme; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-MIT_SCHEME_EXE = mit-scheme
-exe = '$(MIT_SCHEME_EXE)' --batch-mode
-
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-
-all: blowfish-shim.so blowfish-types.bin blowfish-const.bin
- echo '(load "compile")' | $(exe)
-
-check:
- echo '(load "check")' | $(exe)
-
-install:
- ( echo '(begin'; \
- echo ' (install-shim "$(DESTDIR)" "blowfish")'; \
- echo ' (install-load-option "$(DESTDIR)" "blowfish"))' ) \
- | $(exe) -- *.com *.bci *.pkd make.scm
-
-clean:
- rm -f blowfish-const.scm blowfish-const blowfish-const.c
- rm -f blowfish-shim.c
- rm -f blowfish-*.crf blowfish-*.fre blowfish-*.pkd
- rm -f *.o *.so *.bin *.ext *.com *.bci *.moc *.fni
- rm -f test
-
-distclean: clean
- rm -f Makefile config.h config.log config.status
-
-maintainer-clean: distclean
- rm -f configure config.h.in
- rm -rf autom4te.cache
-
-blowfish-shim.so: blowfish-shim.o blowfish-adapter.o
- echo "(link-shim)" | $(exe) -- $(LDFLAGS) -o $@ $^ $(LIBS)
-
-blowfish-adapter.o: blowfish-adapter.c blowfish-shim.h
- echo '(compile-shim)' | $(exe) -- $(CPPFLAGS) $(CFLAGS) -c $<
-
-blowfish-shim.o: blowfish-shim.c blowfish-shim.h
- echo '(compile-shim)' | $(exe) -- $(CPPFLAGS) $(CFLAGS) -c $<
-
-blowfish-shim.c blowfish-const.c blowfish-types.bin: \
- blowfish.cdecl blowfish-shim.h
- echo '(generate-shim "blowfish" "#include \"blowfish-shim.h\"")' \
- | $(exe)
-
-blowfish-const.bin: blowfish-const.scm
- echo '(sf "blowfish-const")' | $(exe)
-
-blowfish-const.scm: blowfish-const
- ./blowfish-const
-
-blowfish-const: blowfish-const.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-blowfish-const.o: blowfish-const.c blowfish-shim.h
- $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
-
-.PHONY: all check install clean distclean maintainer-clean
--- /dev/null
+mit-scheme-blowfish NEWS -- history of user-visible changes.
+
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+ 2015, 2016 Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301, USA.
+
+mit-scheme-blowfish 0.1 - Matt Birkholz, 2016-02-19
+===================================================
+
+* Use libtool and automake, rather than the microcode's disappearing
+ module support.
--- /dev/null
+#!/bin/sh
+
+set -e
+rm -rf m4
+mkdir m4
+autoreconf --force --install -I m4
--- /dev/null
+#!/bin/sh
+echo '(load "check.scm")' | ${MIT_SCHEME_EXE}
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([MIT/GNU Scheme blowfish interface],
+AC_PREREQ([2.69])
+AC_INIT([MIT/GNU Scheme blowfish plugin],
[0.1],
[bug-mit-scheme@gnu.org],
[mit-scheme-blowfish])
AC_CONFIG_SRCDIR([blowfish.pkg])
AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
AC_COPYRIGHT(
[Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
*/])
+AM_INIT_AUTOMAKE
+
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+
AC_ARG_WITH([openssl],
AS_HELP_STRING([--with-openssl],
[Use OpenSSL crypto library if available [[yes]]]))
: ${with_openssl='yes'}
+dnl Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([dlopen win32-dll])
+
dnl The OpenSSL crypto library provides support for blowfish.
if test "${with_openssl}" != no; then
if test "${with_openssl}" != yes; then
fi
fi
+: ${MIT_SCHEME_EXE=mit-scheme}
+MIT_SCHEME_ARCH=`echo "(display microcode-id/compiled-code-type)" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+
AC_SUBST([LIBS])
AC_SUBST([CPPFLAGS])
AC_SUBST([LDFLAGS])
+AC_SUBST([MIT_SCHEME_EXE])
+AC_SUBST([MIT_SCHEME_ARCH])
+AC_SUBST([MIT_SCHEME_OS_SUFFIX])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
;;;; Build Utilities
;;; package: (ffi build)
-(define (compile-shim)
- (let ((vals (conf-values (shim-conf) 'COMPILE-SHIM)))
- (let ((prefix (append
- (filter (lambda (i) (not (string=? "-DMIT_SCHEME" i)))
- (parse-words (car vals)))
- (list (string-append "-I" (auxdir)))
- (parse-words (cadr vals)))))
- (run-command (append prefix (command-line))))))
-
-(define (link-shim)
- (let ((vals (conf-values (shim-conf) 'LINK-SHIM)))
- (let ((prefix (parse-words (car vals)))
- (suffix (parse-words (cadr vals))))
- (run-command (append prefix (command-line) suffix)))))
-
-(define (install-shim destdir libname)
- (guarantee-string destdir 'INSTALL-SHIM)
- (guarantee-string libname 'INSTALL-SHIM)
- (if (string-find-next-char libname #\/)
- (error "Directory separator, #\/, in library name:" libname))
- (run-command (append (conf-words (shim-conf) 'INSTALL)
- (list (string-append libname "-shim.so")
- (string-append libname "-types.bin")
- (string-append libname "-const.bin")
- (string-append destdir (auxdir))))))
-
-(define (install-load-option destdir name #!optional directory)
- (guarantee-string destdir 'INSTALL-LOAD-OPTION)
- (guarantee-string name 'INSTALL-LOAD-OPTION)
- (let ((dir (if (default-object? directory)
- name
- directory)))
- (guarantee-string dir 'INSTALL-LOAD-OPTION)
- (let ((install (conf-words (shim-conf) 'INSTALL))
- (auxdir (auxdir)))
- (let ((library-dir (string-append destdir auxdir dir)))
- (run-command (list "rm" "-rf" library-dir))
- (run-command (list "mkdir" library-dir))
- (run-command (list "chmod" "755" library-dir))
- (run-command (append install (files) (list library-dir)))
- (rewrite-file (string-append destdir auxdir "optiondb.scm")
- (lambda (in out)
- (rewrite-optiondb name dir in out)))))))
-
-(define (files)
- (append-map!
- (lambda (arg)
- (let ((p (->pathname arg)))
- (if (pathname-type p)
- (if (file-exists? p)
- (list arg)
- (error "Could not find file:" p))
- (let ((files
- (let ((com (pathname-new-type p "com")))
- (if (file-exists? com)
- (list (->namestring com)
- (->namestring (pathname-new-type p "bci")))
- (let ((bin (pathname-new-type p "bin")))
- (if (file-exists? bin)
- (list (->namestring bin))
- (error "Could not find .com nor .bin:" p))))))
- (ext (pathname-new-type p "ext")))
- (if (file-exists? ext)
- (cons (->namestring ext) files)
- files)))))
- (command-line)))
-
-(define (rewrite-optiondb name dirname in out)
- (do ((line (read-line in) (read-line in)))
- ((eof-object? line))
- (write-string line out)
- (newline out))
- (fresh-line out)
- (newline out)
- (write-string "(define-load-option '" out)
- (write-string name out)
- (newline out)
- (write-string " (standard-system-loader \"" out)
- (write-string dirname out)
- (write-string "\"))" out))
-
-(define (install-html destdir title)
- (guarantee-string destdir 'INSTALL-HTML)
- (guarantee-string title 'INSTALL-HTML)
- (let ((conf (doc-conf)))
- (let ((install (conf-words conf 'INSTALL))
- (htmldir (string-append destdir (conf-value conf 'HTMLDIR)))
- (files (files)))
- (run-command (append install files (list htmldir)))
- (rewrite-file (merge-pathnames "index.html"
- (pathname-as-directory htmldir))
- (lambda (in out)
- (rewrite-html-index (car files) title in out))))))
-
-(define (rewrite-html-index file title in out)
-
- (define (match line)
- (if (eof-object? line)
- (error "Premature end of HTML documentation index." in))
- (let ((regs (re-string-match "^<li><a href=\"\\(.*\\)\">\\(.*\\)</a></li>$"
- line)))
- (if (not regs)
- #f
- (cons (re-match-extract line regs 1)
- (re-match-extract line regs 2)))))
-
- (define (write-item file.title)
- (let ((file (car file.title))
- (title (cdr file.title)))
- (write-string (string-append "<li><a href=\""file"\">"title"</a></li>")
- out)
- (newline out)))
-
- (define (copy-prefix)
- (let* ((line (read-line in))
- (f.t (match line)))
- (if (not f.t)
- (begin
- (write-string line out)
- (newline out)
- (copy-prefix))
- f.t)))
-
- (define (copy-items)
- (let loop ((items (list (copy-prefix))))
- (let* ((line (read-line in))
- (f.t (match line)))
- (if f.t
- (loop (cons f.t items))
- (let ((items (let ((entry (assoc file items)))
- (if entry
- (delq! entry items)
- items))))
- (for-each write-item
- (sort (cons (cons file title) items)
- (lambda (f.title1 f.title2)
- (string<? (cdr f.title1)
- (cdr f.title2)))))
- line)))))
-
- (define (copy-suffix line)
- (if (not (eof-object? line))
- (begin
- (write-string line out)
- (newline out)
- (copy-suffix (read-line in)))))
-
- (copy-suffix (copy-items)))
-\f
-(define (auxdir)
- (->namestring (system-library-directory-pathname)))
-
-(define (shim-conf)
- (let-fluid load/suppress-loading-message? #t
- (lambda ()
- (load (system-library-pathname "shim-config.scm")))))
-
-(define (doc-conf)
- (let-fluid load/suppress-loading-message? #t
- (lambda ()
- (load (string-append (conf-value (shim-conf) 'INFODIR)
- "mit-scheme-doc-config.scm")))))
-
-(define (conf-values conf name)
- (let ((entry (assq name conf)))
- (if (pair? entry)
- (if (list-of-type? (cdr entry) string?)
- (cdr entry)
- (error "Configuration value not a list:" name))
- (error "Configuration value not found:" name))))
-
-(define (conf-value conf name)
- (let ((vals (conf-values conf name)))
- (if (= 1 (length vals))
- (car vals)
- (error "Configuration value not a single string:" name))))
-
-(define (conf-words conf name)
- (let ((val (conf-value conf name)))
- (parse-words val)))
-
-(define (rewrite-file name rewriter)
+(define (write-file name writer)
(let ((tmp (pathname-new-type name "tmp")))
- (call-with-exclusive-output-file tmp
- (lambda (out)
- (call-with-input-file name
- (lambda (in)
- (rewriter in out)))))
+ (call-with-exclusive-output-file tmp writer)
(rename-file tmp name)))
-(define (parse-words string)
- (burst-string string char-set:whitespace #t))
-
-(define (run-command command)
- (fresh-line)
- (write-string (decorated-string-append "" " " "" command))
- (newline)
- (let ((code (run-synchronous-subprocess
- (car command) (cdr command)
- 'working-directory (working-directory-pathname))))
- (if (not (zero? code))
- (error "Process exited with error code:" code command))))
\ No newline at end of file
+(define (rewrite-file name rewriter)
+ (write-file
+ name
+ (lambda (out)
+ (call-with-input-file name
+ (lambda (in)
+ (rewriter in out))))))
+\f
+(define (update-optiondb directory)
+ (rewrite-file
+ (merge-pathnames "optiondb.scm" directory)
+ (lambda (in out)
+ (do ((line (read-line in) (read-line in)))
+ ((or (eof-object? line)
+ (string-prefix? "(further-load-options" line))
+ (if (not (eof-object? line))
+ (begin
+ (write-string line out)
+ (newline out))))
+ (write-string line out)
+ (newline out))
+ (write-string
+ (string-append ";;; DO NOT EDIT the remainder of this file."
+ " Any edits will be clobbered."
+ "\n") out)
+ (for-each
+ (lambda (name)
+ (write-string "\n(define-load-option '" out)
+ (write-string name out)
+ (write-string "\n (standard-system-loader \"" out)
+ (write-string name out)
+ (write-string "\"))\n" out))
+ ;; plugin-names
+ (sort
+ (let loop ((files (directory-read directory))
+ (names '()))
+ (if (pair? files)
+ (loop (cdr files)
+ (if (and (file-directory? (car files))
+ ;; The only core subsystem with a make.scm:
+ (not (string=? "ffi" (pathname-name (car files))))
+ (file-exists?
+ (merge-pathnames "make.scm"
+ (pathname-as-directory
+ (car files)))))
+ (cons (pathname-name (car files)) names)
+ names))
+ names))
+ string<?)))))
+
+(define (update-html-index directory)
+ ;;(let-fluid load/suppress-loading-message? #t (lambda () (load-option 'XML)))
+ (rewrite-file
+ (merge-pathnames "index.html" directory)
+ (lambda (in out)
+ (do ((line (read-line in) (read-line in)))
+ ((or (eof-object? line)
+ (string-prefix? "<ul id=\"plugins\"" line))
+ (if (not (eof-object? line))
+ (begin
+ (write-string line out)
+ (newline out))))
+ (write-string line out)
+ (newline out))
+ (write-string (string-append "<!-- DO NOT EDIT this list."
+ " Any edits will be clobbered. -->\n") out)
+ (for-each
+ (lambda (name.title)
+ (write-string "<li><a href=\"" out)
+ (write-string (car name.title) out)
+ (write-string "\">" out)
+ (write-string (cdr name.title) out)
+ (write-string "</a></li>\n" out))
+ (sort
+ (let loop ((files (directory-read directory))
+ (names.titles '()))
+ (if (pair? files)
+ (loop (cdr files)
+ (if (and (pathname-type (car files))
+ (string=? "html" (pathname-type (car files)))
+ (string-prefix? "mit-scheme-"
+ (pathname-name (car files))))
+ (let ((name (string-tail (pathname-name (car files))
+ (string-length "mit-scheme-")))
+ (title (read-html-title (car files))))
+ (cons (cons name title) names.titles))
+ names.titles))
+ (if (pair? names.titles)
+ names.titles
+ (begin
+ (write-string "<li><i>None currently installed.</i></li>\n"
+ out)
+ '()))))
+ (lambda (a b) (string<? (car a) (car b)))))
+ ;; Skip old list.
+ (do ((line (read-line in) (read-line in)))
+ ((or (eof-object? line)
+ (string-prefix? "</ul>" line))
+ (if (eof-object? line)
+ (error "Premature end of HTML index.")
+ (begin
+ (write-string line out)
+ (newline out)))))
+ ;; Copy the rest.
+ (do ((line (read-line in) (read-line in)))
+ ((eof-object? line))
+ (write-string line out)
+ (newline out)))))
+
+(define (read-html-title pathname)
+ (call-with-input-file pathname
+ (lambda (in)
+ (let loop ()
+ (let ((line (read-line in)))
+ (if (eof-object? line)
+ (error "Could not find HTML title:" pathname)
+ (let ((regs (re-string-match "<title>\\(.*\\)</title>" line)))
+ (if (not regs)
+ (loop)
+ (re-match-extract line regs 1)))))))))
\ No newline at end of file
(parent ())
(files "build")
(export (ffi)
- compile-shim
- link-shim
- install-shim
- install-load-option
- install-html))
+ update-optiondb
+ update-html-index))
\ No newline at end of file
(receiver (cadr form)))))
(define (load-c-includes library)
- (let ((lib (system-library-pathname (string-append library "-shim.so"))))
- (let ((includes (fasload
- (pathname-new-name (pathname-new-type lib "bin")
- (string-append library "-types"))
- (not c-include-noisily?)))
- (comment (fasload
- (pathname-new-name (pathname-new-type lib "bin")
- (string-append library "-const"))
- (not c-include-noisily?))))
+ (let ((includes (fasload (system-library-pathname
+ (string-append library "-types.bin"))
+ (not c-include-noisily?)))
+ (comment (fasload
+ (system-library-pathname
+ (string-append library "-const.bin"))
+ (not c-include-noisily?))))
(let ((enums.struct-values
(if (comment? comment) (comment-expression comment)
(error:wrong-type-datum comment "a fasl comment"))))
(warn-new-cdecls includes)
(set-c-includes/enum-values! includes (car enums.struct-values))
(set-c-includes/struct-values! includes (cadr enums.struct-values))
- includes))))
+ includes)))
(define (warn-new-cdecls includes)
(for-each
--- /dev/null
+To find out what should go in this file, see "Information For
+Maintainers of GNU Software" (maintain.texi), the section called
+"Recording Changes".
+
+Matt Birkholz Everything up to the initial automake conversion.
--- /dev/null
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+\f
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+\f
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+\f
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+\f
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
--- /dev/null
+-*-Text-*-
+
+Please see the git commit log:
+
+$ git clone git://git.savannah.gnu.org/mit-scheme.git
+$ git log origin/master -- src/gdbm/ | more
+++ /dev/null
-# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
-# 2015, 2016 Massachusetts Institute of Technology
-#
-# This file is part of MIT/GNU Scheme.
-#
-# MIT/GNU Scheme is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# MIT/GNU Scheme is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with MIT/GNU Scheme; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-MIT_SCHEME_EXE = mit-scheme
-exe = '$(MIT_SCHEME_EXE)' --batch-mode
-
-all: gdbm-shim.so gdbm-types.bin gdbm-const.bin
- echo '(load "compile")' | $(exe)
-
-check:
- echo '(load "check")' | $(exe)
-
-install:
- ( echo '(begin'; \
- echo ' (install-shim "$(DESTDIR)" "gdbm")'; \
- echo ' (install-load-option "$(DESTDIR)" "gdbm2" "gdbm"))' ) \
- | $(exe) -- *.com *.bci *.pkd make.scm
-
-clean distclean maintainer-clean:
- rm -f gdbm-const.scm gdbm-const gdbm-const.c gdbm-shim.c
- rm -f gdbm-*.crf gdbm-*.fre gdbm-*.pkd
- rm -f *.o *.so *.bin *.ext *.com *.bci *.moc *.fni
- rm -f gdbm-check.db
-
-gdbm-shim.so: gdbm-shim.o gdbm-adapter.o
- echo "(link-shim)" | $(exe) -- -o $@ $^ -lgdbm
-
-gdbm-adapter.o: gdbm-adapter.c gdbm-shim.h
- echo '(compile-shim)' | $(exe) -- -c $<
-
-gdbm-shim.o: gdbm-shim.c gdbm-shim.h
- echo '(compile-shim)' | $(exe) -- -c $<
-
-gdbm-shim.c gdbm-const.c gdbm-types.bin: gdbm.cdecl gdbm-shim.h
- echo '(generate-shim "gdbm" "#include \"gdbm-shim.h\"")' | $(exe)
-
-gdbm-const.bin: gdbm-const.scm
- echo '(sf "gdbm-const")' | $(exe)
-
-gdbm-const.scm: gdbm-const
- ./gdbm-const
-
-gdbm-const: gdbm-const.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-gdbm-const.o: gdbm-const.c gdbm-shim.h
- $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
-
-.PHONY: all check install clean distclean maintainer-clean
--- /dev/null
+## Process this file with automake to produce Makefile.in
+##
+## Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+## 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+## 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+## Massachusetts Institute of Technology
+##
+## This file is part of MIT/GNU Scheme.
+##
+## MIT/GNU Scheme is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## MIT/GNU Scheme is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with MIT/GNU Scheme; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+## USA.
+
+ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST = autogen.sh
+
+MIT_SCHEME_EXE = @MIT_SCHEME_EXE@
+scmlibdir = $(libdir)/mit-scheme-@MIT_SCHEME_ARCH@
+scmlib_gdbmdir = $(scmlibdir)/gdbm
+
+scmlib_LTLIBRARIES = gdbm-shim.la
+scmlib_DATA = gdbm-types.bin gdbm-const.bin
+scmlib_gdbm_DATA = make.scm
+scmlib_gdbm_DATA += gdbm.scm gdbm.bin gdbm.bci gdbm.com
+scmlib_gdbm_DATA += gdbm-@MIT_SCHEME_OS_SUFFIX@.pkd
+
+##info_TEXINFOS = gdbm.texi
+
+AM_CPPFLAGS = -I$(scmlibdir)
+
+gdbm_shim_la_LIBADD = gdbm-adapter.lo
+gdbm_shim_la_LDFLAGS = -module -avoid-version -shared
+
+noinst_PROGRAMS = gdbm-const
+gdbm_const_SOURCES = gdbm-const.c gdbm-shim.h
+
+gdbm-shim.c gdbm-const.c gdbm-types.bin: gdbm.cdecl gdbm-shim.h
+ echo '(generate-shim "gdbm" "#include \"gdbm-shim.h\"")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+
+gdbm-const.bin: gdbm-const.scm
+ echo '(sf "gdbm-const")' | $(MIT_SCHEME_EXE) --batch-mode
+
+gdbm-const.scm: gdbm-const
+ ./gdbm-const
+
+gdbm.bin gdbm.bci gdbm.com gdbm-unx.pkd: gdbm.scm gdbm-const.bin gdbm-types.bin
+ echo '(load "compile.scm")' | $(MIT_SCHEME_EXE) --batch-mode
+
+CLEANFILES = gdbm-const* gdbm-shim.c
+CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd
+CLEANFILES += test
+
+TESTS = check-scm
+
+install-data-hook uninstall-data-hook:
+ echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
--- /dev/null
+mit-scheme-gdbm NEWS -- history of user-visible changes.
+
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+ 2015, 2016 Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301, USA.
+
+mit-scheme-gdbm 0.1 - Matt Birkholz, 2016-02-19
+===============================================
+
+* Use libtool and automake, rather than the microcode's disappearing
+ module support.
--- /dev/null
+#!/bin/sh
+
+set -e
+rm -rf m4
+mkdir m4
+autoreconf --force --install -I m4
--- /dev/null
+#!/bin/sh
+echo '(load "check.scm")' | ${MIT_SCHEME_EXE}
--- /dev/null
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([MIT/GNU Scheme gdbm plugin],
+ [0.1],
+ [bug-mit-scheme@gnu.org],
+ [mit-scheme-gdbm])
+AC_CONFIG_SRCDIR([gdbm.pkg])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_COPYRIGHT(
+[Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+ Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+USA.
+])
+
+AH_TOP([/*
+
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+ Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+USA.
+
+*/])
+
+AM_INIT_AUTOMAKE
+
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+
+dnl Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([dlopen win32-dll])
+
+AC_CHECK_HEADER([gdbm.h],[],[
+ AC_MSG_ERROR([Header file <gdbm.h> not found.])])
+
+LIBS="-lgdbm"
+
+: ${MIT_SCHEME_EXE=mit-scheme}
+MIT_SCHEME_ARCH=`echo "(display microcode-id/compiled-code-type)" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+
+AC_SUBST([LIBS])
+AC_SUBST([MIT_SCHEME_EXE])
+AC_SUBST([MIT_SCHEME_ARCH])
+AC_SUBST([MIT_SCHEME_OS_SUFFIX])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
--- /dev/null
+To find out what should go in this file, see "Information For
+Maintainers of GNU Software" (maintain.texi), the section called
+"Recording Changes".
+
+Matt Birkholz Everything up to the initial automake conversion.
--- /dev/null
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+\f
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+\f
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+\f
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+\f
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
--- /dev/null
+-*-Text-*-
+
+Please see the git commit log:
+
+$ git clone git://git.savannah.gnu.org/mit-scheme.git
+$ git log origin/master -- src/mcrypt/ | more
--- /dev/null
+## Process this file with automake to produce Makefile.in
+##
+## Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+## 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+## 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+## Massachusetts Institute of Technology
+##
+## This file is part of MIT/GNU Scheme.
+##
+## MIT/GNU Scheme is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## MIT/GNU Scheme is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with MIT/GNU Scheme; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+## USA.
+
+ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST = autogen.sh
+
+MIT_SCHEME_EXE = @MIT_SCHEME_EXE@
+scmlibdir = $(libdir)/mit-scheme-@MIT_SCHEME_ARCH@
+scmlib_mcryptdir = $(scmlibdir)/mcrypt
+
+scmlib_LTLIBRARIES = mcrypt-shim.la
+scmlib_DATA = mcrypt-types.bin mcrypt-const.bin
+scmlib_mcrypt_DATA = make.scm
+scmlib_mcrypt_DATA += mcrypt.scm mcrypt.bin mcrypt.bci mcrypt.com
+scmlib_mcrypt_DATA += mcrypt-@MIT_SCHEME_OS_SUFFIX@.pkd
+
+##info_TEXINFOS = mcrypt.texi
+
+AM_CPPFLAGS = -I$(scmlibdir)
+
+mcrypt_shim_la_LIBADD = mcrypt-adapter.lo
+mcrypt_shim_la_LDFLAGS = -module -avoid-version -shared
+
+noinst_PROGRAMS = mcrypt-const
+mcrypt_const_SOURCES = mcrypt-const.c mcrypt-shim.h
+
+mcrypt-shim.c mcrypt-const.c mcrypt-types.bin: mcrypt.cdecl mcrypt-shim.h
+ echo '(generate-shim "mcrypt" "#include \"mcrypt-shim.h\"")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+
+mcrypt-const.bin: mcrypt-const.scm
+ echo '(sf "mcrypt-const")' | $(MIT_SCHEME_EXE) --batch-mode
+
+mcrypt-const.scm: mcrypt-const
+ ./mcrypt-const
+
+mcrypt.bin mcrypt.bci mcrypt.com mcrypt-unx.pkd: \
+ mcrypt.scm mcrypt-const.bin mcrypt-types.bin
+ echo '(load "compile.scm")' | $(MIT_SCHEME_EXE) --batch-mode
+
+CLEANFILES = mcrypt-const* mcrypt-shim.c
+CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd
+CLEANFILES += test
+
+TESTS = check-scm
+
+install-data-hook uninstall-data-hook:
+ echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+++ /dev/null
-# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
-# 2015, 2016 Massachusetts Institute of Technology
-#
-# This file is part of MIT/GNU Scheme.
-#
-# MIT/GNU Scheme is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# MIT/GNU Scheme is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with MIT/GNU Scheme; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-MIT_SCHEME_EXE = mit-scheme
-exe = '$(MIT_SCHEME_EXE)' --batch-mode
-
-CFLAGS = @CFLAGS@
-LIBS = @LIBS@
-
-all: mcrypt-shim.so mcrypt-types.bin mcrypt-const.bin
- echo '(load "compile")' | $(exe)
-
-check:
- echo '(load "check")' | $(exe)
-
-install:
- ( echo '(begin'; \
- echo ' (install-shim "$(DESTDIR)" "mcrypt")'; \
- echo ' (install-load-option "$(DESTDIR)" "mcrypt"))' ) \
- | $(exe) -- *.com *.bci *.pkd make.scm
-
-clean:
- rm -f mcrypt-const.scm mcrypt-const mcrypt-const.c
- rm -f mcrypt-shim.c
- rm -f mcrypt-*.crf mcrypt-*.fre mcrypt-*.pkd
- rm -f *.o *.so *.bin *.ext *.com *.bci *.moc *.fni
- rm -f encrypted decrypted
-
-distclean: clean
- rm -f Makefile config.h config.log config.status
-
-maintainer-clean: distclean
- rm -f configure config.h.in
- rm -rf autom4te.cache
-
-mcrypt-shim.so: mcrypt-shim.o mcrypt-adapter.o
- echo "(link-shim)" | $(exe) -- -o $@ $^ $(LIBS)
-
-mcrypt-adapter.o: mcrypt-adapter.c mcrypt-shim.h
- echo '(compile-shim)' | $(exe) -- $(CFLAGS) -c $<
-
-mcrypt-shim.o: mcrypt-shim.c mcrypt-shim.h
- echo '(compile-shim)' | $(exe) -- $(CFLAGS) -c $<
-
-mcrypt-shim.c mcrypt-const.c mcrypt-types.bin: \
- mcrypt.cdecl mcrypt-shim.h
- echo '(generate-shim "mcrypt" "#include \"mcrypt-shim.h\"")' \
- | $(exe)
-
-mcrypt-const.bin: mcrypt-const.scm
- echo '(sf "mcrypt-const")' | $(exe)
-
-mcrypt-const.scm: mcrypt-const
- ./mcrypt-const
-
-mcrypt-const: mcrypt-const.o
- $(CC) -o $@ $^ $(LIBS)
-
-mcrypt-const.o: mcrypt-const.c mcrypt-shim.h
- $(CC) $(CFLAGS) -c $<
-
-.PHONY: all check install clean distclean maintainer-clean
--- /dev/null
+mit-scheme-mcrypt NEWS -- history of user-visible changes.
+
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+ 2015, 2016 Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301, USA.
+
+mit-scheme-mcrypt 0.1 - Matt Birkholz, 2016-02-19
+=================================================
+
+* Use libtool and automake, rather than the microcode's disappearing
+ module support.
--- /dev/null
+#!/bin/sh
+
+set -e
+rm -rf m4
+mkdir m4
+autoreconf --force --install -I m4
--- /dev/null
+#!/bin/sh
+echo '(load "check.scm")' | ${MIT_SCHEME_EXE}
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([MIT/GNU Scheme mcrypt interface],
+AC_PREREQ([2.69])
+AC_INIT([MIT/GNU Scheme mcrypt plugin],
[0.1],
[bug-mit-scheme@gnu.org],
[mit-scheme-mcrypt])
AC_CONFIG_SRCDIR([mcrypt.pkg])
AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
AC_COPYRIGHT(
[Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
*/])
-AC_ARG_ENABLE([smp],
- AS_HELP_STRING([---enable-smp],
- [Support multi-processing if available [[yes]]]))
-: ${with_smp='no'}
+AM_INIT_AUTOMAKE
+
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
AC_CHECK_HEADER([mcrypt.h],[],[
AC_MSG_ERROR([Header file <mcrypt.h> not found.])])
-dnl Check for SMP support (pthreads... ?).
-if test "${enable_smp}" != no; then
- AC_CHECK_HEADER([pthread.h],
- [
- AC_DEFINE([ENABLE_SMP], [1],
- [Define to 1 for Symmetric MultiProcessing support.])
- ],
- [AC_MSG_ERROR([Header file <pthread.h> not found.])])
-fi
-
MCRYPT_CFLAGS=`libmcrypt-config --cflags`
MCRYPT_LIBS=`libmcrypt-config --libs`
CFLAGS="${MCRYPT_CFLAGS} ${CFLAGS}"
LIBS="${LIBS} ${MCRYPT_LIBS}"
+: ${MIT_SCHEME_EXE=mit-scheme}
+MIT_SCHEME_ARCH=`echo "(display microcode-id/compiled-code-type)" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+
AC_SUBST([CFLAGS])
AC_SUBST([LIBS])
+AC_SUBST([MIT_SCHEME_EXE])
+AC_SUBST([MIT_SCHEME_ARCH])
+AC_SUBST([MIT_SCHEME_OS_SUFFIX])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
--- /dev/null
+To find out what should go in this file, see "Information For
+Maintainers of GNU Software" (maintain.texi), the section called
+"Recording Changes".
+
+Matt Birkholz Everything up to the initial automake conversion.
--- /dev/null
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+\f
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+\f
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+\f
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+\f
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
--- /dev/null
+-*-Text-*-
+
+Please see the git commit log:
+
+$ git clone git://git.savannah.gnu.org/mit-scheme.git
+$ git log origin/master -- src/md5/ | more
--- /dev/null
+## Process this file with automake to produce Makefile.in
+##
+## Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+## 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+## 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+## Massachusetts Institute of Technology
+##
+## This file is part of MIT/GNU Scheme.
+##
+## MIT/GNU Scheme is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## MIT/GNU Scheme is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with MIT/GNU Scheme; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+## USA.
+
+ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST = autogen.sh
+
+MIT_SCHEME_EXE = @MIT_SCHEME_EXE@
+scmlibdir = $(libdir)/mit-scheme-@MIT_SCHEME_ARCH@
+scmlib_md5dir = $(scmlibdir)/md5
+
+scmlib_LTLIBRARIES = md5-shim.la
+scmlib_DATA = md5-types.bin md5-const.bin
+scmlib_md5_DATA = make.scm
+scmlib_md5_DATA += md5.scm md5.bin md5.bci md5.com
+scmlib_md5_DATA += md5-@MIT_SCHEME_OS_SUFFIX@.pkd
+
+##info_TEXINFOS = md5.texi
+
+AM_CPPFLAGS = -I$(scmlibdir)
+
+md5_shim_la_LIBADD = md5-adapter.lo
+md5_shim_la_LDFLAGS = -module -avoid-version -shared
+
+noinst_PROGRAMS = md5-const
+md5_const_SOURCES = md5-const.c md5-shim.h
+
+md5-shim.c md5-const.c md5-types.bin: \
+ md5.cdecl md5-shim.h
+ echo '(generate-shim "md5" "#include \"md5-shim.h\"")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+
+md5-const.bin: md5-const.scm
+ echo '(sf "md5-const")' | $(MIT_SCHEME_EXE) --batch-mode
+
+md5-const.scm: md5-const
+ ./md5-const
+
+md5.bin md5.bci md5.com md5-unx.pkd: md5.scm md5-const.bin md5-types.bin
+ echo '(load "compile.scm")' | $(MIT_SCHEME_EXE) --batch-mode
+
+CLEANFILES = md5-const* md5-shim.c
+CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd
+CLEANFILES += test
+
+TESTS = check-scm
+
+install-data-hook uninstall-data-hook:
+ echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+++ /dev/null
-# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
-# 2015, 2016 Massachusetts Institute of Technology
-#
-# This file is part of MIT/GNU Scheme.
-#
-# MIT/GNU Scheme is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# MIT/GNU Scheme is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with MIT/GNU Scheme; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-MIT_SCHEME_EXE = mit-scheme
-exe = '$(MIT_SCHEME_EXE)' --batch-mode
-
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-
-all: md5-shim.so md5-types.bin md5-const.bin
- echo '(load "compile")' | $(exe)
-
-check:
- echo '(load "check")' | $(exe)
-
-install:
- ( echo '(begin'; \
- echo ' (install-shim "$(DESTDIR)" "md5")'; \
- echo ' (install-load-option "$(DESTDIR)" "md5"))' ) \
- | $(exe) -- *.com *.bci *.pkd make.scm
-
-clean:
- rm -f md5-const.scm md5-const md5-const.c md5-shim.c
- rm -f md5-*.crf md5-*.fre md5-*.pkd
- rm -f *.o *.so *.bin *.ext *.com *.bci *.moc *.fni
- rm -f sample
-
-distclean: clean
- rm -f Makefile config.h config.log config.status
-
-maintainer-clean: distclean
- rm -f configure config.h.in
- rm -rf autom4te.cache
-
-md5-shim.so: md5-shim.o md5-adapter.o
- echo "(link-shim)" | $(exe) -- $(LDFLAGS) -o $@ $^ $(LIBS)
-
-md5-adapter.o: md5-adapter.c md5-shim.h
- echo '(compile-shim)' | $(exe) -- $(CPPFLAGS) $(CFLAGS) -c $<
-
-md5-shim.o: md5-shim.c md5-shim.h
- echo '(compile-shim)' | $(exe) -- $(CPPFLAGS) $(CFLAGS) -c $<
-
-md5-shim.c md5-const.c md5-types.bin: md5.cdecl md5-shim.h
- echo '(generate-shim "md5" "#include \"md5-shim.h\"")' | $(exe)
-
-md5-const.bin: md5-const.scm
- echo '(sf "md5-const")' | $(exe)
-
-md5-const.scm: md5-const
- ./md5-const
-
-md5-const: md5-const.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-md5-const.o: md5-const.c md5-shim.h
- $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
-
-.PHONY: all check install clean distclean maintainer-clean
--- /dev/null
+mit-scheme-md5 NEWS -- history of user-visible changes.
+
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+ 2015, 2016 Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301, USA.
+
+mit-scheme-md5 0.1 - Matt Birkholz, 2016-02-19
+==============================================
+
+* Use libtool and automake, rather than the microcode's disappearing
+ module support.
--- /dev/null
+#!/bin/sh
+
+set -e
+rm -rf m4
+mkdir m4
+autoreconf --force --install -I m4
--- /dev/null
+#!/bin/sh
+echo '(load "check.scm")' | ${MIT_SCHEME_EXE}
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([MIT/GNU Scheme md5 interface],
+AC_PREREQ([2.69])
+AC_INIT([MIT/GNU Scheme md5 plugin],
[0.1],
[bug-mit-scheme@gnu.org],
[mit-scheme-md5])
AC_CONFIG_SRCDIR([md5.pkg])
AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
AC_COPYRIGHT(
[Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
*/])
+AM_INIT_AUTOMAKE
+
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+
AC_ARG_WITH([openssl],
AS_HELP_STRING([--with-openssl],
[Use OpenSSL crypto library if available [[yes]]]))
: ${with_openssl='yes'}
+dnl Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([dlopen win32-dll])
+
dnl The OpenSSL crypto library provides support for md5.
if test "${with_openssl}" != no; then
if test "${with_openssl}" != yes; then
fi
fi
+: ${MIT_SCHEME_EXE=mit-scheme}
+MIT_SCHEME_ARCH=`echo "(display microcode-id/compiled-code-type)" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+
AC_SUBST([LIBS])
AC_SUBST([CPPFLAGS])
AC_SUBST([LDFLAGS])
+AC_SUBST([MIT_SCHEME_EXE])
+AC_SUBST([MIT_SCHEME_ARCH])
+AC_SUBST([MIT_SCHEME_OS_SUFFIX])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
--- /dev/null
+To find out what should go in this file, see "Information For
+Maintainers of GNU Software" (maintain.texi), the section called
+"Recording Changes".
+
+Matt Birkholz Everything up to the initial automake conversion.
--- /dev/null
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+\f
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+\f
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+\f
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+\f
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
--- /dev/null
+-*-Text-*-
+
+Please see the git commit log:
+
+$ git clone git://git.savannah.gnu.org/mit-scheme.git
+$ git log origin/master -- src/mhash/ | more
--- /dev/null
+## Process this file with automake to produce Makefile.in
+##
+## Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+## 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+## 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+## Massachusetts Institute of Technology
+##
+## This file is part of MIT/GNU Scheme.
+##
+## MIT/GNU Scheme is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## MIT/GNU Scheme is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with MIT/GNU Scheme; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+## USA.
+
+ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST = autogen.sh
+
+MIT_SCHEME_EXE = @MIT_SCHEME_EXE@
+scmlibdir = $(libdir)/mit-scheme-@MIT_SCHEME_ARCH@
+scmlib_mhashdir = $(scmlibdir)/mhash
+
+scmlib_LTLIBRARIES = mhash-shim.la
+scmlib_DATA = mhash-types.bin mhash-const.bin
+scmlib_mhash_DATA = make.scm
+scmlib_mhash_DATA += mhash.scm mhash.bin mhash.bci mhash.com
+scmlib_mhash_DATA += mhash-@MIT_SCHEME_OS_SUFFIX@.pkd
+
+##info_TEXINFOS = mhash.texi
+
+AM_CPPFLAGS = -I$(scmlibdir)
+
+mhash_shim_la_LIBADD = mhash-adapter.lo
+mhash_shim_la_LDFLAGS = -module -avoid-version -shared
+
+noinst_PROGRAMS = mhash-const
+mhash_const_SOURCES = mhash-const.c mhash-shim.h
+
+mhash-shim.c mhash-const.c mhash-types.bin: mhash.cdecl mhash-shim.h
+ echo '(generate-shim "mhash" "#include \"mhash-shim.h\"")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+
+mhash-const.bin: mhash-const.scm
+ echo '(sf "mhash-const")' | $(MIT_SCHEME_EXE) --batch-mode
+
+mhash-const.scm: mhash-const
+ ./mhash-const
+
+mhash.bin mhash.bci mhash.com mhash-unx.pkd: \
+ mhash.scm mhash-const.bin mhash-types.bin
+ echo '(load "compile.scm")' | $(MIT_SCHEME_EXE) --batch-mode
+
+CLEANFILES = mhash-const* mhash-shim.c
+CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd
+CLEANFILES += test
+
+TESTS = check-scm
+
+install-data-hook uninstall-data-hook:
+ echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+++ /dev/null
-# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
-# 2015, 2016 Massachusetts Institute of Technology
-#
-# This file is part of MIT/GNU Scheme.
-#
-# MIT/GNU Scheme is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# MIT/GNU Scheme is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with MIT/GNU Scheme; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-MIT_SCHEME_EXE = mit-scheme
-exe = '$(MIT_SCHEME_EXE)' --batch-mode
-
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-
-all: mhash-shim.so mhash-types.bin mhash-const.bin
- echo '(load "compile")' | $(exe)
-
-check:
- echo '(load "check")' | $(exe)
-
-install:
- ( echo '(begin'; \
- echo ' (install-shim "$(DESTDIR)" "mhash")'; \
- echo ' (install-load-option "$(DESTDIR)" "mhash"))' ) \
- | $(exe) -- *.com *.bci *.pkd make.scm
-
-clean:
- rm -f mhash-const.scm mhash-const mhash-const.c mhash-shim.c
- rm -f mhash-*.crf mhash-*.fre mhash-*.pkd
- rm -f *.o *.so *.bin *.ext *.com *.bci *.moc *.fni
- rm -f sample
-
-distclean: clean
- rm -f Makefile config.h config.log config.status
-
-maintainer-clean: distclean
- rm -f configure config.h.in
- rm -rf autom4te.cache
-
-mhash-shim.so: mhash-shim.o mhash-adapter.o
- echo "(link-shim)" | $(exe) -- $(LDFLAGS) -o $@ $^ $(LIBS)
-
-mhash-adapter.o: mhash-adapter.c mhash-shim.h
- echo '(compile-shim)' | $(exe) -- $(CPPFLAGS) $(CFLAGS) -c $<
-
-mhash-shim.o: mhash-shim.c mhash-shim.h
- echo '(compile-shim)' | $(exe) -- $(CPPFLAGS) $(CFLAGS) -c $<
-
-mhash-shim.c mhash-const.c mhash-types.bin: mhash.cdecl mhash-shim.h
- echo '(generate-shim "mhash" "#include \"mhash-shim.h\"")' | $(exe)
-
-mhash-const.bin: mhash-const.scm
- echo '(sf "mhash-const")' | $(exe)
-
-mhash-const.scm: mhash-const
- ./mhash-const
-
-mhash-const: mhash-const.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-mhash-const.o: mhash-const.c mhash-shim.h
- $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
-
-.PHONY: all check install clean distclean maintainer-clean
--- /dev/null
+mit-scheme-mhash NEWS -- history of user-visible changes.
+
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+ 2015, 2016 Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301, USA.
+
+mit-scheme-mhash 0.1 - Matt Birkholz, 2016-02-19
+================================================
+
+* Use libtool and automake, rather than the microcode's disappearing
+ module support.
--- /dev/null
+#!/bin/sh
+
+set -e
+rm -rf m4
+mkdir m4
+autoreconf --force --install -I m4
--- /dev/null
+#!/bin/sh
+echo '(load "check.scm")' | ${MIT_SCHEME_EXE}
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([MIT/GNU Scheme mhash interface],
+AC_PREREQ([2.69])
+AC_INIT([MIT/GNU Scheme mhash plugin],
[0.1],
[bug-mit-scheme@gnu.org],
[mit-scheme-mhash])
AC_CONFIG_SRCDIR([mhash.pkg])
AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
AC_COPYRIGHT(
[Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
*/])
-AC_CHECK_HEADER([mhash.h],[
- AC_DEFINE([HAVE_MHASH_H], [1],
- [Define to 1 if you have the <mhash.h> header file.])
- AC_CHECK_LIB([mhash], [mhash_count],[
- AC_DEFINE([HAVE_LIBMHASH], [1],
- [Define to 1 if you have the `mhash' library (-lmhash).])
- LIBS="-lmhash"
- ])
-],[AC_MSG_ERROR([Header file <mhash.h> not found.])])
+AM_INIT_AUTOMAKE
+
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+
+dnl Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([dlopen win32-dll])
+
+AC_CHECK_HEADER([mhash.h],[],[
+ AC_MSG_ERROR([Header file <mhash.h> not found.])])
+
+LIBS="-lmhash"
+
+: ${MIT_SCHEME_EXE=mit-scheme}
+MIT_SCHEME_ARCH=`echo "(display microcode-id/compiled-code-type)" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
AC_SUBST([LIBS])
AC_SUBST([CPPFLAGS])
AC_SUBST([LDFLAGS])
+AC_SUBST([MIT_SCHEME_EXE])
+AC_SUBST([MIT_SCHEME_ARCH])
+AC_SUBST([MIT_SCHEME_OS_SUFFIX])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
#include "config.h"
-/* If mhash.h unavailable, ignore it. This helps
- "makegen/makegen.scm" work properly on systems lacking this
- library. */
-#ifdef HAVE_MHASH_H
-# include <mhash.h>
-#endif
+#include <mhash.h>
extern void do_mhash (MHASH thread, const char *string, int start, int end);
extern void do_mhash_end (MHASH context, char *string, size_t size);
aux_PROGRAMS = @AUX_PROGRAMS@
aux_LIBS = $(MODULE_TARGETS)
-aux_DATA = shim-config.scm @AUX_DATA@
+aux_DATA = @AUX_DATA@
EXTRA_PROGRAMS = findprim
scheme_SOURCES = $(STD_SOURCES) usrdef.c $(LIARC_SOURCES)
done
$(INSTALL_DATA) pruxffi.h $(DESTDIR)$(AUXDIR)/mit-scheme.h
-shim-config.scm:
- @echo "Saving shim compile/link/install configuration."
- @ ( echo "(QUOTE"; \
- echo " ((COMPILE-SHIM \"@CC@ @DEFS@ @SCHEME_DEFS@ @CPPFLAGS@\""; \
- echo " \"@CFLAGS@ @MODULE_CFLAGS@\")"; \
- echo " (LINK-SHIM \"@CCLD@ @LDFLAGS@\" \"@MODULE_LDFLAGS@\")"; \
- echo " (INSTALL \"@INSTALL_DATA@\")"; \
- echo " (INFODIR \"$(infodir)/\")))" ) >shim-config.scm
-
install-include:
$(mkinstalldirs) $(DESTDIR)$(AUXDIR)
$(INSTALL_SCRIPT) liarc-cc $(DESTDIR)$(AUXDIR)/.
unspecific
(let* ((library (%alien-function/library afunc))
(name (%alien-function/name afunc))
- (pathname (system-library-pathname
- (pathname-new-type (string-append library"-shim")
- "so")))
+ (pathname (dlopen-pathname library))
(handle (or (find-dld-handle
(lambda (h)
(pathname=? pathname (dld-handle-pathname h))))
(error:bad-range-argument afunc 'alien-function-cache!))
(set-%alien-function/band-id! afunc band-id))))
+(define (dlopen-pathname library)
+ (or (libtool-pathname library)
+ (system-library-pathname
+ (pathname-new-type (string-append library"-shim")
+ "so"))
+ (error "Could not find module:" library)))
+
+(define (libtool-pathname library)
+ (let ((la-pathname (system-library-pathname
+ (pathname-new-type (string-append library"-shim")
+ "la"))))
+ (let ((dlname (libtool-dlname la-pathname))
+ (dirname (directory-pathname la-pathname)))
+
+ (define (existing-file name)
+ (let ((p (merge-pathnames name dirname)))
+ (and (file-exists? p)
+ p)))
+
+ (or (existing-file dlname)
+ (existing-file (string-append ".libs/"dlname))))))
+
+(define (libtool-dlname la-pathname)
+ (call-with-input-file la-pathname
+ (lambda (in)
+ (let loop ()
+ (let ((line (read-line in)))
+ (cond ((eof-object? line)
+ (error "Could not find dlname setting:" la-pathname))
+ ((string-prefix? "dlname='" line)
+ (let* ((start 8)
+ (end (string-length line))
+ (close (substring-find-next-char line start end #\')))
+ (if close
+ (substring line start close)
+ (error "No closing delimiter in dlname setting:"
+ line la-pathname))))
+ (else (loop))))))))
+
(define-integrable (c-peek-cstring alien)
((ucode-primitive c-peek-cstring 2) alien 0))
(define (generate-shim library #!optional prefix)
(load-ffi-quietly)
- ((environment-lookup (->environment '(ffi)) 'c-generate) library prefix))
-
-(define (compile-shim)
- (load-ffi-quietly)
- ((environment-lookup (->environment '(ffi)) 'compile-shim)))
-
-(define (link-shim)
- (load-ffi-quietly)
- ((environment-lookup (->environment '(ffi)) 'link-shim)))
-
-(define (install-shim destdir library)
- (load-ffi-quietly)
- ((environment-lookup (->environment '(ffi)) 'install-shim) destdir library))
+ (c-generate library prefix))
-(define (install-load-option destdir name #!optional directory)
+(define (update-optiondb directory)
(load-ffi-quietly)
- ((environment-lookup (->environment '(ffi)) 'install-load-option)
- destdir name directory))
+ ((environment-lookup (->environment '(ffi)) 'update-optiondb) directory))
-(define (install-html destdir title)
+(define (update-html-index directory)
(load-ffi-quietly)
- ((environment-lookup (->environment '(ffi)) 'install-html) destdir title))
+ ((environment-lookup (->environment '(ffi)) 'update-html-index) directory))
(define (load-ffi-quietly)
(if (not (name->package '(FFI)))
""))
"")))
"-"
- (case (if (default-object? os-type)
- microcode-id/operating-system
- os-type)
- ((NT) "w32")
- ((OS/2) "os2")
- ((UNIX) "unx")
- (else "unk"))))
+ (microcode-id/operating-system-suffix os-type)))
"pkd")))
\f
(define-integrable (make-package-file tag version descriptions loads)
microcode-id/machine-type
microcode-id/operating-system
microcode-id/operating-system-name
+ microcode-id/operating-system-suffix
microcode-id/operating-system-variant
microcode-id/stack-type
microcode-id/tty-x-size
de-register-c-callback
outf-error
generate-shim
- compile-shim
- link-shim
- install-shim
- install-load-option
- install-html)
+ update-optiondb
+ update-html-index)
(initialization (initialize-package!)))
(define-package (runtime program-copier)
(define microcode-id/stack-type)
(define microcode-id/machine-type)
(define microcode-id/compiled-code-type)
+
+(define (microcode-id/operating-system-suffix #!optional os-type)
+ (case (if (default-object? os-type)
+ microcode-id/operating-system
+ os-type)
+ ((NT) "w32")
+ ((OS/2) "os2")
+ ((UNIX) "unx")
+ (else (error "Unknown operating system:" os-type))))
\f
(define-integrable fixed-objects-slot 15)
(define non-object-slot)
+++ /dev/null
-# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
-# 2015, 2016 Massachusetts Institute of Technology
-#
-# This file is part of MIT/GNU Scheme.
-#
-# MIT/GNU Scheme is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# MIT/GNU Scheme is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with MIT/GNU Scheme; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-HOST=../../src/microcode/scheme --library ../../src/lib --batch-mode
-
-all: ffi-test-shim.so ffi-test-types.bin ffi-test-const.bin
-
-ffi-test-shim.so: ffi-test-shim.o ffi-test.o
- echo "(link-shim)" | $(HOST) -- -o $@ $^
-
-ffi-test-shim.o: ffi-test-shim.c ffi-test.h
- echo "(compile-shim)" | $(HOST) -- -c $<
-
-ffi-test-shim.c ffi-test-const.c ffi-test-types.bin: ffi-test.cdecl
- echo '(generate-shim "ffi-test" "#include \"ffi-test.h\"")' | $(HOST)
-
-ffi-test-const.bin: ffi-test-const.scm
- echo '(sf "ffi-test-const")' | $(HOST)
-
-ffi-test-const.scm: ffi-test-const
- ./ffi-test-const
-
-ffi-test-const: ffi-test-const.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-ffi-test-const.o: ffi-test-const.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
-
-# The test library itself.
-
-ffi-test.o: ffi-test.c ffi-test.h
- echo "(compile-shim)" | $(HOST) -- -o $@ -c $<
-
-.PHONY: all
--- /dev/null
+## Process this file with automake to produce Makefile.in
+##
+## Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+## 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+## 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+## Massachusetts Institute of Technology
+##
+## This file is part of MIT/GNU Scheme.
+##
+## MIT/GNU Scheme is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## MIT/GNU Scheme is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with MIT/GNU Scheme; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+## USA.
+
+ACLOCAL_AMFLAGS = -I m4
+
+MIT_SCHEME_EXE = @MIT_SCHEME_EXE@
+scmlibdir = $(libdir)/mit-scheme-@MIT_SCHEME_ARCH@
+
+scmlib_LTLIBRARIES = ffi-test-shim.la
+scmlib_DATA = ffi-test-types.bin ffi-test-const.bin
+
+AM_CPPFLAGS = -I../../src/lib
+
+ffi_test_shim_la_LIBADD = ffi-test.lo
+ffi_test_shim_la_LDFLAGS = -module -avoid-version -shared
+
+noinst_PROGRAMS = ffi-test-const
+ffi_test_const_SOURCES = ffi-test-const.c ffi-test-shim.h
+
+ffi-test-shim.c ffi-test-const.c ffi-test-types.bin: ffi-test.cdecl ffi-test.h
+ echo '(generate-shim "ffi-test" "#include \"ffi-test.h\"")' \
+ | $(MIT_SCHEME_EXE) --batch-mode
+
+ffi-test-const.bin: ffi-test-const.scm
+ echo '(sf "ffi-test-const")' | $(MIT_SCHEME_EXE) --batch-mode
+
+ffi-test-const.scm: ffi-test-const
+ ./ffi-test-const
+
+ffi-test.bin ffi-test.bci ffi-test.com ffi-test-unx.pkd: \
+ ffi-test.scm ffi-test-const.bin ffi-test-types.bin
+ echo '(load "compile.scm")' | $(MIT_SCHEME_EXE) --batch-mode
+
+CLEANFILES = ffi-test-const* ffi-test-shim.c
+CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd
+
+TESTS = test-ffi
--- /dev/null
+#!/bin/sh
+
+set -e
+./autogen.sh
+./configure
+make all
--- /dev/null
+#!/bin/sh
+
+set -e
+rm -rf m4
+mkdir m4
+AUTOMAKE="automake --foreign"
+export AUTOMAKE
+autoreconf --force --install -I m4
--- /dev/null
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([MIT/GNU Scheme test-ffi plugin],
+ [0.1],
+ [bug-mit-scheme@gnu.org],
+ [mit-scheme-test-ffi])
+AC_CONFIG_SRCDIR([ffi-test.cdecl])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_COPYRIGHT(
+[Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+ Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+USA.
+])
+
+AH_TOP([/*
+
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+ Massachusetts Institute of Technology
+
+This file is part of MIT/GNU Scheme.
+
+MIT/GNU Scheme is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+MIT/GNU Scheme is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with MIT/GNU Scheme; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+USA.
+
+*/])
+
+AM_INIT_AUTOMAKE
+
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CPP
+
+dnl Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([dlopen win32-dll])
+
+MIT_SCHEME_EXE="../../src/microcode/scheme --library ../../src/lib"
+MIT_SCHEME_ARCH=`echo "(display microcode-id/compiled-code-type)" \
+ | ${MIT_SCHEME_EXE} --batch-mode`
+
+AC_SUBST([MIT_SCHEME_EXE])
+AC_SUBST([MIT_SCHEME_ARCH])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
--- /dev/null
+#!/bin/sh
+echo '(load "test-ffi.scm")' \
+| ../../src/microcode/scheme --library ../../src/lib --batch-mode
(fresh-line port)
(write-string "make all in tests/ffi/" port)
(newline port))
- (let ((status (run-synchronous-subprocess "make" (list "all"))))
+ (let ((status (run-synchronous-subprocess "sh" '("./autobuild.sh"))))
(if (not (zero? status))
(begin
(write-string "../tests/ffi/test-ffi.scm:0: Test FFI build failed."