Hi, 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. 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."
AFAICT --install copies the varnish.m4 file into the -I directory instead of stuffing everything into aclocal.m4 so this won't help. 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. 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. On Sun, May 25, 2014 at 5:58 AM, Kenneth Shaw <[email protected]> wrote: > Hi, > > 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. > > The reason for this is in varnish's autogen.sh, and the call to aclocal: > > aclocal -I m4 > > Specifically, because (as per > http://lassekarstensen.wordpress.com/2013/12/19/converting-a-varnish-3-0-vmod-to-4-0/) > 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. > > As per > http://www.gnu.org/software/automake/manual/html_node/Macro-Search-Path.html#ACLOCAL_005fPATHone > 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: > > ACLOCAL_PATH=/usr/local/share/aclocal ./autogen.sh > > While this is an OK workaround, for compiling the vmods, that to me seems > to defeats the purpose of path autodiscovery for the vmods. > > 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): > > aclocal -I m4 --install > > This causes aclocal to install varnish.m4 into the /usr/share/aclocal path > instead of /usr/local/share/aclocal > > 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. > > Input would be greatly appreciated. Thanks in advance! > > -Ken > > _______________________________________________ > varnish-dev mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev >
_______________________________________________ varnish-dev mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
