From c9653f0c2d0f45c14119f2c196e51488a88a534f Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 22 Jun 2018 03:37:10 -0700 Subject: [PATCH] =?utf8?q?Punt=20db4=20=C2=B5module;=20remove=20to=20incom?= =?utf8?q?plete=20berkeley-db=20plugin.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/berkeley-db/README | 5 +++ src/{runtime => berkeley-db}/berkeley-db.scm | 0 src/berkeley-db/configure.ac | 44 ++++++++++++++++++++ src/{microcode => berkeley-db}/prdb4.c | 0 src/{microcode => berkeley-db}/prdb4.scm | 0 src/microcode/configure.ac | 36 ---------------- src/microcode/makegen/Makefile.in.in | 3 -- 7 files changed, 49 insertions(+), 39 deletions(-) create mode 100644 src/berkeley-db/README rename src/{runtime => berkeley-db}/berkeley-db.scm (100%) create mode 100644 src/berkeley-db/configure.ac rename src/{microcode => berkeley-db}/prdb4.c (100%) rename src/{microcode => berkeley-db}/prdb4.scm (100%) diff --git a/src/berkeley-db/README b/src/berkeley-db/README new file mode 100644 index 000000000..a404bc9d1 --- /dev/null +++ b/src/berkeley-db/README @@ -0,0 +1,5 @@ +The BERKELEY-DB option. + +This plugin is incomplete. The accompanying files are just chunks of +code for the old microcode module prdb4 as cut out of microcode/ and +runtime/. diff --git a/src/runtime/berkeley-db.scm b/src/berkeley-db/berkeley-db.scm similarity index 100% rename from src/runtime/berkeley-db.scm rename to src/berkeley-db/berkeley-db.scm diff --git a/src/berkeley-db/configure.ac b/src/berkeley-db/configure.ac new file mode 100644 index 000000000..ced941a1a --- /dev/null +++ b/src/berkeley-db/configure.ac @@ -0,0 +1,44 @@ +AC_ARG_WITH([db-4], + AS_HELP_STRING([--with-db-4], + [Use Berkeley DB v4 library if available [[yes]]])) +: ${with_db_4='yes'} + + +dnl DB v4 support +if test "${with_db_4}" != no; then + if test "${with_db_4}" != yes; then + CPPFLAGS="${CPPFLAGS} -I${with_db_4}/include" + LDFLAGS="${LDFLAGS} -L${with_db_4}/lib" + fi + AC_CHECK_HEADER([db.h], + [ + AC_DEFINE([HAVE_DB_H], [1], + [Define to 1 if you have the header file.]) + AC_MSG_CHECKING([for db_create in -ldb-4]) + save_LIBS=${LIBS} + LIBS="${LIBS} -ldb-4" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[db_create (0, 0, 0)]])], + [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_LIBDB_4], [1], + [Define to 1 if you have the `db-4' library (-ldb-4).]) + MODULE_LIBS="-ldb-4 ${MODULE_LIBS}" + MODULE_BASES="${MODULE_BASES} prdb4" + ], + [ + AC_MSG_RESULT([no]) + ]) + LIBS=${save_LIBS} + ]) +fi + +MIT_SCHEME_PROJECT=mit-scheme-pucked + +# Install plugin docs in Scheme's docdir subdirectories. +htmldir='$(datarootdir)/doc/$(MIT_SCHEME_PROJECT)/html' +pdfdir='$(datarootdir)/doc/$(MIT_SCHEME_PROJECT)/pdf' + +AC_SUBST([MIT_SCHEME_PROJECT]) diff --git a/src/microcode/prdb4.c b/src/berkeley-db/prdb4.c similarity index 100% rename from src/microcode/prdb4.c rename to src/berkeley-db/prdb4.c diff --git a/src/microcode/prdb4.scm b/src/berkeley-db/prdb4.scm similarity index 100% rename from src/microcode/prdb4.scm rename to src/berkeley-db/prdb4.scm diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index 12bc7d8d0..2a79ec97c 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -135,11 +135,6 @@ AC_ARG_WITH([mcrypt], [Use mcrypt library if available [[yes]]])) : ${with_mcrypt='yes'} -AC_ARG_WITH([db-4], - AS_HELP_STRING([--with-db-4], - [Use Berkeley DB v4 library if available [[yes]]])) -: ${with_db_4='yes'} - AC_ARG_WITH([termcap], AS_HELP_STRING([--with-termcap], [Use a termcap library if available [[yes]]])) @@ -843,37 +838,6 @@ if test "${with_mcrypt}" != no; then ]) fi -dnl DB v4 support -if test "${with_db_4}" != no; then - if test "${with_db_4}" != yes; then - CPPFLAGS="${CPPFLAGS} -I${with_db_4}/include" - LDFLAGS="${LDFLAGS} -L${with_db_4}/lib" - fi - AC_CHECK_HEADER([db.h], - [ - AC_DEFINE([HAVE_DB_H], [1], - [Define to 1 if you have the header file.]) - AC_MSG_CHECKING([for db_create in -ldb-4]) - save_LIBS=${LIBS} - LIBS="${LIBS} -ldb-4" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[db_create (0, 0, 0)]])], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_LIBDB_4], [1], - [Define to 1 if you have the `db-4' library (-ldb-4).]) - MODULE_LIBS="-ldb-4 ${MODULE_LIBS}" - MODULE_BASES="${MODULE_BASES} prdb4" - ], - [ - AC_MSG_RESULT([no]) - ]) - LIBS=${save_LIBS} - ]) -fi - dnl Add support for X if present. if test "${no_x}" != yes; then if test "x${x_includes}" != x; then diff --git a/src/microcode/makegen/Makefile.in.in b/src/microcode/makegen/Makefile.in.in index 1d7ccfc0c..aa802282d 100644 --- a/src/microcode/makegen/Makefile.in.in +++ b/src/microcode/makegen/Makefile.in.in @@ -193,9 +193,6 @@ macosx-starter: macosx-starter.o prmcrypt.so: prmcrypt.o @MODULE_LOADER@ $(LINK_MODULE) prmcrypt.o -lmcrypt $(MODULE_LIBS) -prdb4.so: prdb4.o @MODULE_LOADER@ - $(LINK_MODULE) prdb4.o -ldb-4 $(MODULE_LIBS) - prx11.so: prx11.o x11base.o x11color.o x11graph.o x11term.o @MODULE_LOADER@ $(LINK_MODULE) prx11.o x11base.o x11color.o x11graph.o x11term.o \ -lX11 $(MODULE_LIBS) -- 2.25.1