[Spice-devel] [spice-common] build-sys: Rework SPICE_CHECK_* m4 macros
Christophe Fergeau
cfergeau at redhat.com
Wed Oct 14 01:01:02 PDT 2015
On Wed, Oct 14, 2015 at 08:16:33AM +0200, Victor Toso wrote:
> Hi,
>
> On Tue, Oct 13, 2015 at 11:29:25AM +0200, Christophe Fergeau wrote:
> > These macros were automatically appending the needed CFLAGS/LIBS to
> > variables passed as arguments. This is how spice-common uses them, but
> > now how spice-gtk/spice want to use them, and is making the macros more
> > complicated than they could (in particular this makes them use
> > AS_VAR_APPEND).
> > This is also not flexible enough as spice-gtk uses libcacard libraries,
> > while spice-common does not need them. If SPICE_CHECK_SMARTCARD
> > unconditionnally libcacard libraries to the variable spice-common passes
> > it as an argument, we'll end up linking with an unneeded library.
> >
> > This commit removes this automatic appending from the SPICE_CHECK_*
> > macros and moves it to spice-common as it's the only one which needs it.
>
> Tested building on spice and spice-gtk, worked fine.
I tested spice-gtk as well to be sure this does not break. It will be
cleaner to have this followup patch though as the argument no longer is used:
diff --git a/configure.ac b/configure.ac
index 577f9a9..22248a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -355,7 +355,7 @@ AC_SUBST(JPEG_LIBS)
AC_CHECK_LIB(z, deflate, Z_LIBS='-lz', AC_MSG_ERROR([zlib not found]))
AC_SUBST(Z_LIBS)
-SPICE_CHECK_SMARTCARD([SMARTCARD])
+SPICE_CHECK_SMARTCARD
AM_CONDITIONAL([WITH_SMARTCARD], [test "x$have_smartcard" = "xyes"])
AC_ARG_ENABLE([usbredir],
@@ -680,7 +680,7 @@ if test "x$enable_dbus" != "xno"; then
fi
fi
-SPICE_CHECK_LZ4([LZ4])
+SPICE_CHECK_LZ4
dnl ===========================================================================
dnl check compiler flags
> Patch looks good to me.
Thanks,
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151014/c226ad98/attachment.sig>
More information about the Spice-devel
mailing list