From 0657ea74280724a9b5aa2cb3e41c8d7838884f0a 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. --- configure.in | 2 +- include/rdp_keymap.h | 4 ++++ src/rdp_keymap_en_us.c | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 5428b88..881a0f9 100644 --- a/configure.in +++ b/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/include/rdp_keymap.h b/include/rdp_keymap.h index 63460e1..8de2de5 100644 --- a/include/rdp_keymap.h +++ b/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/src/rdp_keymap_en_us.c b/src/rdp_keymap_en_us.c index a8ffef7..2e6dc6f 100644 --- a/src/rdp_keymap_en_us.c +++ b/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" -- 1.7.10.4