From 37dceed8ec83894d73497728858789e0b6add2d2 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 15 Jan 2020 21:52:41 -0800 Subject: [PATCH 1/2] GUACAMOLE-249: Automatically determine correct location for FreeRDP plugins. --- configure.ac | 11 ++++++++++- src/protocols/rdp/Makefile.am | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index eb182feb..5eb0c0a0 100644 --- a/configure.ac +++ b/configure.ac @@ -546,7 +546,8 @@ if test "x$with_rdp" != "xno" then have_freerdp2=yes PKG_CHECK_MODULES([RDP], [freerdp2 freerdp-client2 winpr2], - [CPPFLAGS="${RDP_CFLAGS} -Werror $CPPFLAGS"], + [CPPFLAGS="${RDP_CFLAGS} -Werror $CPPFLAGS"] + [FREERDP2_PLUGIN_DIR="`$PKG_CONFIG --variable=libdir freerdp2`/freerdp2"], [AC_MSG_WARN([ -------------------------------------------- Unable to find FreeRDP (libfreerdp2 / libfreerdp-client2 / libwinpr2) @@ -664,6 +665,7 @@ fi # Restore CPPFLAGS, removing FreeRDP-specific options needed for testing CPPFLAGS="$OLDCPPFLAGS" +AC_SUBST(FREERDP2_PLUGIN_DIR) AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp2}" = "xyes"]) # @@ -994,6 +996,12 @@ AM_COND_IF([ENABLE_INIT], [build_init="${init_dir}"], [build_init=no]) AM_COND_IF([ENABLE_SYSTEMD], [build_systemd="${systemd_dir}"], [build_systemd=no]) +# +# FreeRDP plugins +# + +AM_COND_IF([ENABLE_RDP], [build_rdp_plugins="${FREERDP2_PLUGIN_DIR}"], [build_rdp_plugins=no]) + # # Display summary # @@ -1034,6 +1042,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION guacenc .... ${build_guacenc} guaclog .... ${build_guaclog} + FreeRDP plugins: ${build_rdp_plugins} Init scripts: ${build_init} Systemd units: ${build_systemd} diff --git a/src/protocols/rdp/Makefile.am b/src/protocols/rdp/Makefile.am index d20d79cb..ff2ff8dd 100644 --- a/src/protocols/rdp/Makefile.am +++ b/src/protocols/rdp/Makefile.am @@ -150,7 +150,7 @@ freerdp_LTLIBRARIES = \ libguac-common-svc-client.la \ libguacai-client.la -freerdpdir = ${libdir}/freerdp2 +freerdpdir = @FREERDP2_PLUGIN_DIR@ # # Common SVC plugin (shared by RDPDR, RDPSND, etc.) From be5cdf52c1ca143ca9f13ee24e21201e47d6860b Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 16 Jan 2020 11:57:14 -0800 Subject: [PATCH 2/2] GUACAMOLE-249: Allow detected FreeRDP plugin directory to be overridden with --with-freerdp-plugin-dir. --- configure.ac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5eb0c0a0..24c15884 100644 --- a/configure.ac +++ b/configure.ac @@ -532,12 +532,20 @@ fi # have_freerdp2=disabled +FREERDP2_PLUGIN_DIR= + AC_ARG_WITH([rdp], [AS_HELP_STRING([--with-rdp], [support RDP @<:@default=check@:>@])], [], [with_rdp=check]) +# FreeRDP plugin directory +AC_ARG_WITH(freerdp_plugin_dir, + [AS_HELP_STRING([--with-freerdp-plugin-dir=], + [install FreeRDP plugins to the given directory @<:@default=check@:>@]) + ],FREERDP2_PLUGIN_DIR=$withval) + # Preserve CPPFLAGS so it can be restored later, following the addition of # options specific to FreeRDP tests OLDCPPFLAGS="$CPPFLAGS" @@ -547,7 +555,8 @@ then have_freerdp2=yes PKG_CHECK_MODULES([RDP], [freerdp2 freerdp-client2 winpr2], [CPPFLAGS="${RDP_CFLAGS} -Werror $CPPFLAGS"] - [FREERDP2_PLUGIN_DIR="`$PKG_CONFIG --variable=libdir freerdp2`/freerdp2"], + [AS_IF([test "x${FREERDP2_PLUGIN_DIR}" = "x"], + [FREERDP2_PLUGIN_DIR="`$PKG_CONFIG --variable=libdir freerdp2`/freerdp2"])], [AC_MSG_WARN([ -------------------------------------------- Unable to find FreeRDP (libfreerdp2 / libfreerdp-client2 / libwinpr2)