diff --git a/configure.ac b/configure.ac index ce56cb55..188f8cef 100644 --- a/configure.ac +++ b/configure.ac @@ -256,6 +256,12 @@ AC_CHECK_HEADERS([freerdp/locale/keyboard.h],, AC_CHECK_HEADERS([freerdp/kbd/layouts.h],, [have_freerdp=no])) +AC_CHECK_HEADERS([freerdp/addin.h freerdp/client/channels.h]) + +AC_CHECK_DECL([freerdp_register_addin_provider], + [AC_DEFINE([HAVE_FREERDP_REGISTER_ADDIN_PROVIDER])],, + [#include ]) + # # FreeRDP: WinPR # diff --git a/src/protocols/rdp/client.c b/src/protocols/rdp/client.c index 3015446f..9233c5cb 100644 --- a/src/protocols/rdp/client.c +++ b/src/protocols/rdp/client.c @@ -54,10 +54,18 @@ #include #include #include -#include +#include #include #include +#ifdef HAVE_FREERDP_CHANNELS_CHANNELS_H +#include +#endif + +#ifdef HAVE_FREERDP_ADDIN_H +#include +#endif + #ifdef ENABLE_WINPR #include #else @@ -142,8 +150,10 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) { rdp_guac_client_data* guac_client_data = (rdp_guac_client_data*) client->data; +#ifdef HAVE_FREERDP_REGISTER_ADDIN_PROVIDER /* Init FreeRDP add-in provider */ freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0); +#endif /* Load clipboard plugin */ if (freerdp_channels_load_plugin(channels, instance->settings,