diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-09 02:24:15 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-09 02:26:38 +0200 |
commit | 26ebbda9d6440498731ee6980945bfc0a18f6dc1 (patch) | |
tree | 27a2d1ba6c7a89131b5444a1f6645a5bc5d4e462 | |
parent | 32a55b403a2bbd774aed5b714d25ddad4e062d4f (diff) | |
download | vmod-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.
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | src/tbf.c | 7 | ||||
-rw-r--r-- | src/vmod_tbf.vcc | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 6 |
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 "" @@ -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;\ |