[master] 632fa99 Fix vmoddir when using --prefix at configure time

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Jan 27 15:00:06 CET 2017


commit 632fa996dc0492b66adf98f6e207088fd2d3ef27
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Fri Jan 27 14:54:10 2017 +0100

    Fix vmoddir when using --prefix at configure time
    
    Spotted by Martin, when a VMOD relying on varnish.m4 is built with
    --prefix in the configure command-line, a pseudo hard-coded vmoddir
    is assumed:
    
        $libdir/varnish/vmods
    
    Instead, it now asks pkg-config for the vmoddir relative to the
    libdir. It worked in all cases with upstream Varnish Cache, but
    downstream modifications of the vmoddir would then be ignored.

diff --git a/varnish.m4 b/varnish.m4
index 8b7d70e..3b603f0 100644
--- a/varnish.m4
+++ b/varnish.m4
@@ -133,7 +133,8 @@ AC_DEFUN([_VARNISH_VMOD_CONFIG], [
 		[NONE], [
 			vmoddir=$VARNISHAPI_VMODDIR
 			ac_default_prefix=$VARNISHAPI_PREFIX],
-		[vmoddir=$libdir/varnish/vmods]
+		[vmoddir=$($PKG_CONFIG --define-variable=libdir=$libdir \
+			--variable=vmoddir varnishapi)]
 	)
 	AC_SUBST([vmoddir])
 



More information about the varnish-commit mailing list