On 30/04/2016 02:29, Bryce Harrington wrote:
On Tue, Apr 26, 2016 at 11:34:03PM +0200, David Fort wrote:
FreeRDP 2.0 is about to be released, this allows to compile against this 
version.
The detection is adjusted to prefer FreeRDP 2 against version 1.x.

Signed-off-by: David Fort <[email protected]>

Is this just to handle when an old and a new version are installed, or
does weston fail to build entirely against the newer library?  I'm
having trouble visualizing what the failure is that this fixes.  But
technically it looks ok, at least to the limits of my mediocre
autoconfu, so:

Reviewed-by: Bryce Harrington <[email protected]>

---
 configure.ac         |  8 +++++++-
 src/compositor-rdp.c | 23 ++++++++++++++++-------
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4199616..c6c4dbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -238,12 +238,18 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
                [test x$enable_rdp_compositor = xyes])
 if test x$enable_rdp_compositor = xyes; then
   AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
-  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
+  PKG_CHECK_MODULES(FreeRDP2, [freerdp2 >= 2.0.0],
+    [RDP_COMPOSITOR_CFLAGS=$FreeRDP2_CFLAGS; 
RDP_COMPOSITOR_LIBS=$FreeRDP2_LIBS;],
+    [PKG_CHECK_MODULES(FreeRDP, [freerdp >= 
1.1.0],[RDP_COMPOSITOR_CFLAGS=$FreeRDP_CFLAGS; 
RDP_COMPOSITOR_LIBS=$FreeRDP_LIBS;])]
+  )

   SAVED_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
   AC_CHECK_HEADERS([freerdp/version.h])
   CPPFLAGS="$SAVED_CPPFLAGS"
+
+  AC_SUBST(RDP_COMPOSITOR_CFLAGS)
+  AC_SUBST(RDP_COMPOSITOR_LIBS)
 fi

I still don’t like having a variable game here.
If you *really* don’t want to have “Checking for RDP_COMPOSITOR” twice (and I cannot remember anyone that was confused by something similar), maybe can you just PKG_CHECK_EXISTS first?

Probably just a cosmetic concern, but still, it bugs me.

--

Quentin “Sardem FF7” Glidic
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to