From 8a8924dc7da4e3037ecaf66f23491317680631e8 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 16 May 2012 00:40:07 -0700 Subject: [PATCH] Check for freerdp/locale/keyboard.h before using it, default to old freerdp/kbd/layouts.h if missing. --- protocols/rdp/configure.in | 2 +- protocols/rdp/include/rdp_keymap.h | 4 ++++ protocols/rdp/src/rdp_keymap_en_us.c | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/protocols/rdp/configure.in b/protocols/rdp/configure.in index 5428b885..881a0f98 100644 --- a/protocols/rdp/configure.in +++ b/protocols/rdp/configure.in @@ -53,7 +53,7 @@ AC_CHECK_LIB([freerdp-utils], [xzalloc],, AC_MSG_ERROR("libfreerdp-utils is requ AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert],, AC_MSG_ERROR("libfreerdp-codec is required (part of FreeRDP)")) # Checks for header files. -AC_CHECK_HEADERS([guacamole/client.h guacamole/guacio.h guacamole/protocol.h]) +AC_CHECK_HEADERS([guacamole/client.h guacamole/guacio.h guacamole/protocol.h freerdp/locale/keyboard.h freerdp/kbd/layouts.h]) # Checks for library functions. AC_FUNC_MALLOC diff --git a/protocols/rdp/include/rdp_keymap.h b/protocols/rdp/include/rdp_keymap.h index 63460e17..8de2de54 100644 --- a/protocols/rdp/include/rdp_keymap.h +++ b/protocols/rdp/include/rdp_keymap.h @@ -38,7 +38,11 @@ #ifndef _GUAC_RDP_RDP_KEYMAP_H #define _GUAC_RDP_RDP_KEYMAP_H +#ifdef HAVE_FREERDP_LOCALE_KEYBOARD_H #include +#else +#include +#endif /** * Represents a keysym-to-scancode mapping for RDP, with extra information diff --git a/protocols/rdp/src/rdp_keymap_en_us.c b/protocols/rdp/src/rdp_keymap_en_us.c index a8ffef79..2e6dc6f6 100644 --- a/protocols/rdp/src/rdp_keymap_en_us.c +++ b/protocols/rdp/src/rdp_keymap_en_us.c @@ -37,7 +37,12 @@ * ***** END LICENSE BLOCK ***** */ #include + +#ifdef HAVE_FREERDP_LOCALE_KEYBOARD_H #include +#else +#include +#endif #include "rdp_keymap.h"