[4.1] 5e39315 Fix vmoddir when using --prefix at configure time

Martin Blix Grydeland martin at varnish-software.com
Fri Jan 27 15:57:05 CET 2017


commit 5e39315e40edd3812b7b1b0099a7f80e2b0a723d
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 d0849ef..75ac9a3 100644
--- a/varnish.m4
+++ b/varnish.m4
@@ -95,7 +95,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