summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-09 00:24:15 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2016-02-09 00:26:38 (GMT)
commit26ebbda9d6440498731ee6980945bfc0a18f6dc1 (patch) (side-by-side diff)
tree27a2d1ba6c7a89131b5444a1f6645a5bc5d4e462
parent32a55b403a2bbd774aed5b714d25ddad4e062d4f (diff)
downloadvmod-tbf-26ebbda9d6440498731ee6980945bfc0a18f6dc1.tar.gz
vmod-tbf-26ebbda9d6440498731ee6980945bfc0a18f6dc1.tar.bz2
Cleanup of the merge
* configure.ac: Don't check for dbm. Enable silent rules. * src/tbf.c: Restore the init function. * src/vmod_tbf.vcc: Likewise.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac21
-rw-r--r--src/tbf.c7
-rw-r--r--src/vmod_tbf.vcc1
-rw-r--r--tests/Makefile.am6
4 files changed, 13 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index f8e19de..a93ac20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,8 @@ AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
AC_LANG(C)
-AM_INIT_AUTOMAKE([1.14 gnu tar-ustar])
+AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules])
+AM_SILENT_RULES([yes])
AC_GNU_SOURCE
AC_PROG_CC
@@ -104,24 +105,6 @@ if test -z "$VMODDIR"; then
VMODDIR='$(libdir)/varnish/mods'
fi
-###########
-# Check for db.h and libdb
-#
-AC_CHECK_HEADER([db.h],,[AC_MSG_ERROR([Required header file db.h not found])])
-
-AC_CHECK_LIB(db, db_create,
- [LIBS="$LIBS -ldb"
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([#include "db.h"],
- [int v_major, v_minor, v_patch;
- db_version(&v_major, &v_minor, &v_patch);
- return !(v_major == DB_VERSION_MAJOR
- && v_minor == DB_VERSION_MINOR
- && v_patch == DB_VERSION_PATCH);
- ])],
- [],
- [AC_MSG_ERROR([header file db.h is not the same version as libdb])])])
-
AC_CONFIG_COMMANDS([status],[
delim="-------------------------------------------------------------------"
echo ""
diff --git a/src/tbf.c b/src/tbf.c
index 129e1f5..211db79 100644
--- a/src/tbf.c
+++ b/src/tbf.c
@@ -844,6 +844,13 @@ tbf_exit(void)
}
}
+int
+tbf_init(struct vmod_priv *priv, const struct VCL_conf *vclconf)
+{
+ tbf_tree = tree_create();
+ atexit(tbf_exit);
+}
+
VCL_VOID
vmod_debug(MOD_CTX ctx, VCL_INT newval)
{
diff --git a/src/vmod_tbf.vcc b/src/vmod_tbf.vcc
index 22493e1..5347437 100644
--- a/src/vmod_tbf.vcc
+++ b/src/vmod_tbf.vcc
@@ -24,6 +24,7 @@ For a detailed documentation, please see vmod-tbf(3) manual page.
DESCRIPTION
===========
+$Init tbf_init
$Function VOID debug(INT)
$Function VOID dump(STRING)
$Function VOID load(STRING)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cb255cc..2510724 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -34,16 +34,16 @@ VMOD_TESTS = \
time00.vtc
.vti.vtc:
- sed 's/^#VARNISH$(VARNISHVERSION)#//' $< > $@
+ $(AM_V_GEN)sed 's/^#VARNISH$(VARNISHVERSION)#//' $< > $@
EXTRA_DIST=$(VMOD_VTC) $(VMOD_VTI)
CLEANFILES=$(BUILT_TESTS)
distclean-local:
- rm -fr tbf
+ $(AM_V_at)rm -fr tbf
check: $(BUILT_TESTS)
- for t in $(VMOD_TESTS); do \
+ $(AM_V_at)for t in $(VMOD_TESTS); do \
n=$${t%%.vti}; \
if [ $$n != $$t ]; then \
t=$(abs_builddir)/$${n}.vtc;\

Return to:

Send suggestions and report system problems to the System administrator.