<div dir="ltr">Hi,<br><br>Personally I think if you install Varnish in a non-standard location you know what you are doing so you should use ACLOCAL_PATH or go for the dirlist option.<br>As Lasse mentioned in hist post: "If you installed Varnish in the standard path/prefix, that should work 
out of the box. Otherwise, you might to add some symlinks for pkg-config
 and automake to find the source."<br><br>AFAICT --install copies the varnish.m4 file into the -I directory instead of stuffing everything into aclocal.m4 so this won't help.<br>IIUC your suggestion could be done modifying Varnish's Makefile.am to use /usr/share insted of $(datadir)/aclocal but installing varnish.m4 under /usr and the rest of Varnish under /usr/local doesn't make much sense to me and will break systems that install aclocal under /usr/local.<br>
<br>I'm not sure how many people installs Varnish in a prefix different to where aclocal lives TBH but I'd say documenting it is the way to go.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 25, 2014 at 5:58 AM, Kenneth Shaw <span dir="ltr"><<a href="mailto:kenshaw@gmail.com" target="_blank">kenshaw@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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/" target="_blank">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" target="_blank">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>
<br>_______________________________________________<br>
varnish-dev mailing list<br>
<a href="mailto:varnish-dev@varnish-cache.org">varnish-dev@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev</a><br></blockquote></div><br></div>