qdbm (1.8.78-2) qdbm-split-gdbm-wrapper

Summary

 Makefile.in  |   21 +++++++++++++++++++++
 configure.in |   10 ++++++++++
 2 files changed, 31 insertions(+)

    
download this patch

Patch contents

Description: add "--disable-gdbm" flag to build QDBM without the GDBM emulation
Origin:      other
Author:      Keith Lawson <keith@nowhere.ca>

Index: qdbm/Makefile.in
===================================================================
--- qdbm.orig/Makefile.in	2011-05-08 18:48:10.002956482 +0900
+++ qdbm/Makefile.in	2011-05-08 18:49:30.643356352 +0900
@@ -20,8 +20,12 @@
 PACKAGETGZ = $(PACKAGE)-$(VERSION).tar.gz
 LIBVER = @LIBVER@
 LIBREV = @LIBREV@
+ENABLE_GDBM = @ENABLE_GDBM@
+
 
 # Targets
+ifeq ($(ENABLE_GDBM),1)
+
 MYHEADS = depot.h curia.h relic.h hovel.h cabin.h villa.h vista.h odeum.h
 MYLIBOBJS = depot.o curia.o relic.o hovel.o cabin.o villa.o vista.o odeum.o myconf.o
 MYLIBS = libqdbm.a libqdbm.so.$(LIBVER).$(LIBREV).0 libqdbm.so.$(LIBVER) libqdbm.so
@@ -31,6 +35,21 @@
   cbtest.1 cbcodec.1 vlmgr.1 vltest.1 vltsv.1 odmgr.1 odtest.1 odidx.1 qmttest.1
 MYMAN3S = qdbm.3 depot.3 dpopen.3 curia.3 cropen.3 relic.3 hovel.3 \
   cabin.3 villa.3 vlopen.3 vista.3 odeum.3 odopen.3
+
+else
+
+MYHEADS = depot.h curia.h relic.h cabin.h villa.h vista.h odeum.h
+MYLIBOBJS = depot.o curia.o relic.o cabin.o villa.o vista.o odeum.o myconf.o
+MYLIBS = libqdbm.a libqdbm.so.$(LIBVER).$(LIBREV).0 libqdbm.so.$(LIBVER) libqdbm.so
+MYBINS = dpmgr dptest dptsv crmgr crtest crtsv rlmgr rltest \
+  cbtest cbcodec vlmgr vltest vltsv odmgr odtest odidx qmttest
+MYMAN1S = dpmgr.1 dptest.1 dptsv.1 crmgr.1 crtest.1 crtsv.1 rlmgr.1 rltest.1 \
+  cbtest.1 cbcodec.1 vlmgr.1 vltest.1 vltsv.1 odmgr.1 odtest.1 odidx.1 qmttest.1
+MYMAN3S = qdbm.3 depot.3 dpopen.3 curia.3 cropen.3 relic.3 hovel.3 \
+  cabin.3 villa.3 vlopen.3 vista.3 odeum.3 odopen.3
+
+endif
+
 MYDOCS = COPYING ChangeLog NEWS THANKS
 MYPCS = qdbm.pc
 MYWINLIBS = libqdbm.a libqdbm.dll.a
@@ -267,6 +286,7 @@
 	$(RUNENV) $(RUNCMD) ./rltest write casket 5000
 	$(RUNENV) $(RUNCMD) ./rltest read casket 5000
 	$(RUNENV) $(RUNCMD) ./rlmgr list casket
+ifeq ($(ENABLE_GDBM),1)
 	rm -rf casket*
 	$(RUNENV) $(RUNCMD) ./hvtest write casket 5000
 	$(RUNENV) $(RUNCMD) ./hvtest read casket 5000
@@ -276,6 +296,7 @@
 	$(RUNENV) $(RUNCMD) ./hvtest write -qdbm -s casket 500
 	$(RUNENV) $(RUNCMD) ./hvtest write -qdbm casket 5000
 	$(RUNENV) $(RUNCMD) ./hvtest read -qdbm casket 5000
+endif 
 	rm -rf casket*
 	$(RUNENV) $(RUNCMD) ./cbtest sort 5000
 	$(RUNENV) $(RUNCMD) ./cbtest strstr 500
Index: qdbm/configure.in
===================================================================
--- qdbm.orig/configure.in	2011-05-08 18:48:17.174992037 +0900
+++ qdbm/configure.in	2011-05-08 18:49:42.403414679 +0900
@@ -98,6 +98,16 @@
   enables="$enables (no-mmap)"
 fi
 
+# Disable GDBM emulation
+ENABLE_GDBM=0
+AC_ARG_ENABLE(gdbm, AC_HELP_STRING([--disable-gdbm],
+    [disable GDBM emulation]))
+if test x$enable_gdbm != xno; then
+    AC_DEFINE(ENABLE_GDBM, 1, [Enable GDBM emulation])
+    ENABLE_GDBM=1
+fi
+AC_SUBST(ENABLE_GDBM)
+
 # Enable ZLIB compression
 AC_ARG_ENABLE(zlib,
   AC_HELP_STRING([--enable-zlib], [feature ZLIB for B+ tree and inverted index]))