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)
commit17cb86f48762e568351db98515ddd444b7066790 (patch)
tree45ce59bcddb014db163b1cef43f02bc642cdf6fa /unix/configure.in
parentb5779d80351838f9fda609c2a1febd052109695d (diff)
downloadtk-17cb86f48762e568351db98515ddd444b7066790.zip
tk-17cb86f48762e568351db98515ddd444b7066790.tar.gz
tk-17cb86f48762e568351db98515ddd444b7066790.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.
#