From: Marco d'Itri <md@linux.it>
Subject: support building varnish modules
Forwarded: not-needed

Many modules still only support varnish, so we need to mimic parts of
its build environment.

This patch:
* enables support for the "varnish" top level command in tests
* installs a varnishd symlink, used when building Vinyl Cache and vmods

--- a/bin/vinyltest/Makefile.am
+++ b/bin/vinyltest/Makefile.am
@@ -68,6 +68,7 @@ vinyltest_SOURCES = \
 		vtest2/src/vtest_api.h \
 		vtest2/lib/vudp.h \
 		vtest2/lib/vudp.c \
+		vtest2/src/vtc_varnish.c \
 		vtc_vinyl.c
 
 vinyltest_LDADD = \
@@ -78,6 +79,7 @@ vinyltest_LDADD = \
 
 vinyltest_CFLAGS = \
 		-DVTEST_WITH_VTC_LOGEXPECT \
+		-DVTEST_WITH_VTC_VARNISH \
 		-DVTEST_WITH_VTC_VINYL \
 		-DVTEST_WITH_VTC_VSM \
 		-DTOP_BUILDDIR='"${top_builddir}"'
--- a/bin/vinyld/Makefile.am
+++ b/bin/vinyld/Makefile.am
@@ -9,6 +9,11 @@ AM_CPPFLAGS = \
 
 sbin_PROGRAMS = vinyld
 
+sbin_PROGRAMS += varnishd
+
+varnishd:
+	ln -s vinyld varnishd
+
 vinyld_SOURCES = \
 	acceptor/cache_acceptor.c \
 	acceptor/cache_acceptor_tcp.c \
