Skip to content

Commit

Permalink
Fix building with non-standard locations
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsch committed Feb 6, 2016
1 parent e5e4645 commit 665cef9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Expand Up @@ -2,6 +2,8 @@ ACLOCAL_AMFLAGS = -I m4

SUBDIRS = src

DISTCHECK_CONFIGURE_FLAGS = VMOD_DIR='$${libdir}/varnish/vmods'

dist_doc_DATA = LICENSE

EXTRA_DIST = $(top_srcdir)/libmaxminddb/t/maxmind-db/LICENSE \
Expand Down
7 changes: 5 additions & 2 deletions configure.ac
Expand Up @@ -22,12 +22,15 @@ test -z "$PYTHON" && AC_MSG_ERROR([Python 2.6 or greater is required.])
AC_PATH_PROG([RST2MAN], [rst2man])
test -z "$RST2MAN" && AC_MSG_ERROR([rst2man is required.])

PKG_CHECK_VAR([VARNISH_BINDIR], [varnishapi], [bindir])
PKG_CHECK_VAR([VARNISH_SBINDIR], [varnishapi], [sbindir])

VARNISH_VMOD_INCLUDES
VARNISH_VMOD_DIR
VARNISH_VMODTOOL

AC_PATH_PROG([VARNISHTEST], [varnishtest])
AC_PATH_PROG([VARNISHD], [varnishd])
AC_PATH_PROG([VARNISHTEST], [varnishtest], [], [$VARNISH_BINDIR:$PATH])
AC_PATH_PROG([VARNISHD], [varnishd], [], [$VARNISH_SBINDIR:$PATH])

VMOD_TESTS="$(cd $srcdir/src && echo tests/*.vtc)"
AC_SUBST(VMOD_TESTS)
Expand Down
Empty file removed m4/PLACEHOLDER
Empty file.
15 changes: 15 additions & 0 deletions m4/pkg.local.m4
@@ -0,0 +1,15 @@
m4_ifndef([PKG_CHECK_VAR], [
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR
])

0 comments on commit 665cef9

Please sign in to comment.