summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2002-09-15 20:38:18 (GMT)
committermdejong <mdejong>2002-09-15 20:38:18 (GMT)
commit54cfa15d4fc3958ac9a387965ae472bd82a8ba3c (patch)
tree5cda710d075e6f5a6c17e88074fab8461583632a
parentffa7145291c84c25259567a5ed6cfc14885c2649 (diff)
downloadtk-54cfa15d4fc3958ac9a387965ae472bd82a8ba3c.zip
tk-54cfa15d4fc3958ac9a387965ae472bd82a8ba3c.tar.gz
tk-54cfa15d4fc3958ac9a387965ae472bd82a8ba3c.tar.bz2
* unix/configure: Regen.
* unix/tcl.m4: Update from Tcl. * unix/tkUnixEvent.c (TkpCloseDisplay): Use PEEK_XCLOSEIM to examine the input context queue before invoking XCloseIM. Generate an assert if there is an input context that has not been freed. [Patch 570902]
-rw-r--r--ChangeLog10
-rwxr-xr-xunix/configure232
-rw-r--r--unix/tcl.m43
-rw-r--r--unix/tkUnixEvent.c19
4 files changed, 150 insertions, 114 deletions
diff --git a/ChangeLog b/ChangeLog
index 24ae60e..8308e6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-09-15 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * unix/configure: Regen.
+ * unix/tcl.m4: Update from Tcl.
+ * unix/tkUnixEvent.c (TkpCloseDisplay): Use PEEK_XCLOSEIM
+ to examine the input context queue before invoking
+ XCloseIM. Generate an assert if there is an input
+ context that has not been freed.
+ [Patch 570902]
+
2002-09-13 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* generic/tk.h: Moved RC_INVOKED down so that tcl.h is still
diff --git a/unix/configure b/unix/configure
index b337762..83563c1 100755
--- a/unix/configure
+++ b/unix/configure
@@ -2498,6 +2498,12 @@ fi
EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
fi
+ # XIM peeking works under XFree86.
+ cat >> confdefs.h <<\EOF
+#define PEEK_XCLOSEIM 1
+EOF
+
+
;;
GNU*)
SHLIB_CFLAGS="-fPIC"
@@ -2514,17 +2520,17 @@ fi
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2518: checking for dld.h" >&5
+echo "configure:2524: checking for dld.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2523 "configure"
+#line 2529 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2582,17 +2588,17 @@ fi
# Not available on all versions: check for include file.
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:2586: checking for dlfcn.h" >&5
+echo "configure:2592: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2591 "configure"
+#line 2597 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2620,9 +2626,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:2624: checking for ELF" >&5
+echo "configure:2630: checking for ELF" >&5
cat > conftest.$ac_ext <<EOF
-#line 2626 "configure"
+#line 2632 "configure"
#include "confdefs.h"
#ifdef __ELF__
@@ -2980,17 +2986,17 @@ EOF
# that don't grok the -Bexport option. Test that it does.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:2984: checking for ld accepts -Bexport flag" >&5
+echo "configure:2990: checking for ld accepts -Bexport flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-Bexport"
cat > conftest.$ac_ext <<EOF
-#line 2987 "configure"
+#line 2993 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -3037,9 +3043,9 @@ rm -f conftest*
if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:3041: checking sys/exec.h" >&5
+echo "configure:3047: checking sys/exec.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3043 "configure"
+#line 3049 "configure"
#include "confdefs.h"
#include <sys/exec.h>
int main() {
@@ -3057,7 +3063,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3075,9 +3081,9 @@ EOF
else
echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:3079: checking a.out.h" >&5
+echo "configure:3085: checking a.out.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3081 "configure"
+#line 3087 "configure"
#include "confdefs.h"
#include <a.out.h>
int main() {
@@ -3095,7 +3101,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3113,9 +3119,9 @@ EOF
else
echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:3117: checking sys/exec_aout.h" >&5
+echo "configure:3123: checking sys/exec_aout.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3119 "configure"
+#line 3125 "configure"
#include "confdefs.h"
#include <sys/exec_aout.h>
int main() {
@@ -3133,7 +3139,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3287,7 +3293,7 @@ fi
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:3291: checking for build with symbols" >&5
+echo "configure:3297: checking for build with symbols" >&5
# Check whether --enable-symbols or --disable-symbols was given.
if test "${enable_symbols+set}" = set; then
enableval="$enable_symbols"
@@ -3333,12 +3339,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:3337: checking for sin" >&5
+echo "configure:3343: checking for sin" >&5
if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3342 "configure"
+#line 3348 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sin(); below. */
@@ -3361,7 +3367,7 @@ sin();
; return 0; }
EOF
-if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_sin=yes"
else
@@ -3382,7 +3388,7 @@ MATH_LIBS="-lm"
fi
echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
-echo "configure:3386: checking for main in -lieee" >&5
+echo "configure:3392: checking for main in -lieee" >&5
ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3390,14 +3396,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lieee $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3394 "configure"
+#line 3400 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3428,7 +3434,7 @@ fi
libbsd=no
if test "`uname -s`" = "AIX" ; then
echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:3432: checking for gettimeofday in -lbsd" >&5
+echo "configure:3438: checking for gettimeofday in -lbsd" >&5
ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3436,7 +3442,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3440 "configure"
+#line 3446 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3447,7 +3453,7 @@ int main() {
gettimeofday()
; return 0; }
EOF
-if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3478,9 +3484,9 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking stdlib.h""... $ac_c" 1>&6
-echo "configure:3482: checking stdlib.h" >&5
+echo "configure:3488: checking stdlib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3484 "configure"
+#line 3490 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3495,7 +3501,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3499 "configure"
+#line 3505 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3509,7 +3515,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3513 "configure"
+#line 3519 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3541,16 +3547,16 @@ echo "$ac_t""$tk_ok" 1>&6
#--------------------------------------------------------------------
echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6
-echo "configure:3545: checking fd_set and sys/select" >&5
+echo "configure:3551: checking fd_set and sys/select" >&5
cat > conftest.$ac_ext <<EOF
-#line 3547 "configure"
+#line 3553 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
fd_set readMask, writeMask;
; return 0; }
EOF
-if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tk_ok=yes
else
@@ -3562,7 +3568,7 @@ fi
rm -f conftest*
if test $tk_ok = no; then
cat > conftest.$ac_ext <<EOF
-#line 3566 "configure"
+#line 3572 "configure"
#include "confdefs.h"
#include <sys/select.h>
EOF
@@ -3594,12 +3600,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3598: checking for ANSI C header files" >&5
+echo "configure:3604: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3603 "configure"
+#line 3609 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3607,7 +3613,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3624,7 +3630,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3628 "configure"
+#line 3634 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3642,7 +3648,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
+#line 3652 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3663,7 +3669,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3667 "configure"
+#line 3673 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3674,7 +3680,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3698,12 +3704,12 @@ EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3702: checking for mode_t" >&5
+echo "configure:3708: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3707 "configure"
+#line 3713 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3731,12 +3737,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3735: checking for pid_t" >&5
+echo "configure:3741: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3740 "configure"
+#line 3746 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3764,12 +3770,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3768: checking for size_t" >&5
+echo "configure:3774: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3773 "configure"
+#line 3779 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3797,12 +3803,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3801: checking for uid_t in sys/types.h" >&5
+echo "configure:3807: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3806 "configure"
+#line 3812 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -3839,17 +3845,17 @@ for ac_hdr in sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3843: checking for $ac_hdr" >&5
+echo "configure:3849: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3848 "configure"
+#line 3854 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3876,12 +3882,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3880: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3886: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3885 "configure"
+#line 3891 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -3890,7 +3896,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:3894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -3916,16 +3922,16 @@ fi
#-------------------------------------------
echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6
-echo "configure:3920: checking pw_gecos in struct pwd" >&5
+echo "configure:3926: checking pw_gecos in struct pwd" >&5
cat > conftest.$ac_ext <<EOF
-#line 3922 "configure"
+#line 3928 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
struct passwd pwd; pwd.pw_gecos;
; return 0; }
EOF
-if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tk_ok=yes
else
@@ -3958,7 +3964,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:3962: checking for X" >&5
+echo "configure:3968: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -4020,12 +4026,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 4024 "configure"
+#line 4030 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4094,14 +4100,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4098 "configure"
+#line 4104 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -4191,12 +4197,12 @@ fi
if test "$no_x" = ""; then
if test "$x_includes" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 4195 "configure"
+#line 4201 "configure"
#include "confdefs.h"
#include <X11/XIntrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -4216,15 +4222,15 @@ rm -f conftest*
fi
if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:4220: checking for X11 header files" >&5
+echo "configure:4226: checking for X11 header files" >&5
found_xincludes="no"
cat > conftest.$ac_ext <<EOF
-#line 4223 "configure"
+#line 4229 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4260,7 +4266,7 @@ rm -f conftest*
if test "$no_x" = yes; then
echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:4264: checking for X11 libraries" >&5
+echo "configure:4270: checking for X11 libraries" >&5
XLIBSW=nope
dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
for i in $dirs ; do
@@ -4280,7 +4286,7 @@ echo "configure:4264: checking for X11 libraries" >&5
fi
if test "$XLIBSW" = nope ; then
echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:4284: checking for XCreateWindow in -lXwindow" >&5
+echo "configure:4290: checking for XCreateWindow in -lXwindow" >&5
ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4288,7 +4294,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXwindow $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4292 "configure"
+#line 4298 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4299,7 +4305,7 @@ int main() {
XCreateWindow()
; return 0; }
EOF
-if { (eval echo configure:4303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4373,7 +4379,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\""
#--------------------------------------------------------------------
echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:4377: checking for main in -lXbsd" >&5
+echo "configure:4383: checking for main in -lXbsd" >&5
ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4381,14 +4387,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4385 "configure"
+#line 4391 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4411,12 +4417,12 @@ fi
tk_checkBoth=0
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:4415: checking for connect" >&5
+echo "configure:4421: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4420 "configure"
+#line 4426 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@@ -4439,7 +4445,7 @@ connect();
; return 0; }
EOF
-if { (eval echo configure:4443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@@ -4461,7 +4467,7 @@ fi
if test "$tk_checkSocket" = 1; then
echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:4465: checking for main in -lsocket" >&5
+echo "configure:4471: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4469,14 +4475,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4473 "configure"
+#line 4479 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4502,12 +4508,12 @@ if test "$tk_checkBoth" = 1; then
tk_oldLibs=$LIBS
LIBS="$LIBS -lsocket -lnsl"
echo $ac_n "checking for accept""... $ac_c" 1>&6
-echo "configure:4506: checking for accept" >&5
+echo "configure:4512: checking for accept" >&5
if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4511 "configure"
+#line 4517 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char accept(); below. */
@@ -4530,7 +4536,7 @@ accept();
; return 0; }
EOF
-if { (eval echo configure:4534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_accept=yes"
else
@@ -4552,12 +4558,12 @@ fi
fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:4556: checking for gethostbyname" >&5
+echo "configure:4562: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4561 "configure"
+#line 4567 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@@ -4580,7 +4586,7 @@ gethostbyname();
; return 0; }
EOF
-if { (eval echo configure:4584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@@ -4598,7 +4604,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:4602: checking for main in -lnsl" >&5
+echo "configure:4608: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4606,14 +4612,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4610 "configure"
+#line 4616 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4653,13 +4659,13 @@ LIBS="$LIBS$THREADS_LIBS"
if test -d /usr/include/mit ; then
echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6
-echo "configure:4657: checking MIT X libraries" >&5
+echo "configure:4663: checking MIT X libraries" >&5
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS -I/usr/include/mit"
tk_oldLibs=$LIBS
LIBS="$LIBS -lX11-mit"
cat > conftest.$ac_ext <<EOF
-#line 4663 "configure"
+#line 4669 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
@@ -4670,7 +4676,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
@@ -4697,12 +4703,12 @@ fi
MATH_LIBS=""
echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:4701: checking for sin" >&5
+echo "configure:4707: checking for sin" >&5
if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4706 "configure"
+#line 4712 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sin(); below. */
@@ -4725,7 +4731,7 @@ sin();
; return 0; }
EOF
-if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_sin=yes"
else
@@ -4746,7 +4752,7 @@ MATH_LIBS="-lm"
fi
echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
-echo "configure:4750: checking for main in -lieee" >&5
+echo "configure:4756: checking for main in -lieee" >&5
ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4754,14 +4760,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lieee $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4758 "configure"
+#line 4764 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4788,14 +4794,14 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:4792: checking whether char is unsigned" >&5
+echo "configure:4798: checking whether char is unsigned" >&5
if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
cat > conftest.$ac_ext <<EOF
-#line 4799 "configure"
+#line 4805 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -4817,7 +4823,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 4821 "configure"
+#line 4827 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -4827,7 +4833,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
@@ -4860,12 +4866,12 @@ fi
echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:4864: checking for strtod" >&5
+echo "configure:4870: checking for strtod" >&5
if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4869 "configure"
+#line 4875 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strtod(); below. */
@@ -4888,7 +4894,7 @@ strtod();
; return 0; }
EOF
-if { (eval echo configure:4892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strtod=yes"
else
@@ -4910,7 +4916,7 @@ fi
if test "$tcl_strtod" = 1; then
echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:4914: checking for Solaris2.4/Tru64 strtod bugs" >&5
+echo "configure:4920: checking for Solaris2.4/Tru64 strtod bugs" >&5
if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4919,7 +4925,7 @@ else
tcl_cv_strtod_buggy=0
else
cat > conftest.$ac_ext <<EOF
-#line 4923 "configure"
+#line 4929 "configure"
#include "confdefs.h"
extern double strtod();
@@ -4942,7 +4948,7 @@ else
exit(0);
}
EOF
-if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
tcl_cv_strtod_buggy=1
else
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 31f43a9..45ccfe0 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1117,6 +1117,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
fi
+ # XIM peeking works under XFree86.
+ AC_DEFINE(PEEK_XCLOSEIM)
+
;;
GNU*)
SHLIB_CFLAGS="-fPIC"
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index 918d66a..acdf97b 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixEvent.c,v 1.9 2002/06/19 19:37:55 mdejong Exp $
+ * RCS: @(#) $Id: tkUnixEvent.c,v 1.10 2002/09/15 20:38:18 mdejong Exp $
*/
#include "tkInt.h"
@@ -26,6 +26,17 @@ typedef struct ThreadSpecificData {
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
+#if defined(TK_USE_INPUT_METHODS) && defined(PEEK_XCLOSEIM)
+/*
+ * Structure used to peek into internal XIM data structure.
+ * Enabled only on systems where we are sure it works.
+ */
+struct XIMPeek {
+ void *junk1, *junk2;
+ XIC ic_chain;
+};
+#endif
+
/*
* Prototypes for procedures that are referenced only in this file:
*/
@@ -180,6 +191,12 @@ TkpCloseDisplay(dispPtr)
* One can work around this issue by making sure a XDestroyIC()
* gets invoked for each XCreateIC().
*/
+
+#if defined(TK_USE_INPUT_METHODS) && defined(PEEK_XCLOSEIM)
+ struct XIMPeek *peek = (struct XIMPeek *) dispPtr->inputMethod;
+ if (peek->ic_chain != NULL)
+ panic("input contexts not freed before XCloseIM");
+#endif
XCloseIM(dispPtr->inputMethod);
}
#endif