aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.