summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-05-23 08:30:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-05-23 08:30:25 (GMT)
commit87bf3a06657cebfa60f9342700840162a8053df5 (patch)
tree8d7a4dd933cb624ade75995443ca4b51f07eb6db /unix/configure
parente1e1944517d89e734f0a5068ac86cd7f2395841c (diff)
parent586b77aea13cf6128fc8d09fbfff887ab9838545 (diff)
downloadtk-87bf3a06657cebfa60f9342700840162a8053df5.zip
tk-87bf3a06657cebfa60f9342700840162a8053df5.tar.gz
tk-87bf3a06657cebfa60f9342700840162a8053df5.tar.bz2
Fix for [3613668] by not calling XInitThreads when either 1) Tcl is compiled without threads 2) X11 library is too old.
A more direct test would be more desirable, but for now this should be fine.
Diffstat (limited to 'unix/configure')
-rwxr-xr-xunix/configure71
1 files changed, 71 insertions, 0 deletions
diff --git a/unix/configure b/unix/configure
index d8a271d..7f31ae7 100755
--- a/unix/configure
+++ b/unix/configure
@@ -10769,6 +10769,77 @@ _ACEOF
fi
#--------------------------------------------------------------------
+# Check whether XKeycodeToKeysym is deprecated in X11 headers.
+#--------------------------------------------------------------------
+
+if test $tk_aqua = no; then
+ echo "$as_me:$LINENO: checking whether XKeycodeToKeysym is deprecated" >&5
+echo $ECHO_N "checking whether XKeycodeToKeysym is deprecated... $ECHO_C" >&6
+ tk_oldCFlags=$CFLAGS
+ CFLAGS="$CFLAGS -Werror"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <X11/Xlib.h>
+
+int
+main ()
+{
+
+ XKeycodeToKeysym(0,0,0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define XKEYCODETOKEYSYM_IS_DEPRECATED 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS=$tk_oldCFlags
+fi
+
+#--------------------------------------------------------------------
# XXX Do this last.
# It might modify XLIBSW which could affect other tests.
#