diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-05-22 07:57:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-05-22 07:57:48 (GMT) |
commit | 586b77aea13cf6128fc8d09fbfff887ab9838545 (patch) | |
tree | 49732b9d8128de8e9bacd6ec26fa5d3a15bd3813 /unix/configure.in | |
parent | 7aa36089928e7adb750ca9afab8fb779551fb093 (diff) | |
download | tk-586b77aea13cf6128fc8d09fbfff887ab9838545.zip tk-586b77aea13cf6128fc8d09fbfff887ab9838545.tar.gz tk-586b77aea13cf6128fc8d09fbfff887ab9838545.tar.bz2 |
Only call XInitThreads() when we have a very new X11 library. Checked by looking whether XKeycodeToKeysym() is deprecated, which also happend in some very new X11 version.
Diffstat (limited to 'unix/configure.in')
-rw-r--r-- | unix/configure.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/unix/configure.in b/unix/configure.in index 3c59369..bc22472 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -589,6 +589,25 @@ if test $tk_aqua = no; then fi #-------------------------------------------------------------------- +# Check whether XKeycodeToKeysym is deprecated in X11 headers. +#-------------------------------------------------------------------- + +if test $tk_aqua = no; then + AC_MSG_CHECKING([whether XKeycodeToKeysym is deprecated]) + tk_oldCFlags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_TRY_LINK([ + #include <X11/Xlib.h> + ], [ + XKeycodeToKeysym(0,0,0); + ], [ + AC_MSG_RESULT([yes]) + AC_DEFINE(XKEYCODETOKEYSYM_IS_DEPRECATED, 1, [Is XKeycodeToKeysym deprecated?]) + ], AC_MSG_RESULT([no])) + CFLAGS=$tk_oldCFlags +fi + +#-------------------------------------------------------------------- # XXX Do this last. # It might modify XLIBSW which could affect other tests. # |