vmod 4 / libvmod-example (and derivatives) / aclocal
Kenneth Shaw
kenshaw at gmail.com
Sun May 25 06:58:54 CEST 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140525/0c56f24a/attachment.html>
More information about the varnish-dev
mailing list