<div dir="ltr">Hi,<div><br></div><div>With the new 4.0 varnish path discovery for vmods (through the AC tools/macros), if you install varnish in a non-standard directory (ie, with the default prefix of /usr/local), then libvmod-example (and its derivatives -- for instance, libvmod-dns that I originally wrote), will not compile out of the box using the autogen.sh script.</div>
<div><br></div><div>The reason for this is in varnish's autogen.sh, and the call to aclocal:</div><div><br></div><div> aclocal -I m4</div><div><br></div><div>Specifically, because (as per <a href="http://lassekarstensen.wordpress.com/2013/12/19/converting-a-varnish-3-0-vmod-to-4-0/">http://lassekarstensen.wordpress.com/2013/12/19/converting-a-varnish-3-0-vmod-to-4-0/</a> ) the AC tools need to have access to the varnish.m4 which would cause the varnish.m4 file to be installed in the /usr/local/share/aclocal directory.</div>
<div><br></div><div>As per <a href="http://www.gnu.org/software/automake/manual/html_node/Macro-Search-Path.html#ACLOCAL_005fPATH">http://www.gnu.org/software/automake/manual/html_node/Macro-Search-Path.html#ACLOCAL_005fPATH</a> one can fix this causing aclocal to search on a different path, and can be accomplished by putting a 'dirlist' file in /usr/share/aclocal or by running autogen.sh for a vmod with the ACLOCAL_PATH set:</div>
<div><br></div><div> ACLOCAL_PATH=/usr/local/share/aclocal ./autogen.sh</div><div><br></div><div>While this is an OK workaround, for compiling the vmods, that to me seems to defeats the purpose of path autodiscovery for the vmods.</div>
<div><br></div><div>I believe that the right solution to this would be to change varnish's autogen.sh file, so that the call to aclocal would instead look like the following (ie, add the --install parameter):</div><div>
<br></div><div> aclocal -I m4 --install</div><div><br></div><div>This causes aclocal to install varnish.m4 into the /usr/share/aclocal path instead of /usr/local/share/aclocal</div><div><br></div><div>Anyway, I'm not sure if this is 100% the "right" way to fix this issue, but without changing varnish's autogen.sh file, then I would suggest at minimum the ACLOCAL_PATH should be documented in libvmod-example.</div>
<div><br></div><div>Input would be greatly appreciated. Thanks in advance!</div><div><br></div><div><div>-Ken</div>
</div></div>