diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index d571518..cf0bf05 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ # This file is part of Varnish-mib -*- autoconf -*- -# Copyright (C) 2014-2015 Sergey Poznyakoff +# Copyright (C) 2014-2016 Sergey Poznyakoff # # Varnish-mib is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # @@ -12,13 +12,13 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Varnish-mib. If not, see <http://www.gnu.org/licenses/>. AC_PREREQ(2.69) -AC_INIT([varnish-mib], 1.1, [gray@gnu.org]) +AC_INIT([varnish-mib], 1.1.90, [gray@gnu.org]) AC_CONFIG_SRCDIR(src/varnish_mib.mib2c) AM_CONFIG_HEADER(config.h) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_SYSTEM @@ -40,12 +40,28 @@ AC_PROG_MAKE_SET # Check for pkg-config PKG_PROG_PKG_CONFIG # Checks for Varnish PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 4.0]) +varnishapi_version() { + AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$1],[Varnish API major version number]) + AC_DEFINE_UNQUOTED([VARNISHAPI_MINOR],[$2],[Varnish API minor version number]) + AC_DEFINE_UNQUOTED([VARNISHAPI_PATCH],[$3],[Varnish API patchlevel]) +} + +v=$($PKG_CONFIG --modversion varnishapi) +if test -n "$v"; then + save_IFS=$IFS + IFS='.' + varnishapi_version $v + IFS=$save_IFS +fi + +AC_CHECK_VSC_C_MAIN_MEMBERS + # Check for Net-SNMP AC_PATH_PROG([NET_SNMP_CONFIG], net-snmp-config, none, $PATH) if test "$NET_SNMP_CONFIG" = "none"; then AC_MSG_ERROR([cannot find Net-SNMP (net-snmp-config not found)]) fi AC_SUBST(NET_SNMP_CONFIG) |