aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-11-01 14:10:23 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2014-11-01 14:10:23 +0200
commitdacdfd20c9e59e088bfb23c2852b566acc6ad06f (patch)
tree9c8acf2e253afd9593d5f6fccd560f7173485d48 /configure.ac
parent4d452a770122daf33fdbe0a549e2804b6f2db086 (diff)
downloadvmod-tbf-dacdfd20c9e59e088bfb23c2852b566acc6ad06f.tar.gz
vmod-tbf-dacdfd20c9e59e088bfb23c2852b566acc6ad06f.tar.bz2
Support for VCL 4.0
* NEWS: Update. * configure.ac: Version 1.0.90 Detect Varnish version, set up the C defines and automake conditionals to indicate it. * src/.gitignore: Update. * src/Makefile.am: Don't distribute vcc_if.c and vcc_if.h, build them for the current Varnish version. * src/tbf.h: New file. * src/getla.c: Include tbf.h, rewrite to compile with both 3.0 and 4.0 * src/sleep.c: Likewise. * src/tbf.c: Likewise. * src/time.c: Likewise. * src/vmod_tbf.vcc: Rewrite using v4.0 format. * tests/.gitignore: New file. * tests/Makefile.am: Build test00.vtc and test02.vtc * tests/test00.vtc: Rename to tests/test00.vti, add conditional compilation directives. * tests/test02.vtc: Rename to tests/test02.vti, add conditional compilation directives.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 6af8fd6..70fd78d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.69)
-AC_INIT([vmod-tbf], 1.0, [gray@gnu.org])
+AC_INIT([vmod-tbf], 1.0.90, [gray@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/vmod_tbf.vcc)
@@ -67,9 +67,17 @@ case "$VARNISHSRC" in
esac
VARNISHSRC=`cd $VARNISHSRC && pwd`
+VARNISHVERSION=
AC_CHECK_FILE([$VARNISHSRC/include/varnishapi.h],
- [],
- [AC_MSG_FAILURE(["$VARNISHSRC" is not a Varnish source directory])])
+ [VARNISHVERSION=3],
+ [AC_CHECK_FILE([$VARNISHSRC/include/vapi/vsm.h],
+ [VARNISHVERSION=4],
+ [AC_MSG_FAILURE(["$VARNISHSRC" is not a Varnish source directory])]) ])
+AC_SUBST([VARNISHVERSION],$VARNISHVERSION)
+
+AC_DEFINE_UNQUOTED([VARNISHVERSION],$VARNISHVERSION,[Varnish major version number])
+AM_CONDITIONAL([VARNISH3],[test $VARNISHVERSION -eq 3])
+AM_CONDITIONAL([VARNISH4],[test $VARNISHVERSION -eq 4])
# Check that varnishtest is built in the varnish source directory
AC_CHECK_FILE([$VARNISHSRC/bin/varnishtest/varnishtest],

Return to:

Send suggestions and report system problems to the System administrator.