[Spice-devel] [spice-common] m4: Add macro for --enable-lz4
Victor Toso
victortoso at redhat.com
Fri Jun 19 09:42:28 PDT 2015
Hey,
On Fri, Jun 19, 2015 at 06:37:01PM +0200, Christophe Fergeau wrote:
> Hey,
>
> On Thu, Jun 18, 2015 at 11:58:20AM +0200, Christophe Fergeau wrote:
> > It's not directly used by spice-common, but this way spice-gtk and
> > spice-server can share the same implementation.
> > ---
> > m4/spice-deps.m4 | 24 ++++++++++++++++++++++++
> > 1 file changed, 24 insertions(+)
> >
> > diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
> > index 600dd98..df35a92 100644
> > --- a/m4/spice-deps.m4
> > +++ b/m4/spice-deps.m4
> > @@ -173,3 +173,27 @@ AC_DEFUN([SPICE_CHECK_PYTHON_MODULES], [
> > AX_PYTHON_MODULE([pyparsing], [1])
> > fi
> > ])
> > +
> > +
> > +# SPICE_CHECK_LZ4(PREFIX)
> > +# -----------------------------
> > +# Adds a --enable-lz4 switch in order to enable/disable LZ4 compression
> > +# support, and checks if the needed libraries are available. If found, it will
> > +# append the flags to use to the $PREFIX_CFLAGS and $PREFIX_LIBS variables, and
> > +# it will define a USE_LZ4 preprocessor symbol as well as a SUPPORT_LZ4 Makefile
> > +# conditional.
> > +#------------------------------
> > +AC_DEFUN([SPICE_CHECK_LZ4], [
> > + AC_ARG_ENABLE([lz4],
> > + AS_HELP_STRING([--enable-lz4=@<:@yes/no@:>@],
> > + [Enable LZ4 compression support @<:@default=no@:>@]),
> > + [],
> > + [enable_lz4="no"])
> > +
> > + if test "x$enable_lz4" != "xno"; then
> > + PKG_CHECK_MODULES([LZ4], [liblz4])
>
> Following
> http://lists.freedesktop.org/archives/spice-devel/2015-June/020431.html
> , would be a good place to add a liblz4 >= 118
> (can go in a separate patch too).
I agree about including liblz4 version.
I did not tested your patches yet but I agree with the changes.
-toso
More information about the Spice-devel
mailing list