aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-09 02:24:15 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-02-09 02:26:38 +0200
commit26ebbda9d6440498731ee6980945bfc0a18f6dc1 (patch)
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.
-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)
23AC_CANONICAL_SYSTEM 23AC_CANONICAL_SYSTEM
24AC_LANG(C) 24AC_LANG(C)
25 25
26AM_INIT_AUTOMAKE([1.14 gnu tar-ustar]) 26AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules])
27AM_SILENT_RULES([yes])
27 28
28AC_GNU_SOURCE 29AC_GNU_SOURCE
29AC_PROG_CC 30AC_PROG_CC
@@ -104,24 +105,6 @@ if test -z "$VMODDIR"; then
104 VMODDIR='$(libdir)/varnish/mods' 105 VMODDIR='$(libdir)/varnish/mods'
105fi 106fi
106 107
107###########
108# Check for db.h and libdb
109#
110AC_CHECK_HEADER([db.h],,[AC_MSG_ERROR([Required header file db.h not found])])
111
112AC_CHECK_LIB(db, db_create,
113 [LIBS="$LIBS -ldb"
114 AC_RUN_IFELSE(
115 [AC_LANG_PROGRAM([#include "db.h"],
116 [int v_major, v_minor, v_patch;
117 db_version(&v_major, &v_minor, &v_patch);
118 return !(v_major == DB_VERSION_MAJOR
119 && v_minor == DB_VERSION_MINOR
120 && v_patch == DB_VERSION_PATCH);
121 ])],
122 [],
123 [AC_MSG_ERROR([header file db.h is not the same version as libdb])])])
124
125AC_CONFIG_COMMANDS([status],[ 108AC_CONFIG_COMMANDS([status],[
126delim="-------------------------------------------------------------------" 109delim="-------------------------------------------------------------------"
127echo "" 110echo ""
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)
844 } 844 }
845} 845}
846 846
847int
848tbf_init(struct vmod_priv *priv, const struct VCL_conf *vclconf)
849{
850 tbf_tree = tree_create();
851 atexit(tbf_exit);
852}
853
847VCL_VOID 854VCL_VOID
848vmod_debug(MOD_CTX ctx, VCL_INT newval) 855vmod_debug(MOD_CTX ctx, VCL_INT newval)
849{ 856{
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.
24DESCRIPTION 24DESCRIPTION
25=========== 25===========
26 26
27$Init tbf_init
27$Function VOID debug(INT) 28$Function VOID debug(INT)
28$Function VOID dump(STRING) 29$Function VOID dump(STRING)
29$Function VOID load(STRING) 30$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 = \
34 time00.vtc 34 time00.vtc
35 35
36.vti.vtc: 36.vti.vtc:
37 sed 's/^#VARNISH$(VARNISHVERSION)#//' $< > $@ 37 $(AM_V_GEN)sed 's/^#VARNISH$(VARNISHVERSION)#//' $< > $@
38 38
39EXTRA_DIST=$(VMOD_VTC) $(VMOD_VTI) 39EXTRA_DIST=$(VMOD_VTC) $(VMOD_VTI)
40CLEANFILES=$(BUILT_TESTS) 40CLEANFILES=$(BUILT_TESTS)
41 41
42distclean-local: 42distclean-local:
43 rm -fr tbf 43 $(AM_V_at)rm -fr tbf
44 44
45check: $(BUILT_TESTS) 45check: $(BUILT_TESTS)
46 for t in $(VMOD_TESTS); do \ 46 $(AM_V_at)for t in $(VMOD_TESTS); do \
47 n=$${t%%.vti}; \ 47 n=$${t%%.vti}; \
48 if [ $$n != $$t ]; then \ 48 if [ $$n != $$t ]; then \
49 t=$(abs_builddir)/$${n}.vtc;\ 49 t=$(abs_builddir)/$${n}.vtc;\

Return to:

Send suggestions and report system problems to the System administrator.