Check for addin registration headers and function, use if available.

This commit is contained in:
Michael Jumper 2013-07-18 09:34:02 -07:00
parent c2fe48f00c
commit daa1e18355
2 changed files with 17 additions and 1 deletions

View File

@ -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/addin.h>])
#
# FreeRDP: WinPR
#

View File

@ -54,10 +54,18 @@
#include <freerdp/cache/palette.h>
#include <freerdp/cache/pointer.h>
#include <freerdp/cache/offscreen.h>
#include <freerdp/channels/channels.h>
#include <freerdp/client/channels.h>
#include <freerdp/input.h>
#include <freerdp/constants.h>
#ifdef HAVE_FREERDP_CHANNELS_CHANNELS_H
#include <freerdp/channels/channels.h>
#endif
#ifdef HAVE_FREERDP_ADDIN_H
#include <freerdp/addin.h>
#endif
#ifdef ENABLE_WINPR
#include <winpr/wtypes.h>
#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,