[Spice-devel] [spice-common 00/13] Improvements to spice-common configure.ac/Makefile.am
Christophe Fergeau
cfergeau at redhat.com
Thu Dec 4 05:08:32 PST 2014
On Thu, Dec 04, 2014 at 07:45:46AM -0500, Marc-André Lureau wrote:
>
>
> ----- Original Message -----
> > On Thu, Dec 04, 2014 at 06:06:34AM -0500, Marc-André Lureau wrote:
> > > > Well, I'm not suggesting something that drastic ;) Not running
> > > > spice-protocol configure every time is an easy win without making huge
> > > > changes to what we have now.
> > >
> > > I am not sure, I don't know what you have in mind to remove autoconf subdir
> > > for the moment.
> >
> > You seem to be asking about my next steps (after this series) for
> > spice-common/configure.ac. I've tried to explain in the cover letter,
> > but here is a more detailed version.
> > My end goal is to take part of spice-common/configure.ac (the checks for
> > opus, celt, pixman, ... and the AC_CONFIG_FILES() call), and move that
> > to a SPICE_COMMON_SETUP() m4 macro.
> > Then spice-common/configure.ac can call that macro, which means
> > spice-common still has a working configure (ie things are unchanged from
> > the current situation).
> > But the main module configure.ac can also call that macro with the path
> > to the spice-common submodule: SPICE_COMMON_SETUP(spice-protocol/),
> > which means we don't need to run spice-common/configure with all kind of
> > redundant tests.
>
> Ok, that sounds reasonable, even though the benefit is low imho.
>
> I'd like to see the end results in spice-server or spice-gtk before
> though
See below for more details
> (and to not interfere with more controversial changes, and not
> mix it with other build-sys changes)
I've already dropped the spice-protocol removal from that series.
Regardless of whether we get a SPICE_COMMON_SETUP macro or not, the
changes in this series are ok to have anyway. Since I'm not sure when I'll
finish the work on that SPICE_COMMON_SETUP macro, I'd still like to get the
patches which are ready in.
> I'd like to see the end results in spice-server or spice-gtk before
> though
I did not go as far as patching spice-server or spice-gtk this time around, but
I expect the final patch not to be much different from
http://lists.freedesktop.org/archives/spice-devel/2013-November/015328.html
the important bit being:
SPICE_COMMON_SETUP([spice-common])
AC_SUBST(SPICE_COMMON_CFLAGS)
AC_SUBST(SPICE_COMMON_LIBS)
The SPICE_COMMON_SETUP macro would be something like that (after this patch series).
diff --git a/configure.ac b/configure.ac
index d8c73f6..37456b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,28 +31,8 @@ AM_PROG_CC_C_O
SPICE_CHECK_SYSDEPS
-# Checks for libraries
-SPICE_CHECK_PROTOCOL(SPICE_COMMON)
-SPICE_CHECK_PIXMAN(SPICE_COMMON)
-SPICE_CHECK_SMARTCARD(SPICE_COMMON)
-SPICE_CHECK_CELT051(SPICE_COMMON)
-SPICE_CHECK_OPUS(SPICE_COMMON)
-SPICE_CHECK_OPENGL(SPICE_COMMON)
+SPICE_COMMON_SETUP([.])
AC_SUBST(SPICE_COMMON_CFLAGS)
AC_SUBST(SPICE_COMMON_LIBS)
-# The End!
-AC_CONFIG_FILES([
- Makefile
- common/Makefile
- python_modules/Makefile
-])
-
-AH_BOTTOM([
-/* argh.. this is evil */
-#if defined(FIXME_SERVER_SMARTCARD) && defined(USE_SMARTCARD)
-%:undef USE_SMARTCARD
-#endif
-])
-
AC_OUTPUT
diff --git a/m4/spice-common.m4 b/m4/spice-common.m4
new file mode 100644
index 0000000..83221e4
--- /dev/null
+++ b/m4/spice-common.m4
@@ -0,0 +1,26 @@
+AC_DEFUN([SPICE_COMMON_SETUP], [
+ SPICE_CHECK_PIXMAN(SPICE_COMMON)
+ SPICE_CHECK_SMARTCARD(SPICE_COMMON)
+ SPICE_CHECK_CELT051(SPICE_COMMON)
+ SPICE_CHECK_OPUS(SPICE_COMMON)
+ SPICE_CHECK_OPENGL(SPICE_COMMON)
+ SPICE_CHECK_SYSDEPS
+
+ echo "COMMON CFLAGS: $SPICE_COMMON_CFLAGS"
+ echo "COMMON LIBS: $SPICE_COMMON_LIBS"
+
+ AC_CONFIG_FILES([
+ $1/Makefile
+ $1/common/Makefile
+ $1/python_modules/Makefile
+ ])
+
+ dnl needed because the generated server-side demarshalling smartcard
+ dnl code does not compile for some reason
+ AH_BOTTOM([/* argh.. this is evil */
+ #if defined(FIXME_SERVER_SMARTCARD) && defined(USE_SMARTCARD)
+ %:undef USE_SMARTCARD
+ #endif
+ ])
+])
+
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141204/48f5543a/attachment.sig>
More information about the Spice-devel
mailing list