diff options
author | Ran Benita <ran234@gmail.com> | 2012-10-16 16:05:33 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-10-16 21:10:04 +0200 |
commit | 5fff637e07d75b24f778210e7838ee9667810806 (patch) | |
tree | 8dfc30199ee6b31a187e05649f5672df563f8265 /configure.ac | |
parent | 3477d9e4480f4f2607d371345cc1c09bb8a35c78 (diff) | |
download | libxkbcommon-5fff637e07d75b24f778210e7838ee9667810806.tar.gz libxkbcommon-5fff637e07d75b24f778210e7838ee9667810806.tar.bz2 libxkbcommon-5fff637e07d75b24f778210e7838ee9667810806.zip |
makekeys: replace helper with python script and binary search
This removes the complicated and undocumented hash-table creation-helper
and replaces it with an autogenerated sorted array. The search uses simple
bsearch() now.
We also tried using gperf but it turned out to generate way to big
hashtables and when reducing the size it isn't really faster than
bsearch() anymore.
There are no users complaining about the speed of keysym lookups and we
have no benchmarks that tell that we are horribly slow. Hence, we can
safely use the simpler approach and drop all that old code.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index b2d2470..76f298a 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,9 @@ if test ! -f "src/xkbcomp/parser.c"; then AC_MSG_ERROR([yacc not found - unable to compile src/xkbcomp/parser.y]) fi fi +AM_PATH_PYTHON([2.6], [], [ + AC_MSG_ERROR([python not found - unable to run makekeys]) +]) # Checks for library functions. AC_CHECK_FUNCS([strcasecmp strncasecmp]) @@ -71,16 +74,6 @@ fi AC_CHECK_FUNCS([eaccess euidaccess]) -# Build native compiler needed for makekeys -AC_ARG_VAR([CC_FOR_BUILD], [Build native C compiler program]) -if test "x$CC_FOR_BUILD" = x; then - if test "$cross_compiling" != no; then - AC_PATH_PROGS([CC_FOR_BUILD], [gcc cc], [cc]) - else - CC_FOR_BUILD="$CC" - fi -fi - XORG_TESTSET_CFLAG([CFLAGS], [-fvisibility=hidden]) # Define a configuration option for the XKB config root @@ -121,7 +114,6 @@ AC_DEFINE_UNQUOTED([DEFAULT_XKB_LAYOUT], ["$DEFAULT_XKB_LAYOUT"], AC_CONFIG_FILES([ Makefile - makekeys/Makefile xkbcommon-uninstalled.pc xkbcommon.pc doc/Doxyfile |