From 2d9241db7dbc39735d77b2eb7aa3b4936ac734c1 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Mon, 22 Feb 2016 22:28:13 -0700 Subject: [PATCH] ffi: Support libtool. Convert plugins and test-ffi to automake. Remove compile-shim, link-shim, install-shim. Thus the microcode's shared object (module) build configuration is no longer needed in AUXDIR/shim-config.scm. Replace install-load-option and install-html with update-optiondb and update-html-index, which can be used after an install OR an uninstall. --- dist/make-src-files | 14 +- doc/ffi/ffi.texinfo | 5 +- doc/ffi/prhello-Makefile | 20 +- doc/ffi/prhello.cdecl | 6 +- src/Setup.sh | 1 - src/blowfish/AUTHORS | 5 + src/blowfish/COPYING | 482 +++++++++++++++++++++++++++ src/blowfish/ChangeLog | 6 + src/blowfish/Makefile.am | 71 ++++ src/blowfish/Makefile.in | 83 ----- src/blowfish/NEWS | 29 ++ src/blowfish/autogen.sh | 6 + src/blowfish/check-scm | 2 + src/blowfish/configure.ac | 24 +- src/ffi/build.scm | 321 +++++++----------- src/ffi/ffi.pkg | 7 +- src/ffi/syntax.scm | 18 +- src/gdbm/AUTHORS | 5 + src/gdbm/COPYING | 482 +++++++++++++++++++++++++++ src/gdbm/ChangeLog | 6 + src/gdbm/Makefile | 68 ---- src/gdbm/Makefile.am | 69 ++++ src/gdbm/NEWS | 29 ++ src/gdbm/autogen.sh | 6 + src/gdbm/check-scm | 2 + src/gdbm/configure.ac | 89 +++++ src/mcrypt/AUTHORS | 5 + src/mcrypt/COPYING | 482 +++++++++++++++++++++++++++ src/mcrypt/ChangeLog | 6 + src/mcrypt/Makefile.am | 70 ++++ src/mcrypt/Makefile.in | 81 ----- src/mcrypt/NEWS | 29 ++ src/mcrypt/autogen.sh | 6 + src/mcrypt/check-scm | 2 + src/mcrypt/configure.ac | 33 +- src/md5/AUTHORS | 5 + src/md5/COPYING | 482 +++++++++++++++++++++++++++ src/md5/ChangeLog | 6 + src/md5/Makefile.am | 70 ++++ src/md5/Makefile.in | 80 ----- src/md5/NEWS | 29 ++ src/md5/autogen.sh | 6 + src/md5/check-scm | 2 + src/md5/configure.ac | 24 +- src/mhash/AUTHORS | 5 + src/mhash/COPYING | 482 +++++++++++++++++++++++++++ src/mhash/ChangeLog | 6 + src/mhash/Makefile.am | 70 ++++ src/mhash/Makefile.in | 80 ----- src/mhash/NEWS | 29 ++ src/mhash/autogen.sh | 6 + src/mhash/check-scm | 2 + src/mhash/configure.ac | 37 +- src/mhash/mhash-shim.h | 7 +- src/microcode/makegen/Makefile.in.in | 11 +- src/runtime/ffi.scm | 66 ++-- src/runtime/packag.scm | 8 +- src/runtime/runtime.pkg | 8 +- src/runtime/utabs.scm | 9 + tests/ffi/Makefile | 53 --- tests/ffi/Makefile.am | 58 ++++ tests/ffi/autobuild.sh | 6 + tests/ffi/autogen.sh | 8 + tests/ffi/configure.ac | 79 +++++ tests/ffi/test-ffi | 3 + tests/ffi/test-ffi.scm | 2 +- 66 files changed, 3549 insertions(+), 760 deletions(-) create mode 100644 src/blowfish/AUTHORS create mode 100644 src/blowfish/COPYING create mode 100644 src/blowfish/ChangeLog create mode 100644 src/blowfish/Makefile.am delete mode 100644 src/blowfish/Makefile.in create mode 100644 src/blowfish/NEWS create mode 100755 src/blowfish/autogen.sh create mode 100755 src/blowfish/check-scm create mode 100644 src/gdbm/AUTHORS create mode 100644 src/gdbm/COPYING create mode 100644 src/gdbm/ChangeLog delete mode 100644 src/gdbm/Makefile create mode 100644 src/gdbm/Makefile.am create mode 100644 src/gdbm/NEWS create mode 100755 src/gdbm/autogen.sh create mode 100755 src/gdbm/check-scm create mode 100644 src/gdbm/configure.ac create mode 100644 src/mcrypt/AUTHORS create mode 100644 src/mcrypt/COPYING create mode 100644 src/mcrypt/ChangeLog create mode 100644 src/mcrypt/Makefile.am delete mode 100644 src/mcrypt/Makefile.in create mode 100644 src/mcrypt/NEWS create mode 100755 src/mcrypt/autogen.sh create mode 100755 src/mcrypt/check-scm create mode 100644 src/md5/AUTHORS create mode 100644 src/md5/COPYING create mode 100644 src/md5/ChangeLog create mode 100644 src/md5/Makefile.am delete mode 100644 src/md5/Makefile.in create mode 100644 src/md5/NEWS create mode 100755 src/md5/autogen.sh create mode 100755 src/md5/check-scm create mode 100644 src/mhash/AUTHORS create mode 100644 src/mhash/COPYING create mode 100644 src/mhash/ChangeLog create mode 100644 src/mhash/Makefile.am delete mode 100644 src/mhash/Makefile.in create mode 100644 src/mhash/NEWS create mode 100755 src/mhash/autogen.sh create mode 100755 src/mhash/check-scm delete mode 100644 tests/ffi/Makefile create mode 100644 tests/ffi/Makefile.am create mode 100755 tests/ffi/autobuild.sh create mode 100755 tests/ffi/autogen.sh create mode 100644 tests/ffi/configure.ac create mode 100755 tests/ffi/test-ffi diff --git a/dist/make-src-files b/dist/make-src-files index 8cfc4014f..2cd092aab 100755 --- a/dist/make-src-files +++ b/dist/make-src-files @@ -57,19 +57,11 @@ notify "Configuring the distribution directory" 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 diff --git a/doc/ffi/ffi.texinfo b/doc/ffi/ffi.texinfo index d8528f1af..be653a38c 100644 --- a/doc/ffi/ffi.texinfo +++ b/doc/ffi/ffi.texinfo @@ -630,7 +630,7 @@ This script will produce three files: 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 @@ -653,6 +653,9 @@ installing a shim for the example ``Hello, World!'' program. @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 diff --git a/doc/ffi/prhello-Makefile b/doc/ffi/prhello-Makefile index 7a023a251..cbe286c4d 100644 --- a/doc/ffi/prhello-Makefile +++ b/doc/ffi/prhello-Makefile @@ -1,6 +1,12 @@ +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* @@ -8,12 +14,10 @@ clean: 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 ")' \ @@ -26,7 +30,7 @@ prhello-const.scm: prhello-const ./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 $< diff --git a/doc/ffi/prhello.cdecl b/doc/ffi/prhello.cdecl index 91a85df34..10f3abeaa 100644 --- a/doc/ffi/prhello.cdecl +++ b/doc/ffi/prhello.cdecl @@ -50,12 +50,12 @@ C declarations for prhello.scm. |# (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 diff --git a/src/Setup.sh b/src/Setup.sh index cc039b34f..3aff4f0ee 100755 --- a/src/Setup.sh +++ b/src/Setup.sh @@ -82,7 +82,6 @@ OTHER_SUBDIRS="6001 compiler rcs runtime win32 xdoc microcode" 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 diff --git a/src/blowfish/AUTHORS b/src/blowfish/AUTHORS new file mode 100644 index 000000000..82b51044c --- /dev/null +++ b/src/blowfish/AUTHORS @@ -0,0 +1,5 @@ +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. diff --git a/src/blowfish/COPYING b/src/blowfish/COPYING new file mode 100644 index 000000000..bf50f20de --- /dev/null +++ b/src/blowfish/COPYING @@ -0,0 +1,482 @@ + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + + Copyright (C) + + 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. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/src/blowfish/ChangeLog b/src/blowfish/ChangeLog new file mode 100644 index 000000000..2c012f019 --- /dev/null +++ b/src/blowfish/ChangeLog @@ -0,0 +1,6 @@ +-*-Text-*- + +Please see the git commit log: + +$ git clone git://git.savannah.gnu.org/mit-scheme.git +$ git log origin/master -- src/blowfish/ | more diff --git a/src/blowfish/Makefile.am b/src/blowfish/Makefile.am new file mode 100644 index 000000000..e5cb8c035 --- /dev/null +++ b/src/blowfish/Makefile.am @@ -0,0 +1,71 @@ +## 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 diff --git a/src/blowfish/Makefile.in b/src/blowfish/Makefile.in deleted file mode 100644 index 76148844a..000000000 --- a/src/blowfish/Makefile.in +++ /dev/null @@ -1,83 +0,0 @@ -# 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 diff --git a/src/blowfish/NEWS b/src/blowfish/NEWS new file mode 100644 index 000000000..3404bb9c5 --- /dev/null +++ b/src/blowfish/NEWS @@ -0,0 +1,29 @@ +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. diff --git a/src/blowfish/autogen.sh b/src/blowfish/autogen.sh new file mode 100755 index 000000000..8af4031c7 --- /dev/null +++ b/src/blowfish/autogen.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e +rm -rf m4 +mkdir m4 +autoreconf --force --install -I m4 diff --git a/src/blowfish/check-scm b/src/blowfish/check-scm new file mode 100755 index 000000000..4f89998ed --- /dev/null +++ b/src/blowfish/check-scm @@ -0,0 +1,2 @@ +#!/bin/sh +echo '(load "check.scm")' | ${MIT_SCHEME_EXE} diff --git a/src/blowfish/configure.ac b/src/blowfish/configure.ac index 519cd9726..44f404710 100644 --- a/src/blowfish/configure.ac +++ b/src/blowfish/configure.ac @@ -1,11 +1,13 @@ 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, @@ -57,11 +59,22 @@ USA. */]) +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 @@ -80,8 +93,17 @@ if test "${with_openssl}" != no; 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 diff --git a/src/ffi/build.scm b/src/ffi/build.scm index 3ee358fc6..3fd839a3e 100644 --- a/src/ffi/build.scm +++ b/src/ffi/build.scm @@ -27,205 +27,128 @@ USA. ;;;; 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 "^
  • \\(.*\\)
  • $" - 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 "
  • "title"
  • ") - 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) - (stringnamestring (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)))))) + +(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\n") out) + (for-each + (lambda (name.title) + (write-string "
  • " out) + (write-string (cdr name.title) out) + (write-string "
  • \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 "
  • None currently installed.
  • \n" + out) + '())))) + (lambda (a b) (string" 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 "\\(.*\\)" line))) + (if (not regs) + (loop) + (re-match-extract line regs 1))))))))) \ No newline at end of file diff --git a/src/ffi/ffi.pkg b/src/ffi/ffi.pkg index 0e4f0e31b..b3943fd73 100644 --- a/src/ffi/ffi.pkg +++ b/src/ffi/ffi.pkg @@ -41,8 +41,5 @@ FFI System Packaging |# (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 diff --git a/src/ffi/syntax.scm b/src/ffi/syntax.scm index a0766d769..758595852 100644 --- a/src/ffi/syntax.scm +++ b/src/ffi/syntax.scm @@ -66,22 +66,20 @@ USA. (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 diff --git a/src/gdbm/AUTHORS b/src/gdbm/AUTHORS new file mode 100644 index 000000000..82b51044c --- /dev/null +++ b/src/gdbm/AUTHORS @@ -0,0 +1,5 @@ +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. diff --git a/src/gdbm/COPYING b/src/gdbm/COPYING new file mode 100644 index 000000000..bf50f20de --- /dev/null +++ b/src/gdbm/COPYING @@ -0,0 +1,482 @@ + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + + Copyright (C) + + 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. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/src/gdbm/ChangeLog b/src/gdbm/ChangeLog new file mode 100644 index 000000000..a0e71b1fb --- /dev/null +++ b/src/gdbm/ChangeLog @@ -0,0 +1,6 @@ +-*-Text-*- + +Please see the git commit log: + +$ git clone git://git.savannah.gnu.org/mit-scheme.git +$ git log origin/master -- src/gdbm/ | more diff --git a/src/gdbm/Makefile b/src/gdbm/Makefile deleted file mode 100644 index b5898aae3..000000000 --- a/src/gdbm/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# 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 diff --git a/src/gdbm/Makefile.am b/src/gdbm/Makefile.am new file mode 100644 index 000000000..f19e4008b --- /dev/null +++ b/src/gdbm/Makefile.am @@ -0,0 +1,69 @@ +## 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 diff --git a/src/gdbm/NEWS b/src/gdbm/NEWS new file mode 100644 index 000000000..d4c75d8db --- /dev/null +++ b/src/gdbm/NEWS @@ -0,0 +1,29 @@ +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. diff --git a/src/gdbm/autogen.sh b/src/gdbm/autogen.sh new file mode 100755 index 000000000..8af4031c7 --- /dev/null +++ b/src/gdbm/autogen.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e +rm -rf m4 +mkdir m4 +autoreconf --force --install -I m4 diff --git a/src/gdbm/check-scm b/src/gdbm/check-scm new file mode 100755 index 000000000..4f89998ed --- /dev/null +++ b/src/gdbm/check-scm @@ -0,0 +1,2 @@ +#!/bin/sh +echo '(load "check.scm")' | ${MIT_SCHEME_EXE} diff --git a/src/gdbm/configure.ac b/src/gdbm/configure.ac new file mode 100644 index 000000000..f8c2dd4a2 --- /dev/null +++ b/src/gdbm/configure.ac @@ -0,0 +1,89 @@ +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 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 diff --git a/src/mcrypt/AUTHORS b/src/mcrypt/AUTHORS new file mode 100644 index 000000000..82b51044c --- /dev/null +++ b/src/mcrypt/AUTHORS @@ -0,0 +1,5 @@ +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. diff --git a/src/mcrypt/COPYING b/src/mcrypt/COPYING new file mode 100644 index 000000000..bf50f20de --- /dev/null +++ b/src/mcrypt/COPYING @@ -0,0 +1,482 @@ + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + + Copyright (C) + + 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. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/src/mcrypt/ChangeLog b/src/mcrypt/ChangeLog new file mode 100644 index 000000000..16a94a103 --- /dev/null +++ b/src/mcrypt/ChangeLog @@ -0,0 +1,6 @@ +-*-Text-*- + +Please see the git commit log: + +$ git clone git://git.savannah.gnu.org/mit-scheme.git +$ git log origin/master -- src/mcrypt/ | more diff --git a/src/mcrypt/Makefile.am b/src/mcrypt/Makefile.am new file mode 100644 index 000000000..fe30bad10 --- /dev/null +++ b/src/mcrypt/Makefile.am @@ -0,0 +1,70 @@ +## 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 diff --git a/src/mcrypt/Makefile.in b/src/mcrypt/Makefile.in deleted file mode 100644 index 7511cfd95..000000000 --- a/src/mcrypt/Makefile.in +++ /dev/null @@ -1,81 +0,0 @@ -# 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 diff --git a/src/mcrypt/NEWS b/src/mcrypt/NEWS new file mode 100644 index 000000000..256ee2f64 --- /dev/null +++ b/src/mcrypt/NEWS @@ -0,0 +1,29 @@ +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. diff --git a/src/mcrypt/autogen.sh b/src/mcrypt/autogen.sh new file mode 100755 index 000000000..8af4031c7 --- /dev/null +++ b/src/mcrypt/autogen.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e +rm -rf m4 +mkdir m4 +autoreconf --force --install -I m4 diff --git a/src/mcrypt/check-scm b/src/mcrypt/check-scm new file mode 100755 index 000000000..4f89998ed --- /dev/null +++ b/src/mcrypt/check-scm @@ -0,0 +1,2 @@ +#!/bin/sh +echo '(load "check.scm")' | ${MIT_SCHEME_EXE} diff --git a/src/mcrypt/configure.ac b/src/mcrypt/configure.ac index f268396fc..8d5828a68 100644 --- a/src/mcrypt/configure.ac +++ b/src/mcrypt/configure.ac @@ -1,11 +1,13 @@ 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, @@ -57,30 +59,31 @@ USA. */]) -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 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 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 diff --git a/src/md5/AUTHORS b/src/md5/AUTHORS new file mode 100644 index 000000000..82b51044c --- /dev/null +++ b/src/md5/AUTHORS @@ -0,0 +1,5 @@ +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. diff --git a/src/md5/COPYING b/src/md5/COPYING new file mode 100644 index 000000000..bf50f20de --- /dev/null +++ b/src/md5/COPYING @@ -0,0 +1,482 @@ + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + + Copyright (C) + + 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. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/src/md5/ChangeLog b/src/md5/ChangeLog new file mode 100644 index 000000000..99a1cfc71 --- /dev/null +++ b/src/md5/ChangeLog @@ -0,0 +1,6 @@ +-*-Text-*- + +Please see the git commit log: + +$ git clone git://git.savannah.gnu.org/mit-scheme.git +$ git log origin/master -- src/md5/ | more diff --git a/src/md5/Makefile.am b/src/md5/Makefile.am new file mode 100644 index 000000000..7ac7bd23a --- /dev/null +++ b/src/md5/Makefile.am @@ -0,0 +1,70 @@ +## 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 diff --git a/src/md5/Makefile.in b/src/md5/Makefile.in deleted file mode 100644 index 2edb708a7..000000000 --- a/src/md5/Makefile.in +++ /dev/null @@ -1,80 +0,0 @@ -# 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 diff --git a/src/md5/NEWS b/src/md5/NEWS new file mode 100644 index 000000000..701dd4687 --- /dev/null +++ b/src/md5/NEWS @@ -0,0 +1,29 @@ +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. diff --git a/src/md5/autogen.sh b/src/md5/autogen.sh new file mode 100755 index 000000000..8af4031c7 --- /dev/null +++ b/src/md5/autogen.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e +rm -rf m4 +mkdir m4 +autoreconf --force --install -I m4 diff --git a/src/md5/check-scm b/src/md5/check-scm new file mode 100755 index 000000000..4f89998ed --- /dev/null +++ b/src/md5/check-scm @@ -0,0 +1,2 @@ +#!/bin/sh +echo '(load "check.scm")' | ${MIT_SCHEME_EXE} diff --git a/src/md5/configure.ac b/src/md5/configure.ac index bb9073464..6e56c25a3 100644 --- a/src/md5/configure.ac +++ b/src/md5/configure.ac @@ -1,11 +1,13 @@ 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, @@ -57,11 +59,22 @@ USA. */]) +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 @@ -80,8 +93,17 @@ if test "${with_openssl}" != no; 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 diff --git a/src/mhash/AUTHORS b/src/mhash/AUTHORS new file mode 100644 index 000000000..82b51044c --- /dev/null +++ b/src/mhash/AUTHORS @@ -0,0 +1,5 @@ +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. diff --git a/src/mhash/COPYING b/src/mhash/COPYING new file mode 100644 index 000000000..bf50f20de --- /dev/null +++ b/src/mhash/COPYING @@ -0,0 +1,482 @@ + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + + Copyright (C) + + 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. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/src/mhash/ChangeLog b/src/mhash/ChangeLog new file mode 100644 index 000000000..03d132dc1 --- /dev/null +++ b/src/mhash/ChangeLog @@ -0,0 +1,6 @@ +-*-Text-*- + +Please see the git commit log: + +$ git clone git://git.savannah.gnu.org/mit-scheme.git +$ git log origin/master -- src/mhash/ | more diff --git a/src/mhash/Makefile.am b/src/mhash/Makefile.am new file mode 100644 index 000000000..4f3a2c1db --- /dev/null +++ b/src/mhash/Makefile.am @@ -0,0 +1,70 @@ +## 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 diff --git a/src/mhash/Makefile.in b/src/mhash/Makefile.in deleted file mode 100644 index 3cb2db24e..000000000 --- a/src/mhash/Makefile.in +++ /dev/null @@ -1,80 +0,0 @@ -# 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 diff --git a/src/mhash/NEWS b/src/mhash/NEWS new file mode 100644 index 000000000..20cd9ede7 --- /dev/null +++ b/src/mhash/NEWS @@ -0,0 +1,29 @@ +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. diff --git a/src/mhash/autogen.sh b/src/mhash/autogen.sh new file mode 100755 index 000000000..8af4031c7 --- /dev/null +++ b/src/mhash/autogen.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e +rm -rf m4 +mkdir m4 +autoreconf --force --install -I m4 diff --git a/src/mhash/check-scm b/src/mhash/check-scm new file mode 100755 index 000000000..4f89998ed --- /dev/null +++ b/src/mhash/check-scm @@ -0,0 +1,2 @@ +#!/bin/sh +echo '(load "check.scm")' | ${MIT_SCHEME_EXE} diff --git a/src/mhash/configure.ac b/src/mhash/configure.ac index 4564a01ef..731678f91 100644 --- a/src/mhash/configure.ac +++ b/src/mhash/configure.ac @@ -1,11 +1,13 @@ 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, @@ -57,18 +59,33 @@ USA. */]) -AC_CHECK_HEADER([mhash.h],[ - AC_DEFINE([HAVE_MHASH_H], [1], - [Define to 1 if you have the 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 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 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 diff --git a/src/mhash/mhash-shim.h b/src/mhash/mhash-shim.h index 2244d8f77..b4ce0cca0 100644 --- a/src/mhash/mhash-shim.h +++ b/src/mhash/mhash-shim.h @@ -28,12 +28,7 @@ USA. #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 -#endif +#include 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); diff --git a/src/microcode/makegen/Makefile.in.in b/src/microcode/makegen/Makefile.in.in index 4730e859a..20bbbce0f 100644 --- a/src/microcode/makegen/Makefile.in.in +++ b/src/microcode/makegen/Makefile.in.in @@ -120,7 +120,7 @@ MODULE_LIBS = -lc 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) @@ -280,15 +280,6 @@ install-auxDATA: $(aux_DATA) 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)/. diff --git a/src/runtime/ffi.scm b/src/runtime/ffi.scm index 12e8d01d0..d4d5c7937 100644 --- a/src/runtime/ffi.scm +++ b/src/runtime/ffi.scm @@ -245,9 +245,7 @@ USA. 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)))) @@ -258,6 +256,45 @@ USA. (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)) @@ -543,28 +580,15 @@ USA. (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))) diff --git a/src/runtime/packag.scm b/src/runtime/packag.scm index 9e99ff2f3..4c2c73cbe 100644 --- a/src/runtime/packag.scm +++ b/src/runtime/packag.scm @@ -195,13 +195,7 @@ USA. "")) ""))) "-" - (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"))) (define-integrable (make-package-file tag version descriptions loads) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 8848df1c2..967ec0322 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -2877,6 +2877,7 @@ USA. 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 @@ -3393,11 +3394,8 @@ USA. 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) diff --git a/src/runtime/utabs.scm b/src/runtime/utabs.scm index 9d32653cb..446cfa383 100644 --- a/src/runtime/utabs.scm +++ b/src/runtime/utabs.scm @@ -104,6 +104,15 @@ USA. (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)))) (define-integrable fixed-objects-slot 15) (define non-object-slot) diff --git a/tests/ffi/Makefile b/tests/ffi/Makefile deleted file mode 100644 index 2c5df9578..000000000 --- a/tests/ffi/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# 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 diff --git a/tests/ffi/Makefile.am b/tests/ffi/Makefile.am new file mode 100644 index 000000000..5f996252d --- /dev/null +++ b/tests/ffi/Makefile.am @@ -0,0 +1,58 @@ +## 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 diff --git a/tests/ffi/autobuild.sh b/tests/ffi/autobuild.sh new file mode 100755 index 000000000..56414dc90 --- /dev/null +++ b/tests/ffi/autobuild.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e +./autogen.sh +./configure +make all diff --git a/tests/ffi/autogen.sh b/tests/ffi/autogen.sh new file mode 100755 index 000000000..06aa5fd23 --- /dev/null +++ b/tests/ffi/autogen.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e +rm -rf m4 +mkdir m4 +AUTOMAKE="automake --foreign" +export AUTOMAKE +autoreconf --force --install -I m4 diff --git a/tests/ffi/configure.ac b/tests/ffi/configure.ac new file mode 100644 index 000000000..796759a71 --- /dev/null +++ b/tests/ffi/configure.ac @@ -0,0 +1,79 @@ +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 diff --git a/tests/ffi/test-ffi b/tests/ffi/test-ffi new file mode 100755 index 000000000..c296e99d9 --- /dev/null +++ b/tests/ffi/test-ffi @@ -0,0 +1,3 @@ +#!/bin/sh +echo '(load "test-ffi.scm")' \ +| ../../src/microcode/scheme --library ../../src/lib --batch-mode diff --git a/tests/ffi/test-ffi.scm b/tests/ffi/test-ffi.scm index 358def035..7b07f663c 100644 --- a/tests/ffi/test-ffi.scm +++ b/tests/ffi/test-ffi.scm @@ -32,7 +32,7 @@ USA. (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." -- 2.25.1