summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authorstwo <stwo>2013-01-31 11:41:18 (GMT)
committerstwo <stwo>2013-01-31 11:41:18 (GMT)
commit169e48cdd00939a1b20756a05e89592f1db36c5e (patch)
tree45ce59bcddb014db163b1cef43f02bc642cdf6fa /unix/configure.in
parent4682e1fb605d0fff7e8338f10080416e3e342cb9 (diff)
downloadtk-169e48cdd00939a1b20756a05e89592f1db36c5e.zip
tk-169e48cdd00939a1b20756a05e89592f1db36c5e.tar.gz
tk-169e48cdd00939a1b20756a05e89592f1db36c5e.tar.bz2
Bug [3599928]: Use XkbKeycodeToKeysym if available.
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 00a67ed..3c59369 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -559,6 +559,36 @@ if test $tk_aqua = no; then
fi
#--------------------------------------------------------------------
+# Check for XkbKeycodeToKeysym.
+#--------------------------------------------------------------------
+
+if test $tk_aqua = no; then
+ tk_oldCFlags=$CFLAGS
+ tk_oldLibs=$LIBS
+ CFLAGS="$CFLAGS $XINCLUDES"
+ LIBS="$LIBS $XLIBSW"
+ AC_CHECK_HEADER(X11/XKBlib.h, [
+ xkblib_header_found=yes
+ ], [
+ xkblib_header_found=no
+ ], [#include <X11/Xlib.h>])
+ if test $xkblib_header_found = "yes" ; then
+ AC_CHECK_LIB(X11, XkbKeycodeToKeysym, [
+ xkbkeycodetokeysym_found=yes
+ ], [
+ xkbkeycodetokeysym_found=no
+ ])
+ else
+ xkbkeycodetokeysym_found=no
+ fi
+ if test $xkbkeycodetokeysym_found = "yes" ; then
+ AC_DEFINE(HAVE_XKBKEYCODETOKEYSYM, 1, [Do we have XkbKeycodeToKeysym?])
+ fi
+ CFLAGS=$tk_oldCFlags
+ LIBS=$tk_oldLibs
+fi
+
+#--------------------------------------------------------------------
# XXX Do this last.
# It might modify XLIBSW which could affect other tests.
#