[PATCH 1/5] rdp: allow to compile against FreeRDP 2.0

Hardening rdp.effort at gmail.com
Sat Apr 23 13:11:11 UTC 2016


Le 23/04/2016 11:50, Quentin Glidic a écrit :
> On 22/04/2016 15:19, David Fort wrote:
>> FreeRDP 2.0 is about to be released, this allows to compile against
>> this version.
>>
>> Signed-off-by: David Fort <contact at hardening-consulting.com>
>> ---
>>  configure.ac         |  8 +++++++-
>>  src/compositor-rdp.c | 23 ++++++++++++++++-------
>>  2 files changed, 23 insertions(+), 8 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 670200c..9c70b2e 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -242,12 +242,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(FreeRDP, [freerdp >= 1.1.0],
>> +    [RDP_COMPOSITOR_CFLAGS=$FreeRDP_CFLAGS;
>> RDP_COMPOSITOR_LIBS=$FreeRDP_LIBS;],
>> +    [PKG_CHECK_MODULES(FreeRDP2, [freerdp2 >=
>> 2.0.0],[RDP_COMPOSITOR_CFLAGS=$FreeRDP2_CFLAGS;
>> RDP_COMPOSITOR_LIBS=$FreeRDP2_LIBS;])]
>> +  )
> 
> Just use the same prefix ("RDP_COMPOSITOR") in both, it’s safe, and
> easier to read.
> 
It's just that doing so the printed message is "checking RDP_COMPOSITOR"
twice...

> Also, here, you prefer FreeRDP 1 over FreeRDP 2, is that what you want?
> 
> 
Well probably not, I'll change the order.

>>    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)
> 
> Then you can remove that.
> 
> 
>>  fi
>> [snip]
> 
> Cheers,
> 


-- 
David FORT
website: http://www.hardening-consulting.com/



More information about the wayland-devel mailing list