Pull in a few #defines from libxkbfile and lower kbproto requirement
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
diff --git a/configure.ac b/configure.ac
index 26e37ab..5b1efb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ if test "x$GCC" = xyes ; then
CFLAGS="$CFLAGS -fvisibility=hidden"
fi
-PKG_CHECK_MODULES([X11], [xproto kbproto >= 1.0.99.1])
+PKG_CHECK_MODULES([X11], [xproto kbproto >= 1.0.5])
PKG_CHECK_MODULES([XLIB], [x11])
dnl Ensure we have keysym headers
diff --git a/include/X11/extensions/XKBcommon.h b/include/X11/extensions/XKBcommon.h
index 61d7d78..96203aa 100644
--- a/include/X11/extensions/XKBcommon.h
+++ b/include/X11/extensions/XKBcommon.h
@@ -64,6 +64,24 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
typedef unsigned char KeyCode;
#endif
+#define XkmFileVersion 15
+
+#define XkmIllegalFile -1
+#define XkmSemanticsFile 20
+#define XkmLayoutFile 21
+#define XkmKeymapFile 22
+#define XkmGeometryFile 23
+#define XkmRulesFile 24
+
+#define XkmTypesIndex 0
+#define XkmCompatMapIndex 1
+#define XkmSymbolsIndex 2
+#define XkmIndicatorsIndex 3
+#define XkmKeyNamesIndex 4
+#define XkmGeometryIndex 5
+#define XkmVirtualModsIndex 6
+#define XkmLastIndex XkmVirtualModsIndex
+
struct xkb_rule_names {
char * rules;
char * model;
diff --git a/src/text.c b/src/text.c
index 625f112..c51f127 100644
--- a/src/text.c
+++ b/src/text.c
@@ -30,7 +30,6 @@
#include "xkbmisc.h"
#include "X11/extensions/XKBcommon.h"
#include "XKBcommonint.h"
-#include <X11/extensions/XKM.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c
index 679b00b..3a5d5bf 100644
--- a/src/xkbcomp/xkbcomp.c
+++ b/src/xkbcomp/xkbcomp.c
@@ -28,7 +28,6 @@ authorization from the authors.
#include "xkbcomp.h"
#include "xkballoc.h"
#include "xkbrules.h"
-#include <X11/extensions/XKM.h>
#include "xkbpath.h"
#include "parseutils.h"
#include "utils.h"
diff --git a/src/xkbcomp/xkbpath.c b/src/xkbcomp/xkbpath.c
index 92f71aa..64048db 100644
--- a/src/xkbcomp/xkbpath.c
+++ b/src/xkbcomp/xkbpath.c
@@ -27,8 +27,8 @@
#define DEBUG_VAR debugFlags
#include "utils.h"
#include <stdlib.h>
-#include <X11/extensions/XKM.h>
#include "xkbpath.h"
+#include "X11/extensions/XKBcommon.h"
#include "XKBcommonint.h"
#ifndef DFLT_XKB_CONFIG_ROOT
diff --git a/xkbcommon.pc.in b/xkbcommon.pc.in
index b8587c8..0891944 100644
--- a/xkbcommon.pc.in
+++ b/xkbcommon.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: xkbcommon
Description: XKB API common to servers and clients
Version: @PACKAGE_VERSION@
-Requires: xproto kbproto >= 1.0.99.1
+Requires: xproto kbproto >= 1.0.5
Cflags: -I${includedir}
Libs: -L${libdir} -lxkbcommon