From 9baf62f3076a88926b5c81c2a0dce5bc7c96f562 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sun, 20 May 2012 20:51:50 +0300 Subject: [PATCH] Remove configure check for X11 keysym files Since every user building the library, even from git, doesn't need these files anymore, there's no need to check for them (this goes for makekeys as well). The only remaining user is the update-keysyms target, but whoever will run it again (if ever) will probably know what he's doing (at least enough to run git diff before git commit). And the defaults should be fine too. Signed-off-by: Ran Benita --- Makefile.am | 9 ++++++++- configure.ac | 23 ----------------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/Makefile.am b/Makefile.am index 26cfec5..a5d34f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -98,7 +98,7 @@ src/xkbcomp/parser.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xk src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp) src/xkbcomp/scanner.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp) -src/ks_tables.h: $(KEYSYMDEFS) $(top_builddir)/makekeys/makekeys$(EXEEXT) +src/ks_tables.h: $(top_builddir)/makekeys/makekeys$(EXEEXT) $(AM_V_GEN)$(top_builddir)/makekeys/makekeys $(top_srcdir)/include/xkbcommon/xkbcommon-keysyms.h > $@ $(top_builddir)/makekeys/makekeys$(EXEEXT): $(top_srcdir)/makekeys/makekeys.c @@ -148,5 +148,12 @@ EXTRA_DIST = test/data # handle a duplicate definition in HPkeysyms.h which kicks in if it's # not already defined. +X11_INCLUDEDIR = /usr/include/X11 +KEYSYMDEFS = \ + $(X11_INCLUDEDIR)/keysymdef.h \ + $(X11_INCLUDEDIR)/XF86keysym.h \ + $(X11_INCLUDEDIR)/Sunkeysym.h \ + $(X11_INCLUDEDIR)/DECkeysym.h \ + $(X11_INCLUDEDIR)/HPkeysym.h update-keysyms: sed -e '/XK_Ydiaeresis\s*0x100000ee/d; /#define _/d; s/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/; /\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) > include/xkbcommon/xkbcommon-keysyms.h diff --git a/configure.ac b/configure.ac index 227026d..6cdaa48 100644 --- a/configure.ac +++ b/configure.ac @@ -85,29 +85,6 @@ fi # Obtain protocols headers include directives PKG_CHECK_MODULES([X11], [xproto kbproto >= 1.0.4]) -# Obtain the path to the X Window System Core Protocol -AC_MSG_CHECKING([for X11 includedir]) -AC_ARG_VAR([X11_INCLUDEDIR], [Path to X protocol keysym headers]) -if test "x$X11_INCLUDEDIR" = x; then - X11_INCLUDEDIR="`$PKG_CONFIG --variable=includex11dir xproto`" -fi -if ! test -d "$X11_INCLUDEDIR"; then - AC_MSG_ERROR([invalid X11 include path $X11_INCLUDEDIR]) -fi -AC_MSG_RESULT([$X11_INCLUDEDIR]) - -AC_MSG_CHECKING([keysym definition files]) -FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h" -for i in $FILES; do - if test -f "$X11_INCLUDEDIR/$i"; then - KEYSYMDEFS="$KEYSYMDEFS $X11_INCLUDEDIR/$i" - else - AC_MSG_ERROR([cannot find $i in $X11_INCLUDEDIR]) - fi -done -AC_MSG_RESULT([$KEYSYMDEFS]) -AC_SUBST(KEYSYMDEFS) - # Define a configuration option for the XKB config root xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config` if test "x$xkb_base" = x; then