Index: CHANGES-beta
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/CHANGES-beta,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -r1.206 -r1.207
--- CHANGES-beta	2002/07/27 03:52:44	1.206
+++ CHANGES-beta	2002/08/30 08:25:48	1.207
@@ -1,3 +1,51 @@
+to 21.5.9 "brussels sprouts"
+
+The main thrust of this release is the new GC algorithms.  If you want
+to test this out configure with '--use-kkcc'.
+
+There are of course, the usual swag of bug fixes, typo fixes, and
+document updates.
+
+-- Add an extra element to the version string that can be used to
+   include a date in the version string - Youngs.
+-- Improve help string for --with-widgets configure option - Skytt�.
+-- Define runtime & build problems, and rewrite "Hannibal Lecter"
+   stuff in PROBLEMS - Turnbull.
+-- Add builtin and constant faces to font-lock-face-list - Skytt�.
+-- Japanese language fixes - Yamaoka.
+-- Fix find-library to allow Mule XEmacsen to find compressed
+   libraries - Youngs.
+-- New alias for 'delete-indentation' (join-line) - Wallington.
+-- Support docstring for define-derived-mode - Turnbull
+-- Doc fix for keybindings in term.texi and misc.texi - Skytt�.
+-- Bring package list up to date in packages.texi - Skytt�.
+-- Document purecopy as a no-op - Josefsson.
+-- New document chapter "Regression Testing XEmacs" - Turnbull.
+-- Add "USE_KKCC" option to ./nt/xemacs.mak - Aichner.
+-- New GC algorithms implemented (Turn them on with --use-kkcc
+   configure option) - Sperber, Crestani, Kaltenbach, Bush.
+-- Define HAVE_WCHAR_H for native Win32 builds - Harris.
+-- Fix x_locate_pixmap_file make sure path is not 0 - MacLennan.
+-- Fix memory leak - Verna.
+-- Add missing call to 'xfree (newname)' in 'make_coding_system_1
+   - Verna. 
+-- Fix --with-mule --with-gtk builds - Barta.
+-- Make SEPCHAR a required arg to Fsplit_string_by_char - Palmer.
+-- Make locate_file indicate success with nonnegative return if MODE
+   is nonnegative - James.
+-- Fix splitting window horizontally not splitting evenly - James.
+-- ORDINARY_LINK OK for Linux - James.
+-- Don't bogusly reinitialise ascii_character property in
+   maybe_define_x_key_as_self_inserting_character - Astapov.
+-- Add warning to SOE_DEBUG about not using until debugging functions
+   are rewritten - Turnbull.
+-- Update 'do_autoload' to GCPRO both arguments - Turnbull.
+-- Update automated tests so they don't barf if required packages
+   aren't present - Turnbull.
+-- Organise NSIG setting code for SVR4 in a better way - James.
+-- Various typo fixes - Skytt�, Turnbull, James.
+
+
 to 21.5.8 "broccoli"
 
 Lots of fixes and changes.  This release is primarily been done to
@@ -11,7 +59,7 @@
    algorithms - Sperber.
 -- Identify "--with-modules" as an autodetected configure option -
    James. 
--- Add a couple of configuration questions to PROBLEMS - Turnball.
+-- Add a couple of configuration questions to PROBLEMS - Turnbull.
 -- Test for wchar.h in configure - Sperber.
 -- Update package-index files - Youngs.
 -- s/Xemacs/XEmacs/ doc fixes - Aichner.
@@ -33,7 +81,7 @@
 -- GC fixes - Sperber.
 -- Updates to lisp.h, symbols.c for DSO's - James.
 -- Fix to mswindows_need_event - Alexander.
--- Declare Fcdr_safe to be callable from C - Turnball.
+-- Declare Fcdr_safe to be callable from C - Turnbull.
 -- Ffunctionp return nil for autoloaded macros & keymaps - Niksic.
 -- Subwindow fixes - Ueno.
 -- Include wchar.h only if available, define wclsen if not - Sperber.
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/ChangeLog,v
retrieving revision 1.313
retrieving revision 1.317
diff -u -r1.313 -r1.317
--- ChangeLog	2002/07/27 03:52:44	1.313
+++ ChangeLog	2002/08/30 08:25:48	1.317
@@ -1,3 +1,29 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
+2002-08-16  Steve Youngs  <youngs@xemacs.org>
+
+	* version.sh (xemacs_extra_name): New var to identify XEmacs
+	version > release < next release.  ie, release+cvs.
+
+	* configure.in: Test for xemacs_extra_name. 
+
+	* configure: Re-generate.
+
+2002-08-22  Ville Skytt�  <ville.skytta@xemacs.org>
+
+	* configure.usage: Reorder usage message to clarify what widgets
+	are supported and what aren't.
+
+2002-08-10  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* PROBLEMS (General advice): Define runtime and build problems.
+
+2002-07-24  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* PROBLEMS (Running, Linux): Rewrite "Hannibal Lecter" ld stuff.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: PROBLEMS
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/PROBLEMS,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- PROBLEMS	2002/07/10 06:23:37	1.53
+++ PROBLEMS	2002/08/10 06:37:37	1.54
@@ -21,9 +21,19 @@
 XEmacs provides (e.g. `C-s').
 
 General advice:
+
     WATCH OUT for your init file! (~/.xemacs/init.el or ~/.emacs)  If
     you observe strange problems, invoke XEmacs with the `-vanilla'
     option and see if you can repeat the problem.
+
+    Note that most of the problems described here manifest at RUN
+    time, even those described as BUILD problems.  It is quite unusual
+    for a released XEmacs to fail to build.  So a "build problem"
+    requires you to tweak the build environment, then rebuild XEmacs.
+    A "runtime problem" is one that can be fixed by proper
+    configuration of the existing build.  Compatibility problems and
+    Mule issues are generally runtime problems, but are treated
+    separately for convenience.
 
 
 * Problems with building XEmacs
Index: README
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/README,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- README	2002/03/18 10:13:39	1.16
+++ README	2002/08/20 06:31:26	1.17
@@ -1,7 +1,6 @@
 This directory tree holds version 21.5 of XEmacs.
 
 
-
 *** What is XEmacs?
 
 XEmacs is a powerful, highly customizable open source text editor and
Index: configure
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -r1.180 -r1.181
--- configure	2002/07/16 08:26:39	1.180
+++ configure	2002/08/28 05:36:21	1.181
@@ -972,6 +972,16 @@
 EOF
 }
 
+if test "X$xemacs_extra_name" != "X"; then
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining XEMACS_EXTRA_NAME = "$xemacs_extra_name"
+EOF
+cat >> confdefs.h <<EOF
+#define XEMACS_EXTRA_NAME "$xemacs_extra_name"
+EOF
+}
+
+fi
 { test "$extra_verbose" = "yes" && cat << EOF
     Defining EMACS_VERSION = "$version"
 EOF
@@ -1133,7 +1143,7 @@
 
 
 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
-echo "configure:1137: checking "host system type"" >&5
+echo "configure:1147: checking "host system type"" >&5
 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
@@ -1646,7 +1656,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1650: checking for $ac_word" >&5
+echo "configure:1660: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1673,7 +1683,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1677: checking for $ac_word" >&5
+echo "configure:1687: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1721,7 +1731,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1725: checking for $ac_word" >&5
+echo "configure:1735: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1750,7 +1760,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1763,12 +1773,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1767 "configure"
+#line 1777 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1796,19 +1806,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1800: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1805: checking whether we are using GNU C" >&5
+echo "configure:1815: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1826,7 +1836,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1830: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1840: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1859,7 +1869,7 @@
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1863: checking for $ac_word" >&5
+echo "configure:1873: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1886,7 +1896,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1890: checking for $ac_word" >&5
+echo "configure:1900: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1934,7 +1944,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1938: checking for $ac_word" >&5
+echo "configure:1948: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1963,7 +1973,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1967: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1977: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1976,12 +1986,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1980 "configure"
+#line 1990 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -2009,19 +2019,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2013: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2023: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2018: checking whether we are using GNU C" >&5
+echo "configure:2028: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -2039,7 +2049,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2043: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2053: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -2072,7 +2082,7 @@
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2076: checking for $ac_word" >&5
+echo "configure:2086: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2099,7 +2109,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2103: checking for $ac_word" >&5
+echo "configure:2113: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2147,7 +2157,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2151: checking for $ac_word" >&5
+echo "configure:2161: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2176,7 +2186,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2180: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2190: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -2189,12 +2199,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 2193 "configure"
+#line 2203 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -2222,19 +2232,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2226: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2236: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2231: checking whether we are using GNU C" >&5
+echo "configure:2241: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -2252,7 +2262,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2256: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2266: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -2289,7 +2299,7 @@
 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2293: checking how to run the C preprocessor" >&5
+echo "configure:2303: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2302,13 +2312,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2306 "configure"
+#line 2316 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2322: \"$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
   :
@@ -2319,13 +2329,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2323 "configure"
+#line 2333 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2339: \"$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
   :
@@ -2336,13 +2346,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2340 "configure"
+#line 2350 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2356: \"$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
   :
@@ -2368,9 +2378,9 @@
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2372: checking for AIX" >&5
+echo "configure:2382: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2374 "configure"
+#line 2384 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -2397,9 +2407,9 @@
  
 
 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
-echo "configure:2401: checking for GNU libc" >&5
+echo "configure:2411: checking for GNU libc" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2413 "configure"
 #include "confdefs.h"
 #include <features.h>
 int main() {
@@ -2411,7 +2421,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   have_glibc=yes
 else
@@ -2488,7 +2498,7 @@
 esac
 
 cat > conftest.$ac_ext <<EOF
-#line 2492 "configure"
+#line 2502 "configure"
 #include "confdefs.h"
 int main () {
 #if defined __SUNPRO_C
@@ -2502,7 +2512,7 @@
 #endif
 }
 EOF
-if { (eval echo configure:2506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
@@ -2754,17 +2764,17 @@
 
 if test "$__USLC__" = yes; then
   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
-echo "configure:2758: checking for whether the -Kalloca compiler flag is needed" >&5
+echo "configure:2768: checking for whether the -Kalloca compiler flag is needed" >&5
   need_kalloca=no
   cat > conftest.$ac_ext <<EOF
-#line 2761 "configure"
+#line 2771 "configure"
 #include "confdefs.h"
 
 int main() {
 void *x = alloca(4);
 ; return 0; }
 EOF
-if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   :
 else
@@ -2775,14 +2785,14 @@
     xe_save_c_switch_system="$c_switch_system"
     c_switch_system="$c_switch_system -Kalloca"
     cat > conftest.$ac_ext <<EOF
-#line 2779 "configure"
+#line 2789 "configure"
 #include "confdefs.h"
 
 int main() {
 void *x = alloca(4);
 ; return 0; }
 EOF
-if { (eval echo configure:2786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    need_kalloca=yes 
 else
@@ -2820,7 +2830,7 @@
 
 if test "$GCC" = "yes"; then
 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
-echo "configure:2824: checking for buggy gcc versions" >&5
+echo "configure:2834: checking for buggy gcc versions" >&5
 GCC_VERSION=`$CC --version`
 case `uname -s`:`uname -m`:$GCC_VERSION in
 		    *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
@@ -2878,7 +2888,7 @@
 
 if test "$pdump" != "yes"; then
   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
-echo "configure:2882: checking for \"-z nocombreloc\" linker flag" >&5
+echo "configure:2892: checking for \"-z nocombreloc\" linker flag" >&5
   case "`ld --help 2>&1`" in
     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
@@ -2967,7 +2977,7 @@
  fi
 
 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2971: checking for dynodump" >&5
+echo "configure:2981: checking for dynodump" >&5
 if test "$unexec" != "unexsol2.o"; then
   echo "$ac_t""no" 1>&6
 else
@@ -3005,12 +3015,12 @@
   done
   
 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
-echo "configure:3009: checking for terminateAndUnload in -lC" >&5
+echo "configure:3019: checking for terminateAndUnload in -lC" >&5
 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lC "
 cat > conftest.$ac_ext <<EOF
-#line 3014 "configure"
+#line 3024 "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
@@ -3021,7 +3031,7 @@
 terminateAndUnload()
 ; return 0; }
 EOF
-if { (eval echo configure:3025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3035: \"$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
@@ -3129,7 +3139,7 @@
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:3133: checking "for runtime libraries flag"" >&5
+echo "configure:3143: checking "for runtime libraries flag"" >&5
   case "$opsys" in
     sol2 ) dash_r="-R" ;;
     decosf* | linux* | irix*) dash_r="-rpath " ;;
@@ -3151,14 +3161,14 @@
   done
 fi
         cat > conftest.$ac_ext <<EOF
-#line 3155 "configure"
+#line 3165 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
@@ -3259,10 +3269,10 @@
 fi
 after_morecore_hook_exists=yes
 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
-echo "configure:3263: checking for malloc_set_state" >&5
+echo "configure:3273: checking for malloc_set_state" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3266 "configure"
+#line 3276 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char malloc_set_state(); below.  */
@@ -3285,7 +3295,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_malloc_set_state=yes"
 else
@@ -3305,16 +3315,16 @@
 fi
 
 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
-echo "configure:3309: checking whether __after_morecore_hook exists" >&5
+echo "configure:3319: checking whether __after_morecore_hook exists" >&5
 cat > conftest.$ac_ext <<EOF
-#line 3311 "configure"
+#line 3321 "configure"
 #include "confdefs.h"
 extern void (* __after_morecore_hook)();
 int main() {
 __after_morecore_hook = 0
 ; return 0; }
 EOF
-if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -3370,7 +3380,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3374: checking for $ac_word" >&5
+echo "configure:3384: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -3425,7 +3435,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3429: checking for a BSD compatible install" >&5
+echo "configure:3439: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
   IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
@@ -3479,7 +3489,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3483: checking for $ac_word" >&5
+echo "configure:3493: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -3511,15 +3521,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3515: checking for $ac_hdr" >&5
+echo "configure:3525: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3518 "configure"
+#line 3528 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3533: \"$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*
@@ -3549,10 +3559,10 @@
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:3553: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:3563: checking for sys/wait.h that is POSIX.1 compatible" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3556 "configure"
+#line 3566 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -3568,7 +3578,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:3572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -3592,10 +3602,10 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3596: checking for ANSI C header files" >&5
+echo "configure:3606: checking for ANSI C header files" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3599 "configure"
+#line 3609 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3603,7 +3613,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3607: \"$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*
@@ -3620,7 +3630,7 @@
 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 3624 "configure"
+#line 3634 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3638,7 +3648,7 @@
 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 3642 "configure"
+#line 3652 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3656,7 +3666,7 @@
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 cat > conftest.$ac_ext <<EOF
-#line 3660 "configure"
+#line 3670 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3667,7 +3677,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
@@ -3693,10 +3703,10 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3697: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3707: checking whether time.h and sys/time.h may both be included" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3700 "configure"
+#line 3710 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3705,7 +3715,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3729,10 +3739,10 @@
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:3733: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:3743: checking for sys_siglist declaration in signal.h or unistd.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3736 "configure"
+#line 3746 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3744,7 +3754,7 @@
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -3770,9 +3780,9 @@
 
 
 echo $ac_n "checking for utime""... $ac_c" 1>&6
-echo "configure:3774: checking for utime" >&5
+echo "configure:3784: checking for utime" >&5
 cat > conftest.$ac_ext <<EOF
-#line 3776 "configure"
+#line 3786 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <utime.h>
@@ -3780,7 +3790,7 @@
 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
 ; return 0; }
 EOF
-if { (eval echo configure:3784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -3799,10 +3809,10 @@
       for ac_func in utimes
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3803: checking for $ac_func" >&5
+echo "configure:3813: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3806 "configure"
+#line 3816 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3825,7 +3835,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3857,10 +3867,10 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3861: checking return type of signal handlers" >&5
+echo "configure:3871: checking return type of signal handlers" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3864 "configure"
+#line 3874 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3877,7 +3887,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3899,10 +3909,10 @@
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3903: checking for size_t" >&5
+echo "configure:3913: checking for size_t" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3906 "configure"
+#line 3916 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3933,10 +3943,10 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3937: checking for pid_t" >&5
+echo "configure:3947: checking for pid_t" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
+#line 3950 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3967,10 +3977,10 @@
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3971: checking for uid_t in sys/types.h" >&5
+echo "configure:3981: checking for uid_t in sys/types.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3974 "configure"
+#line 3984 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -4006,10 +4016,10 @@
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:4010: checking for mode_t" >&5
+echo "configure:4020: checking for mode_t" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4013 "configure"
+#line 4023 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4040,10 +4050,10 @@
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:4044: checking for off_t" >&5
+echo "configure:4054: checking for off_t" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4047 "configure"
+#line 4057 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4074,10 +4084,10 @@
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:4078: checking for ssize_t" >&5
+echo "configure:4088: checking for ssize_t" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4081 "configure"
+#line 4091 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4109,9 +4119,9 @@
 
 
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:4113: checking for socklen_t" >&5
+echo "configure:4123: checking for socklen_t" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4115 "configure"
+#line 4125 "configure"
 #include "confdefs.h"
 #include <sys/socket.h>
 socklen_t x;
@@ -4120,7 +4130,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -4129,7 +4139,7 @@
   rm -rf conftest*
   
 cat > conftest.$ac_ext <<EOF
-#line 4133 "configure"
+#line 4143 "configure"
 #include "confdefs.h"
 #include <sys/socket.h>
 int accept (int, struct sockaddr *, size_t *);
@@ -4138,7 +4148,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 echo "$ac_t""size_t" 1>&6
@@ -4170,9 +4180,9 @@
 rm -f conftest*
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:4174: checking for struct timeval" >&5
+echo "configure:4184: checking for struct timeval" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4176 "configure"
+#line 4186 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -4188,7 +4198,7 @@
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
-if { (eval echo configure:4192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
@@ -4210,10 +4220,10 @@
 rm -f conftest*
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:4214: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:4224: checking whether struct tm is in sys/time.h or time.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4217 "configure"
+#line 4227 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -4221,7 +4231,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:4225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -4245,10 +4255,10 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:4249: checking for tm_zone in struct tm" >&5
+echo "configure:4259: checking for tm_zone in struct tm" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4252 "configure"
+#line 4262 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -4256,7 +4266,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -4279,10 +4289,10 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:4283: checking for tzname" >&5
+echo "configure:4293: checking for tzname" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4286 "configure"
+#line 4296 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -4292,7 +4302,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:4296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -4318,10 +4328,10 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4322: checking for working const" >&5
+echo "configure:4332: checking for working const" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4325 "configure"
+#line 4335 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -4370,7 +4380,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -4395,7 +4405,7 @@
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:4399: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:4409: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
@@ -4420,12 +4430,12 @@
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:4424: checking whether byte ordering is bigendian" >&5
+echo "configure:4434: checking whether byte ordering is bigendian" >&5
 
 ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 4429 "configure"
+#line 4439 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -4436,11 +4446,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:4440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 4444 "configure"
+#line 4454 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -4451,7 +4461,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:4455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -4468,7 +4478,7 @@
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
-#line 4472 "configure"
+#line 4482 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -4481,7 +4491,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_c_bigendian=no
 else
@@ -4508,10 +4518,10 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:4512: checking size of short" >&5
+echo "configure:4522: checking size of short" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4515 "configure"
+#line 4525 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4522,7 +4532,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -4550,10 +4560,10 @@
   exit 1
 fi
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:4554: checking size of int" >&5
+echo "configure:4564: checking size of int" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4557 "configure"
+#line 4567 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4564,7 +4574,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -4586,10 +4596,10 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:4590: checking size of long" >&5
+echo "configure:4600: checking size of long" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4593 "configure"
+#line 4603 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4600,7 +4610,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -4622,10 +4632,10 @@
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:4626: checking size of long long" >&5
+echo "configure:4636: checking size of long long" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4629 "configure"
+#line 4639 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4636,7 +4646,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -4658,10 +4668,10 @@
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:4662: checking size of void *" >&5
+echo "configure:4672: checking size of void *" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4665 "configure"
+#line 4675 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4672,7 +4682,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_void_p=`cat conftestval`
 else
@@ -4695,7 +4705,7 @@
 
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:4699: checking for long file names" >&5
+echo "configure:4709: checking for long file names" >&5
 
 ac_cv_sys_long_file_names=yes
 # Test for long file names in all the places we know might matter:
@@ -4741,10 +4751,10 @@
 
 
 echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:4745: checking for sin" >&5
+echo "configure:4755: checking for sin" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4748 "configure"
+#line 4758 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sin(); below.  */
@@ -4767,7 +4777,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4781: \"$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
@@ -4785,12 +4795,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:4789: checking for sin in -lm" >&5
+echo "configure:4799: checking for sin in -lm" >&5
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lm "
 cat > conftest.$ac_ext <<EOF
-#line 4794 "configure"
+#line 4804 "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
@@ -4801,7 +4811,7 @@
 sin()
 ; return 0; }
 EOF
-if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4815: \"$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
@@ -4845,14 +4855,14 @@
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4849 "configure"
+#line 4859 "configure"
 #include "confdefs.h"
 #include <math.h>
 int main() {
 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
 ; return 0; }
 EOF
-if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_INVERSE_HYPERBOLIC
@@ -4871,10 +4881,10 @@
 for ac_func in mkstemp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4875: checking for $ac_func" >&5
+echo "configure:4885: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4878 "configure"
+#line 4888 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4897,7 +4907,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4926,14 +4936,14 @@
 
 
 echo "checking type of mail spool file locking" 1>&6
-echo "configure:4930: checking type of mail spool file locking" >&5
+echo "configure:4940: checking type of mail spool file locking" >&5
 for ac_func in lockf flock
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4934: checking for $ac_func" >&5
+echo "configure:4944: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4937 "configure"
+#line 4947 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4956,7 +4966,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5038,12 +5048,12 @@
 case "$opsys" in decosf*)
   
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:5042: checking for cma_open in -lpthreads" >&5
+echo "configure:5052: checking for cma_open in -lpthreads" >&5
 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpthreads "
 cat > conftest.$ac_ext <<EOF
-#line 5047 "configure"
+#line 5057 "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
@@ -5054,7 +5064,7 @@
 cma_open()
 ; return 0; }
 EOF
-if { (eval echo configure:5058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5068: \"$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
@@ -5091,7 +5101,7 @@
 
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:5095: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:5105: checking whether the -xildoff compiler flag is required" >&5
 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
     then echo "$ac_t""no" 1>&6;
@@ -5103,7 +5113,7 @@
 if test "$opsys" = "sol2"; then
   if test "$os_release" -ge 56; then
     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
-echo "configure:5107: checking for \"-z ignore\" linker flag" >&5
+echo "configure:5117: checking for \"-z ignore\" linker flag" >&5
     case "`ld -h 2>&1`" in
       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
@@ -5114,7 +5124,7 @@
 
 
 echo "checking "for specified window system"" 1>&6
-echo "configure:5118: checking "for specified window system"" >&5
+echo "configure:5128: checking "for specified window system"" >&5
 
 
 GNOME_CONFIG=no
@@ -5122,7 +5132,7 @@
 
 if test "$with_gnome" != "no"; then
    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
-echo "configure:5126: checking for GNOME configuration script" >&5
+echo "configure:5136: checking for GNOME configuration script" >&5
    for possible in gnome-config
    do
       possible_version=`${possible} --version 2> /dev/null`
@@ -5153,7 +5163,7 @@
 
 if test "$with_gtk" != "no";then
    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
-echo "configure:5157: checking for GTK configuration script" >&5
+echo "configure:5167: checking for GTK configuration script" >&5
    for possible in gtk12-config gtk14-config gtk-config
    do
       possible_version=`${possible} --version 2> /dev/null`
@@ -5175,18 +5185,18 @@
 
 if test "${GTK_CONFIG}" != "no"; then
       echo $ac_n "checking gtk version""... $ac_c" 1>&6
-echo "configure:5179: checking gtk version" >&5
+echo "configure:5189: checking gtk version" >&5
       GTK_VERSION=`${GTK_CONFIG} --version`
       echo "$ac_t""${GTK_VERSION}" 1>&6
 
       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
-echo "configure:5184: checking gtk libs" >&5
+echo "configure:5194: checking gtk libs" >&5
       GTK_LIBS=`${GTK_CONFIG} --libs`
       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
       echo "$ac_t""${GTK_LIBS}" 1>&6
 
       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
-echo "configure:5190: checking gtk cflags" >&5
+echo "configure:5200: checking gtk cflags" >&5
       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
       if test "$GCC" = "yes"; then
       	GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
@@ -5196,19 +5206,19 @@
 
       
 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
-echo "configure:5200: checking for main in -lgdk_imlib" >&5
+echo "configure:5210: checking for main in -lgdk_imlib" >&5
 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgdk_imlib "
 cat > conftest.$ac_ext <<EOF
-#line 5205 "configure"
+#line 5215 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5222: \"$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
@@ -5230,12 +5240,12 @@
 
       
 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
-echo "configure:5234: checking for Imlib_init in -lImlib" >&5
+echo "configure:5244: checking for Imlib_init in -lImlib" >&5
 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lImlib "
 cat > conftest.$ac_ext <<EOF
-#line 5239 "configure"
+#line 5249 "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
@@ -5246,7 +5256,7 @@
 Imlib_init()
 ; return 0; }
 EOF
-if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5260: \"$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
@@ -5269,10 +5279,10 @@
       for ac_func in gdk_imlib_init
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5273: checking for $ac_func" >&5
+echo "configure:5283: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 5276 "configure"
+#line 5286 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5295,7 +5305,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5361,15 +5371,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5365: checking for $ac_hdr" >&5
+echo "configure:5375: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 5368 "configure"
+#line 5378 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5383: \"$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*
@@ -5400,19 +5410,19 @@
 
       
 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
-echo "configure:5404: checking for main in -lxml" >&5
+echo "configure:5414: checking for main in -lxml" >&5
 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lxml "
 cat > conftest.$ac_ext <<EOF
-#line 5409 "configure"
+#line 5419 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5426: \"$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
@@ -5434,19 +5444,19 @@
 
       
 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
-echo "configure:5438: checking for main in -lglade" >&5
+echo "configure:5448: checking for main in -lglade" >&5
 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lglade "
 cat > conftest.$ac_ext <<EOF
-#line 5443 "configure"
+#line 5453 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5460: \"$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
@@ -5468,19 +5478,19 @@
 
       
 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
-echo "configure:5472: checking for main in -lglade-gnome" >&5
+echo "configure:5482: checking for main in -lglade-gnome" >&5
 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lglade-gnome "
 cat > conftest.$ac_ext <<EOF
-#line 5477 "configure"
+#line 5487 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5494: \"$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
@@ -5501,7 +5511,7 @@
 
 
       cat > conftest.$ac_ext <<EOF
-#line 5505 "configure"
+#line 5515 "configure"
 #include "confdefs.h"
 #include <glade/glade-xml.h>
 EOF
@@ -5560,7 +5570,7 @@
 # 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:5564: checking for X" >&5
+echo "configure:5574: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -5620,12 +5630,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 5624 "configure"
+#line 5634 "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:5629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5639: \"$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*
@@ -5694,14 +5704,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5698 "configure"
+#line 5708 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5715: \"$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.
@@ -5810,17 +5820,17 @@
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:5814: checking whether -R must be followed by a space" >&5
+echo "configure:5824: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 5817 "configure"
+#line 5827 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -5836,14 +5846,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 5840 "configure"
+#line 5850 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -5879,12 +5889,12 @@
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:5883: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:5893: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldnet "
 cat > conftest.$ac_ext <<EOF
-#line 5888 "configure"
+#line 5898 "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
@@ -5895,7 +5905,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:5899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5909: \"$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
@@ -5919,12 +5929,12 @@
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       
 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:5923: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:5933: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldnet_stub "
 cat > conftest.$ac_ext <<EOF
-#line 5928 "configure"
+#line 5938 "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
@@ -5935,7 +5945,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5949: \"$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
@@ -5964,10 +5974,10 @@
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:5968: checking for gethostbyname" >&5
+echo "configure:5978: checking for gethostbyname" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 5971 "configure"
+#line 5981 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -5990,7 +6000,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6004: \"$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
@@ -6011,12 +6021,12 @@
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:6015: checking for gethostbyname in -lnsl" >&5
+echo "configure:6025: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lnsl "
 cat > conftest.$ac_ext <<EOF
-#line 6020 "configure"
+#line 6030 "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
@@ -6027,7 +6037,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:6031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6041: \"$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
@@ -6057,10 +6067,10 @@
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:6061: checking for connect" >&5
+echo "configure:6071: checking for connect" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6064 "configure"
+#line 6074 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -6083,7 +6093,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6097: \"$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
@@ -6106,12 +6116,12 @@
 xe_msg_checking="for connect in -lsocket"
 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6110: checking "$xe_msg_checking"" >&5
+echo "configure:6120: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6115 "configure"
+#line 6125 "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
@@ -6122,7 +6132,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6136: \"$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
@@ -6146,10 +6156,10 @@
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:6150: checking for remove" >&5
+echo "configure:6160: checking for remove" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6153 "configure"
+#line 6163 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -6172,7 +6182,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -6193,12 +6203,12 @@
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:6197: checking for remove in -lposix" >&5
+echo "configure:6207: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lposix "
 cat > conftest.$ac_ext <<EOF
-#line 6202 "configure"
+#line 6212 "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
@@ -6209,7 +6219,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:6213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6223: \"$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
@@ -6233,10 +6243,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:6237: checking for shmat" >&5
+echo "configure:6247: checking for shmat" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6240 "configure"
+#line 6250 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -6259,7 +6269,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -6280,12 +6290,12 @@
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:6284: checking for shmat in -lipc" >&5
+echo "configure:6294: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lipc "
 cat > conftest.$ac_ext <<EOF
-#line 6289 "configure"
+#line 6299 "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
@@ -6296,7 +6306,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6310: \"$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
@@ -6332,12 +6342,12 @@
 xe_msg_checking="for IceConnectionNumber in -lICE"
 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6336: checking "$xe_msg_checking"" >&5
+echo "configure:6346: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lICE $X_EXTRA_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6341 "configure"
+#line 6351 "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
@@ -6348,7 +6358,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6362: \"$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
@@ -6515,7 +6525,7 @@
 
 
     echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:6519: checking for X defines extracted by xmkmf" >&5
+echo "configure:6529: checking for X defines extracted by xmkmf" >&5
   rm -fr conftestdir
   if mkdir conftestdir; then
     cd conftestdir
@@ -6564,15 +6574,15 @@
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:6568: checking for X11/Intrinsic.h" >&5
+echo "configure:6578: checking for X11/Intrinsic.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6571 "configure"
+#line 6581 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6586: \"$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*
@@ -6596,12 +6606,12 @@
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:6600: checking for XOpenDisplay in -lX11" >&5
+echo "configure:6610: checking for XOpenDisplay in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 6605 "configure"
+#line 6615 "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
@@ -6612,7 +6622,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6626: \"$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
@@ -6637,12 +6647,12 @@
 xe_msg_checking="for XGetFontProperty in -lX11"
 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6641: checking "$xe_msg_checking"" >&5
+echo "configure:6651: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 -b i486-linuxaout"
 cat > conftest.$ac_ext <<EOF
-#line 6646 "configure"
+#line 6656 "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
@@ -6653,7 +6663,7 @@
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:6657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6667: \"$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
@@ -6680,12 +6690,12 @@
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:6684: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:6694: checking for XShapeSelectInput in -lXext" >&5
 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXext "
 cat > conftest.$ac_ext <<EOF
-#line 6689 "configure"
+#line 6699 "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
@@ -6696,7 +6706,7 @@
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:6700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6710: \"$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
@@ -6719,12 +6729,12 @@
 
     
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:6723: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:6733: checking for XtOpenDisplay in -lXt" >&5
 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXt "
 cat > conftest.$ac_ext <<EOF
-#line 6728 "configure"
+#line 6738 "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
@@ -6735,7 +6745,7 @@
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:6739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6749: \"$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
@@ -6758,14 +6768,14 @@
 
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:6762: checking the version of X11 being used" >&5
+echo "configure:6772: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
-#line 6764 "configure"
+#line 6774 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
@@ -6796,10 +6806,10 @@
   for ac_func in XConvertCase
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6800: checking for $ac_func" >&5
+echo "configure:6810: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6803 "configure"
+#line 6813 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6822,7 +6832,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6854,15 +6864,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6858: checking for $ac_hdr" >&5
+echo "configure:6868: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6861 "configure"
+#line 6871 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6876: \"$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*
@@ -6895,10 +6905,10 @@
     for ac_func in XRegisterIMInstantiateCallback
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6899: checking for $ac_func" >&5
+echo "configure:6909: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6902 "configure"
+#line 6912 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6921,7 +6931,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6949,9 +6959,9 @@
 done
 
   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
-echo "configure:6953: checking for standard XRegisterIMInstantiateCallback prototype" >&5
+echo "configure:6963: checking for standard XRegisterIMInstantiateCallback prototype" >&5
   cat > conftest.$ac_ext <<EOF
-#line 6955 "configure"
+#line 6965 "configure"
 #include "confdefs.h"
 
 #define NeedFunctionPrototypes 1
@@ -6963,7 +6973,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -6984,12 +6994,12 @@
 
     test -z "$with_xmu" && { 
 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:6988: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:6998: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXmu "
 cat > conftest.$ac_ext <<EOF
-#line 6993 "configure"
+#line 7003 "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
@@ -7000,7 +7010,7 @@
 XmuReadBitmapDataFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:7004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7014: \"$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
@@ -7039,19 +7049,19 @@
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:7043: checking for main in -lXbsd" >&5
+echo "configure:7053: checking for main in -lXbsd" >&5
 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXbsd "
 cat > conftest.$ac_ext <<EOF
-#line 7048 "configure"
+#line 7058 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7065: \"$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
@@ -7088,22 +7098,22 @@
 fi 
 if test "$with_msw" != "no"; then
   echo "checking for MS-Windows" 1>&6
-echo "configure:7092: checking for MS-Windows" >&5
+echo "configure:7102: checking for MS-Windows" >&5
   
 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
-echo "configure:7095: checking for main in -lgdi32" >&5
+echo "configure:7105: checking for main in -lgdi32" >&5
 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgdi32 "
 cat > conftest.$ac_ext <<EOF
-#line 7100 "configure"
+#line 7110 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7117: \"$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
@@ -7154,12 +7164,12 @@
       test "$with_widgets"    != "no" && with_widgets=msw
     fi
         cat > conftest.$ac_ext <<EOF
-#line 7158 "configure"
+#line 7168 "configure"
 #include "confdefs.h"
 #include <fcntl.h>
     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
 EOF
-if { (eval echo configure:7163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_MSG_SELECT
@@ -7220,15 +7230,15 @@
 if test "$with_x11" = "yes"; then
   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
-echo "configure:7224: checking for X11/extensions/shape.h" >&5
+echo "configure:7234: checking for X11/extensions/shape.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7227 "configure"
+#line 7237 "configure"
 #include "confdefs.h"
 #include <X11/extensions/shape.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7242: \"$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*
@@ -7278,7 +7288,7 @@
 esac
 
 echo "checking for WM_COMMAND option" 1>&6
-echo "configure:7282: checking for WM_COMMAND option" >&5;
+echo "configure:7292: checking for WM_COMMAND option" >&5;
 if test "$with_wmcommand" != "no"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_WMCOMMAND
@@ -7293,15 +7303,15 @@
 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
-echo "configure:7297: checking for X11/Xauth.h" >&5
+echo "configure:7307: checking for X11/Xauth.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7300 "configure"
+#line 7310 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7315: \"$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*
@@ -7324,12 +7334,12 @@
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:7328: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:7338: checking for XauGetAuthByAddr in -lXau" >&5
 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXau "
 cat > conftest.$ac_ext <<EOF
-#line 7333 "configure"
+#line 7343 "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
@@ -7340,7 +7350,7 @@
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:7344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7354: \"$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
@@ -7385,15 +7395,15 @@
       for dir in "" "Tt/" "desktop/" ; do
     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
-echo "configure:7389: checking for ${dir}tt_c.h" >&5
+echo "configure:7399: checking for ${dir}tt_c.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7392 "configure"
+#line 7402 "configure"
 #include "confdefs.h"
 #include <${dir}tt_c.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7407: \"$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*
@@ -7429,12 +7439,12 @@
 xe_msg_checking="for tt_message_create in -ltt"
 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:7433: checking "$xe_msg_checking"" >&5
+echo "configure:7443: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltt $extra_libs"
 cat > conftest.$ac_ext <<EOF
-#line 7438 "configure"
+#line 7448 "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
@@ -7445,7 +7455,7 @@
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:7449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7459: \"$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
@@ -7499,15 +7509,15 @@
 
 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
-echo "configure:7503: checking for Dt/Dt.h" >&5
+echo "configure:7513: checking for Dt/Dt.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7506 "configure"
+#line 7516 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7521: \"$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*
@@ -7530,12 +7540,12 @@
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:7534: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:7544: checking for DtDndDragStart in -lDtSvc" >&5
 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lDtSvc "
 cat > conftest.$ac_ext <<EOF
-#line 7539 "configure"
+#line 7549 "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
@@ -7546,7 +7556,7 @@
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:7550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7560: \"$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
@@ -7627,7 +7637,7 @@
 
 if test "$with_dragndrop" != "no" ; then
   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
-echo "configure:7631: checking if drag and drop API is needed" >&5
+echo "configure:7641: checking if drag and drop API is needed" >&5
   if test -n "$dragndrop_proto" ; then
     with_dragndrop=yes
     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
@@ -7647,18 +7657,18 @@
 fi
 
 echo "checking for LDAP" 1>&6
-echo "configure:7651: checking for LDAP" >&5
+echo "configure:7661: checking for LDAP" >&5
 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
-echo "configure:7654: checking for ldap.h" >&5
+echo "configure:7664: checking for ldap.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7657 "configure"
+#line 7667 "configure"
 #include "confdefs.h"
 #include <ldap.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7672: \"$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*
@@ -7681,15 +7691,15 @@
  }
 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
-echo "configure:7685: checking for lber.h" >&5
+echo "configure:7695: checking for lber.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7688 "configure"
+#line 7698 "configure"
 #include "confdefs.h"
 #include <lber.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7703: \"$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*
@@ -7713,12 +7723,12 @@
 if test "$with_ldap" != "no"; then
   
 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
-echo "configure:7717: checking for ldap_search in -lldap" >&5
+echo "configure:7727: checking for ldap_search in -lldap" >&5
 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap "
 cat > conftest.$ac_ext <<EOF
-#line 7722 "configure"
+#line 7732 "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
@@ -7729,7 +7739,7 @@
 ldap_search()
 ; return 0; }
 EOF
-if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7743: \"$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
@@ -7754,12 +7764,12 @@
 xe_msg_checking="for ldap_open in -lldap"
 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:7758: checking "$xe_msg_checking"" >&5
+echo "configure:7768: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap -llber"
 cat > conftest.$ac_ext <<EOF
-#line 7763 "configure"
+#line 7773 "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
@@ -7770,7 +7780,7 @@
 ldap_open()
 ; return 0; }
 EOF
-if { (eval echo configure:7774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7784: \"$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
@@ -7795,12 +7805,12 @@
 xe_msg_checking="for ldap_open in -lldap"
 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:7799: checking "$xe_msg_checking"" >&5
+echo "configure:7809: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap -llber -lkrb"
 cat > conftest.$ac_ext <<EOF
-#line 7804 "configure"
+#line 7814 "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
@@ -7811,7 +7821,7 @@
 ldap_open()
 ; return 0; }
 EOF
-if { (eval echo configure:7815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7825: \"$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
@@ -7836,12 +7846,12 @@
 xe_msg_checking="for ldap_open in -lldap"
 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:7840: checking "$xe_msg_checking"" >&5
+echo "configure:7850: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap -llber -lkrb -ldes"
 cat > conftest.$ac_ext <<EOF
-#line 7845 "configure"
+#line 7855 "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
@@ -7852,7 +7862,7 @@
 ldap_open()
 ; return 0; }
 EOF
-if { (eval echo configure:7856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7866: \"$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
@@ -7900,10 +7910,10 @@
   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7904: checking for $ac_func" >&5
+echo "configure:7914: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7907 "configure"
+#line 7917 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7926,7 +7936,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7957,20 +7967,20 @@
 
 if test "$with_postgresql" != "no"; then
   echo "checking for PostgreSQL" 1>&6
-echo "configure:7961: checking for PostgreSQL" >&5
+echo "configure:7971: checking for PostgreSQL" >&5
 
   for header_dir in "" "pgsql/" "postgresql/"; do
     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
-echo "configure:7966: checking for ${header_dir}libpq-fe.h" >&5
+echo "configure:7976: checking for ${header_dir}libpq-fe.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7969 "configure"
+#line 7979 "configure"
 #include "confdefs.h"
 #include <${header_dir}libpq-fe.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7984: \"$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*
@@ -7994,12 +8004,12 @@
 
   test -n "$libpq_fe_h_file" && { 
 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
-echo "configure:7998: checking for PQconnectdb in -lpq" >&5
+echo "configure:8008: checking for PQconnectdb in -lpq" >&5
 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpq "
 cat > conftest.$ac_ext <<EOF
-#line 8003 "configure"
+#line 8013 "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
@@ -8010,7 +8020,7 @@
 PQconnectdb()
 ; return 0; }
 EOF
-if { (eval echo configure:8014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8024: \"$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
@@ -8043,12 +8053,12 @@
 
     
 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
-echo "configure:8047: checking for PQconnectStart in -lpq" >&5
+echo "configure:8057: checking for PQconnectStart in -lpq" >&5
 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpq "
 cat > conftest.$ac_ext <<EOF
-#line 8052 "configure"
+#line 8062 "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
@@ -8059,7 +8069,7 @@
 PQconnectStart()
 ; return 0; }
 EOF
-if { (eval echo configure:8063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8073: \"$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
@@ -8104,7 +8114,7 @@
 
 if test "$window_system" != "none"; then
   echo "checking for graphics libraries" 1>&6
-echo "configure:8108: checking for graphics libraries" >&5
+echo "configure:8118: checking for graphics libraries" >&5
 
       libpath_xpm=
   incpath_xpm=
@@ -8130,10 +8140,10 @@
     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
-echo "configure:8134: checking for Xpm - no older than 3.4f" >&5
+echo "configure:8144: checking for Xpm - no older than 3.4f" >&5
     xe_check_libs=-lXpm
     cat > conftest.$ac_ext <<EOF
-#line 8137 "configure"
+#line 8147 "configure"
 #include "confdefs.h"
 #define XPM_NUMBERS
 #include <X11/xpm.h>
@@ -8142,7 +8152,7 @@
       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
       XpmIncludeVersion < 30406 ? 2 : 0 ;}
 EOF
-if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:8156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ./conftest dummy_arg; xpm_status=$?;
       if test "$xpm_status" = "0"; then
@@ -8186,17 +8196,17 @@
     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
-echo "configure:8190: checking for \"FOR_MSW\" xpm" >&5
+echo "configure:8200: checking for \"FOR_MSW\" xpm" >&5
     xe_check_libs=-lXpm
     cat > conftest.$ac_ext <<EOF
-#line 8193 "configure"
+#line 8203 "configure"
 #include "confdefs.h"
 
 int main() {
 XpmCreatePixmapFromData()
 ; return 0; }
 EOF
-if { (eval echo configure:8200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   xpm_for_msw=no
 else
@@ -8222,15 +8232,15 @@
 
     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
-echo "configure:8226: checking for compface.h" >&5
+echo "configure:8236: checking for compface.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8229 "configure"
+#line 8239 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8244: \"$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*
@@ -8253,12 +8263,12 @@
  }
   test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:8257: checking for UnGenFace in -lcompface" >&5
+echo "configure:8267: checking for UnGenFace in -lcompface" >&5
 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcompface "
 cat > conftest.$ac_ext <<EOF
-#line 8262 "configure"
+#line 8272 "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
@@ -8269,7 +8279,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:8273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8283: \"$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
@@ -8318,12 +8328,12 @@
       if test "$with_png $with_tiff" != "no no"; then
     
 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
-echo "configure:8322: checking for inflate in -lc" >&5
+echo "configure:8332: checking for inflate in -lc" >&5
 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lc "
 cat > conftest.$ac_ext <<EOF
-#line 8327 "configure"
+#line 8337 "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
@@ -8334,7 +8344,7 @@
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8348: \"$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
@@ -8353,12 +8363,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
-echo "configure:8357: checking for inflate in -lz" >&5
+echo "configure:8367: checking for inflate in -lz" >&5
 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lz "
 cat > conftest.$ac_ext <<EOF
-#line 8362 "configure"
+#line 8372 "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
@@ -8369,7 +8379,7 @@
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8383: \"$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
@@ -8388,12 +8398,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
-echo "configure:8392: checking for inflate in -lgz" >&5
+echo "configure:8402: checking for inflate in -lgz" >&5
 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgz "
 cat > conftest.$ac_ext <<EOF
-#line 8397 "configure"
+#line 8407 "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
@@ -8404,7 +8414,7 @@
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8418: \"$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
@@ -8434,15 +8444,15 @@
 
     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
-echo "configure:8438: checking for jpeglib.h" >&5
+echo "configure:8448: checking for jpeglib.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8441 "configure"
+#line 8451 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8456: \"$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*
@@ -8465,12 +8475,12 @@
  }
   test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:8469: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:8479: checking for jpeg_destroy_decompress in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ljpeg "
 cat > conftest.$ac_ext <<EOF
-#line 8474 "configure"
+#line 8484 "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
@@ -8481,7 +8491,7 @@
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:8485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8495: \"$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
@@ -8517,10 +8527,10 @@
 
     png_problem=""
   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:8521: checking for pow" >&5
+echo "configure:8531: checking for pow" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8524 "configure"
+#line 8534 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
@@ -8543,7 +8553,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
@@ -8564,15 +8574,15 @@
  }
   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for png.h""... $ac_c" 1>&6
-echo "configure:8568: checking for png.h" >&5
+echo "configure:8578: checking for png.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8571 "configure"
+#line 8581 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8586: \"$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*
@@ -8595,12 +8605,12 @@
  }
   test -z "$with_png" && { 
 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
-echo "configure:8599: checking for png_read_image in -lpng" >&5
+echo "configure:8609: checking for png_read_image in -lpng" >&5
 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpng "
 cat > conftest.$ac_ext <<EOF
-#line 8604 "configure"
+#line 8614 "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
@@ -8611,7 +8621,7 @@
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:8615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8625: \"$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
@@ -8634,10 +8644,10 @@
  }
   if test -z "$with_png"; then
     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
-echo "configure:8638: checking for workable png version information" >&5
+echo "configure:8648: checking for workable png version information" >&5
     xe_check_libs="-lpng -lz"
     cat > conftest.$ac_ext <<EOF
-#line 8641 "configure"
+#line 8651 "configure"
 #include "confdefs.h"
 #include <png.h>
     int main(int c, char **v) {
@@ -8645,7 +8655,7 @@
     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
 EOF
-if { (eval echo configure:8649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:8659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ./conftest dummy_arg; png_status=$?;
       if test "$png_status" = "0"; then
@@ -8688,15 +8698,15 @@
 
     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
-echo "configure:8692: checking for tiffio.h" >&5
+echo "configure:8702: checking for tiffio.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8695 "configure"
+#line 8705 "configure"
 #include "confdefs.h"
 #include <tiffio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8710: \"$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*
@@ -8719,12 +8729,12 @@
  }
   test -z "$with_tiff" && { 
 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8723: checking for TIFFClientOpen in -ltiff" >&5
+echo "configure:8733: checking for TIFFClientOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltiff "
 cat > conftest.$ac_ext <<EOF
-#line 8728 "configure"
+#line 8738 "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
@@ -8735,7 +8745,7 @@
 TIFFClientOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8749: \"$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
@@ -8774,15 +8784,15 @@
 if test "$with_gtk" = "yes"; then
     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
-echo "configure:8778: checking for compface.h" >&5
+echo "configure:8788: checking for compface.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8781 "configure"
+#line 8791 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8796: \"$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*
@@ -8805,12 +8815,12 @@
  }
   test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:8809: checking for UnGenFace in -lcompface" >&5
+echo "configure:8819: checking for UnGenFace in -lcompface" >&5
 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcompface "
 cat > conftest.$ac_ext <<EOF
-#line 8814 "configure"
+#line 8824 "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
@@ -8821,7 +8831,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:8825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8835: \"$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
@@ -8860,7 +8870,7 @@
 
 if test "$with_x11" = "yes"; then
   echo "checking for X11 graphics libraries" 1>&6
-echo "configure:8864: checking for X11 graphics libraries" >&5
+echo "configure:8874: checking for X11 graphics libraries" >&5
 fi
 
 case "$with_widgets" in
@@ -8870,7 +8880,7 @@
 
 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
   echo "checking for the Athena widgets" 1>&6
-echo "configure:8874: checking for the Athena widgets" >&5
+echo "configure:8884: checking for the Athena widgets" >&5
 
     case "$with_athena" in
         "xaw" | "")	athena_variant=Xaw	athena_3d=no  ;;
@@ -8884,12 +8894,12 @@
     if test "$athena_3d" = "no"; then
     
 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:8888: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
+echo "configure:8898: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
-#line 8893 "configure"
+#line 8903 "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
@@ -8900,7 +8910,7 @@
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:8904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8914: \"$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
@@ -8916,12 +8926,12 @@
   echo "$ac_t""yes" 1>&6
           
 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:8920: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:8930: checking for threeDClassRec in -l$athena_variant" >&5
 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
-#line 8925 "configure"
+#line 8935 "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
@@ -8932,7 +8942,7 @@
 threeDClassRec()
 ; return 0; }
 EOF
-if { (eval echo configure:8936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8946: \"$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
@@ -8963,12 +8973,12 @@
   else
         
 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:8967: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:8977: checking for threeDClassRec in -l$athena_variant" >&5
 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
-#line 8972 "configure"
+#line 8982 "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
@@ -8979,7 +8989,7 @@
 threeDClassRec()
 ; return 0; }
 EOF
-if { (eval echo configure:8983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8993: \"$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
@@ -8997,12 +9007,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
-echo "configure:9001: checking for threeDClassRec in -lXaw" >&5
+echo "configure:9011: checking for threeDClassRec in -lXaw" >&5
 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXaw "
 cat > conftest.$ac_ext <<EOF
-#line 9006 "configure"
+#line 9016 "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
@@ -9013,7 +9023,7 @@
 threeDClassRec()
 ; return 0; }
 EOF
-if { (eval echo configure:9017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9027: \"$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
@@ -9044,15 +9054,15 @@
     if test "$athena_3d" = "no"; then
     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
-echo "configure:9048: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:9058: checking for X11/Xaw/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9051 "configure"
+#line 9061 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9066: \"$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*
@@ -9072,15 +9082,15 @@
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
-echo "configure:9076: checking for X11/Xaw/XawInit.h" >&5
+echo "configure:9086: checking for X11/Xaw/XawInit.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9079 "configure"
+#line 9089 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9094: \"$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*
@@ -9106,15 +9116,15 @@
   else
             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
-echo "configure:9110: checking for X11/$athena_variant/XawInit.h" >&5
+echo "configure:9120: checking for X11/$athena_variant/XawInit.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9113 "configure"
+#line 9123 "configure"
 #include "confdefs.h"
 #include <X11/$athena_variant/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9128: \"$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*
@@ -9131,15 +9141,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
-echo "configure:9135: checking for X11/$athena_variant/ThreeD.h" >&5
+echo "configure:9145: checking for X11/$athena_variant/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9138 "configure"
+#line 9148 "configure"
 #include "confdefs.h"
 #include <X11/$athena_variant/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9153: \"$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*
@@ -9167,15 +9177,15 @@
         if test -z "$athena_h_path"; then
       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
-echo "configure:9171: checking for $athena_variant/XawInit.h" >&5
+echo "configure:9181: checking for $athena_variant/XawInit.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9174 "configure"
+#line 9184 "configure"
 #include "confdefs.h"
 #include <$athena_variant/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9189: \"$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*
@@ -9192,15 +9202,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
-echo "configure:9196: checking for $athena_variant/ThreeD.h" >&5
+echo "configure:9206: checking for $athena_variant/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9199 "configure"
+#line 9209 "configure"
 #include "confdefs.h"
 #include <$athena_variant/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9214: \"$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*
@@ -9229,15 +9239,15 @@
         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
-echo "configure:9233: checking for X11/Xaw3d/XawInit.h" >&5
+echo "configure:9243: checking for X11/Xaw3d/XawInit.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9236 "configure"
+#line 9246 "configure"
 #include "confdefs.h"
 #include <X11/Xaw3d/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9251: \"$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*
@@ -9254,15 +9264,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
-echo "configure:9258: checking for X11/Xaw3d/ThreeD.h" >&5
+echo "configure:9268: checking for X11/Xaw3d/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9261 "configure"
+#line 9271 "configure"
 #include "confdefs.h"
 #include <X11/Xaw3d/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9276: \"$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*
@@ -9294,15 +9304,15 @@
         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
-echo "configure:9298: checking for Xaw3d/XawInit.h" >&5
+echo "configure:9308: checking for Xaw3d/XawInit.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9301 "configure"
+#line 9311 "configure"
 #include "confdefs.h"
 #include <Xaw3d/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9316: \"$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*
@@ -9319,15 +9329,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
-echo "configure:9323: checking for Xaw3d/ThreeD.h" >&5
+echo "configure:9333: checking for Xaw3d/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9326 "configure"
+#line 9336 "configure"
 #include "confdefs.h"
 #include <Xaw3d/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9341: \"$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*
@@ -9359,15 +9369,15 @@
             if test -z "$athena_h_path"; then
       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
-echo "configure:9363: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:9373: checking for X11/Xaw/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9366 "configure"
+#line 9376 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9381: \"$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*
@@ -9406,15 +9416,15 @@
 if test "$with_x11" = "yes"; then
     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:9410: checking for Xm/Xm.h" >&5
+echo "configure:9420: checking for Xm/Xm.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9413 "configure"
+#line 9423 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9428: \"$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*
@@ -9431,12 +9441,12 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:9435: checking for XmStringFree in -lXm" >&5
+echo "configure:9445: checking for XmStringFree in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
-#line 9440 "configure"
+#line 9450 "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
@@ -9447,7 +9457,7 @@
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:9451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9461: \"$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
@@ -9476,9 +9486,9 @@
 
   if test "$have_motif" = "yes"; then
         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
-echo "configure:9480: checking for Lesstif" >&5
+echo "configure:9490: checking for Lesstif" >&5
     cat > conftest.$ac_ext <<EOF
-#line 9482 "configure"
+#line 9492 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 #ifdef LESSTIF_VERSION
@@ -9851,7 +9861,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:9855: checking for Mule-related features" >&5
+echo "configure:9865: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -9865,15 +9875,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9869: checking for $ac_hdr" >&5
+echo "configure:9879: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9872 "configure"
+#line 9882 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9887: \"$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*
@@ -9904,12 +9914,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:9908: checking for strerror in -lintl" >&5
+echo "configure:9918: checking for strerror in -lintl" >&5
 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lintl "
 cat > conftest.$ac_ext <<EOF
-#line 9913 "configure"
+#line 9923 "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
@@ -9920,7 +9930,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:9924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9934: \"$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
@@ -9953,18 +9963,18 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:9957: checking for Mule input methods" >&5
+echo "configure:9967: checking for Mule input methods" >&5
         case "$with_xim" in "" | "yes" )
     echo "checking for XIM" 1>&6
-echo "configure:9960: checking for XIM" >&5
+echo "configure:9970: checking for XIM" >&5
     
 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
-echo "configure:9963: checking for XOpenIM in -lX11" >&5
+echo "configure:9973: checking for XOpenIM in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 9968 "configure"
+#line 9978 "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
@@ -9975,7 +9985,7 @@
 XOpenIM()
 ; return 0; }
 EOF
-if { (eval echo configure:9979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9989: \"$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
@@ -9999,12 +10009,12 @@
         if test "$have_motif $have_lesstif" = "yes no"; then
       
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:10003: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:10013: checking for XmImMbLookupString in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
-#line 10008 "configure"
+#line 10018 "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
@@ -10015,7 +10025,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:10019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10029: \"$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
@@ -10080,15 +10090,15 @@
 
     if test "$with_xfs" = "yes" ; then
     echo "checking for XFontSet" 1>&6
-echo "configure:10084: checking for XFontSet" >&5
+echo "configure:10094: checking for XFontSet" >&5
     
 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:10087: checking for XmbDrawString in -lX11" >&5
+echo "configure:10097: checking for XmbDrawString in -lX11" >&5
 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 10092 "configure"
+#line 10102 "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
@@ -10099,7 +10109,7 @@
 XmbDrawString()
 ; return 0; }
 EOF
-if { (eval echo configure:10103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10113: \"$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
@@ -10139,15 +10149,15 @@
     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
-echo "configure:10143: checking for wnn/jllib.h" >&5
+echo "configure:10153: checking for wnn/jllib.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10146 "configure"
+#line 10156 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10161: \"$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*
@@ -10170,15 +10180,15 @@
  }
     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
-echo "configure:10174: checking for wnn/commonhd.h" >&5
+echo "configure:10184: checking for wnn/commonhd.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10177 "configure"
+#line 10187 "configure"
 #include "confdefs.h"
 #include <wnn/commonhd.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10192: \"$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*
@@ -10203,10 +10213,10 @@
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10207: checking for $ac_func" >&5
+echo "configure:10217: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10210 "configure"
+#line 10220 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -10229,7 +10239,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -10258,12 +10268,12 @@
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:10262: checking for crypt in -lcrypt" >&5
+echo "configure:10272: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcrypt "
 cat > conftest.$ac_ext <<EOF
-#line 10267 "configure"
+#line 10277 "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
@@ -10274,7 +10284,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:10278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10288: \"$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
@@ -10309,12 +10319,12 @@
     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
     
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:10313: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:10323: checking for jl_dic_list_e in -lwnn" >&5
 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn "
 cat > conftest.$ac_ext <<EOF
-#line 10318 "configure"
+#line 10328 "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
@@ -10325,7 +10335,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10339: \"$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
@@ -10343,12 +10353,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
-echo "configure:10347: checking for jl_dic_list_e in -lwnn4" >&5
+echo "configure:10357: checking for jl_dic_list_e in -lwnn4" >&5
 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn4 "
 cat > conftest.$ac_ext <<EOF
-#line 10352 "configure"
+#line 10362 "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
@@ -10359,7 +10369,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10373: \"$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
@@ -10377,12 +10387,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
-echo "configure:10381: checking for jl_dic_list_e in -lwnn6" >&5
+echo "configure:10391: checking for jl_dic_list_e in -lwnn6" >&5
 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn6 "
 cat > conftest.$ac_ext <<EOF
-#line 10386 "configure"
+#line 10396 "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
@@ -10393,7 +10403,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:10397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10407: \"$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
@@ -10411,12 +10421,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
-echo "configure:10415: checking for dic_list_e in -lwnn6_fromsrc" >&5
+echo "configure:10425: checking for dic_list_e in -lwnn6_fromsrc" >&5
 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn6_fromsrc "
 cat > conftest.$ac_ext <<EOF
-#line 10420 "configure"
+#line 10430 "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
@@ -10427,7 +10437,7 @@
 dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:10431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10441: \"$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
@@ -10472,12 +10482,12 @@
     if test "$with_wnn6" != "no"; then
       
 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
-echo "configure:10476: checking for jl_fi_dic_list in -l$libwnn" >&5
+echo "configure:10486: checking for jl_fi_dic_list in -l$libwnn" >&5
 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$libwnn "
 cat > conftest.$ac_ext <<EOF
-#line 10481 "configure"
+#line 10491 "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
@@ -10488,7 +10498,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:10492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10502: \"$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
@@ -10523,15 +10533,15 @@
   if test "$with_canna" != "no"; then
     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
-echo "configure:10527: checking for canna/jrkanji.h" >&5
+echo "configure:10537: checking for canna/jrkanji.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10530 "configure"
+#line 10540 "configure"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10545: \"$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*
@@ -10558,15 +10568,15 @@
     c_switch_site="$c_switch_site -I/usr/local/canna/include"
     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
-echo "configure:10562: checking for canna/jrkanji.h" >&5
+echo "configure:10572: checking for canna/jrkanji.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10565 "configure"
+#line 10575 "configure"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10580: \"$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*
@@ -10594,15 +10604,15 @@
 
   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
-echo "configure:10598: checking for canna/RK.h" >&5
+echo "configure:10608: checking for canna/RK.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10601 "configure"
+#line 10611 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10616: \"$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*
@@ -10625,12 +10635,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:10629: checking for RkBgnBun in -lRKC" >&5
+echo "configure:10639: checking for RkBgnBun in -lRKC" >&5
 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lRKC "
 cat > conftest.$ac_ext <<EOF
-#line 10634 "configure"
+#line 10644 "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
@@ -10641,7 +10651,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10655: \"$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
@@ -10664,12 +10674,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:10668: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:10678: checking for jrKanjiControl in -lcanna" >&5
 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcanna "
 cat > conftest.$ac_ext <<EOF
-#line 10673 "configure"
+#line 10683 "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
@@ -10680,7 +10690,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:10684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10694: \"$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
@@ -10726,12 +10736,12 @@
   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
     
 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
-echo "configure:10730: checking for layout_object_getvalue in -li18n" >&5
+echo "configure:10740: checking for layout_object_getvalue in -li18n" >&5
 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -li18n "
 cat > conftest.$ac_ext <<EOF
-#line 10735 "configure"
+#line 10745 "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
@@ -10742,7 +10752,7 @@
 layout_object_getvalue()
 ; return 0; }
 EOF
-if { (eval echo configure:10746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10756: \"$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
@@ -10828,10 +10838,10 @@
 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror symlink tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10832: checking for $ac_func" >&5
+echo "configure:10842: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10835 "configure"
+#line 10845 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -10854,7 +10864,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -10886,10 +10896,10 @@
 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10890: checking for $ac_func" >&5
+echo "configure:10900: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10893 "configure"
+#line 10903 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -10912,7 +10922,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -10941,10 +10951,10 @@
 
 
 echo $ac_n "checking for openpty""... $ac_c" 1>&6
-echo "configure:10945: checking for openpty" >&5
+echo "configure:10955: checking for openpty" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10948 "configure"
+#line 10958 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char openpty(); below.  */
@@ -10967,7 +10977,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_openpty=yes"
 else
@@ -10986,12 +10996,12 @@
 
   
 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
-echo "configure:10990: checking for openpty in -lutil" >&5
+echo "configure:11000: checking for openpty in -lutil" >&5
 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lutil "
 cat > conftest.$ac_ext <<EOF
-#line 10995 "configure"
+#line 11005 "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
@@ -11002,7 +11012,7 @@
 openpty()
 ; return 0; }
 EOF
-if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11016: \"$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
@@ -11037,15 +11047,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11041: checking for $ac_hdr" >&5
+echo "configure:11051: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11044 "configure"
+#line 11054 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11059: \"$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*
@@ -11082,15 +11092,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11086: checking for $ac_hdr" >&5
+echo "configure:11096: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11089 "configure"
+#line 11099 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11104: \"$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*
@@ -11123,15 +11133,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11127: checking for $ac_hdr" >&5
+echo "configure:11137: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11130 "configure"
+#line 11140 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11145: \"$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*
@@ -11164,15 +11174,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11168: checking for $ac_hdr" >&5
+echo "configure:11178: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11171 "configure"
+#line 11181 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11186: \"$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*
@@ -11208,15 +11218,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11212: checking for $ac_hdr" >&5
+echo "configure:11222: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11215 "configure"
+#line 11225 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11230: \"$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*
@@ -11249,10 +11259,10 @@
   for ac_func in isastream
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:11253: checking for $ac_func" >&5
+echo "configure:11263: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11256 "configure"
+#line 11266 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -11275,7 +11285,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -11306,15 +11316,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11310: checking for $ac_hdr" >&5
+echo "configure:11320: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11313 "configure"
+#line 11323 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11328: \"$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*
@@ -11347,10 +11357,10 @@
 for ac_func in getloadavg
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:11351: checking for $ac_func" >&5
+echo "configure:11361: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11354 "configure"
+#line 11364 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -11373,7 +11383,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -11406,15 +11416,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11410: checking for $ac_hdr" >&5
+echo "configure:11420: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11413 "configure"
+#line 11423 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11428: \"$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*
@@ -11450,12 +11460,12 @@
 
     
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:11454: checking for kstat_open in -lkstat" >&5
+echo "configure:11464: checking for kstat_open in -lkstat" >&5
 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lkstat "
 cat > conftest.$ac_ext <<EOF
-#line 11459 "configure"
+#line 11469 "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
@@ -11466,7 +11476,7 @@
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:11470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11480: \"$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
@@ -11501,15 +11511,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11505: checking for $ac_hdr" >&5
+echo "configure:11515: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11508 "configure"
+#line 11518 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11523: \"$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*
@@ -11541,12 +11551,12 @@
 
     
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:11545: checking for kvm_read in -lkvm" >&5
+echo "configure:11555: checking for kvm_read in -lkvm" >&5
 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lkvm "
 cat > conftest.$ac_ext <<EOF
-#line 11550 "configure"
+#line 11560 "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
@@ -11557,7 +11567,7 @@
 kvm_read()
 ; return 0; }
 EOF
-if { (eval echo configure:11561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11571: \"$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
@@ -11591,16 +11601,16 @@
 fi
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:11595: checking whether netdb declares h_errno" >&5
+echo "configure:11605: checking whether netdb declares h_errno" >&5
 cat > conftest.$ac_ext <<EOF
-#line 11597 "configure"
+#line 11607 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:11604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -11620,16 +11630,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:11624: checking for sigsetjmp" >&5
+echo "configure:11634: checking for sigsetjmp" >&5
 cat > conftest.$ac_ext <<EOF
-#line 11626 "configure"
+#line 11636 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:11633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -11649,11 +11659,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:11653: checking whether localtime caches TZ" >&5
+echo "configure:11663: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 11657 "configure"
+#line 11667 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -11688,7 +11698,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:11692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -11718,9 +11728,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
-echo "configure:11722: checking whether gettimeofday accepts one or two arguments" >&5
+echo "configure:11732: checking whether gettimeofday accepts one or two arguments" >&5
 cat > conftest.$ac_ext <<EOF
-#line 11724 "configure"
+#line 11734 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -11741,7 +11751,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""two" 1>&6
 else
@@ -11763,19 +11773,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:11767: checking for inline" >&5
+echo "configure:11777: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 11772 "configure"
+#line 11782 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:11779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -11816,17 +11826,17 @@
   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:11820: checking for working alloca.h" >&5
+echo "configure:11830: checking for working alloca.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11823 "configure"
+#line 11833 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:11830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -11850,10 +11860,10 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:11854: checking for alloca" >&5
+echo "configure:11864: checking for alloca" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11857 "configure"
+#line 11867 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -11881,7 +11891,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:11885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -11920,10 +11930,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:11924: checking whether alloca needs Cray hooks" >&5
+echo "configure:11934: checking whether alloca needs Cray hooks" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11927 "configure"
+#line 11937 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -11947,10 +11957,10 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:11951: checking for $ac_func" >&5
+echo "configure:11961: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11954 "configure"
+#line 11964 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -11973,7 +11983,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -12003,10 +12013,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:12007: checking stack direction for C alloca" >&5
+echo "configure:12017: checking stack direction for C alloca" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12010 "configure"
+#line 12020 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -12025,7 +12035,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:12029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:12039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -12054,10 +12064,10 @@
 fi
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:12058: checking for working strcoll" >&5
+echo "configure:12068: checking for working strcoll" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12061 "configure"
+#line 12071 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -12067,7 +12077,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:12071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:12081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -12095,10 +12105,10 @@
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12099: checking for $ac_func" >&5
+echo "configure:12109: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12102 "configure"
+#line 12112 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -12121,7 +12131,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:12125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -12149,10 +12159,10 @@
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:12153: checking whether getpgrp takes no argument" >&5
+echo "configure:12163: checking whether getpgrp takes no argument" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12156 "configure"
+#line 12166 "configure"
 #include "confdefs.h"
 
 /*
@@ -12207,7 +12217,7 @@
 }
 
 EOF
-if { (eval echo configure:12211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:12221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_getpgrp_void=yes
 else
@@ -12234,10 +12244,10 @@
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:12238: checking for working mmap" >&5
+echo "configure:12248: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 12241 "configure"
+#line 12251 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -12270,7 +12280,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:12274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:12284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   have_mmap=yes
 else
@@ -12299,9 +12309,9 @@
 if test "$rel_alloc $have_mmap" = "default yes"; then
   if test "$doug_lea_malloc" = "yes"; then
         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
-echo "configure:12303: checking for M_MMAP_THRESHOLD" >&5
+echo "configure:12313: checking for M_MMAP_THRESHOLD" >&5
     cat > conftest.$ac_ext <<EOF
-#line 12305 "configure"
+#line 12315 "configure"
 #include "confdefs.h"
 #include <malloc.h>
 int main() {
@@ -12313,7 +12323,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:12317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   rel_alloc=no; echo "$ac_t""yes" 1>&6;
 else
@@ -12338,15 +12348,15 @@
 
 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:12342: checking for termios.h" >&5
+echo "configure:12352: checking for termios.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12345 "configure"
+#line 12355 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12360: \"$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*
@@ -12389,15 +12399,15 @@
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
-echo "configure:12393: checking for termio.h" >&5
+echo "configure:12403: checking for termio.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12396 "configure"
+#line 12406 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12411: \"$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*
@@ -12429,10 +12439,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:12433: checking for socket" >&5
+echo "configure:12443: checking for socket" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12436 "configure"
+#line 12446 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -12455,7 +12465,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:12459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -12470,15 +12480,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
-echo "configure:12474: checking for netinet/in.h" >&5
+echo "configure:12484: checking for netinet/in.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12477 "configure"
+#line 12487 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12492: \"$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*
@@ -12495,15 +12505,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
-echo "configure:12499: checking for arpa/inet.h" >&5
+echo "configure:12509: checking for arpa/inet.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12502 "configure"
+#line 12512 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12517: \"$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*
@@ -12528,9 +12538,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:12532: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:12542: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 12534 "configure"
+#line 12544 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -12541,7 +12551,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:12545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SOCKADDR_SUN_LEN
@@ -12559,9 +12569,9 @@
 fi
 rm -f conftest*
       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
-echo "configure:12563: checking "for ip_mreq struct in netinet/in.h"" >&5
+echo "configure:12573: checking "for ip_mreq struct in netinet/in.h"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 12565 "configure"
+#line 12575 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -12571,7 +12581,7 @@
 static struct ip_mreq x;
 ; return 0; }
 EOF
-if { (eval echo configure:12575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_MULTICAST
@@ -12602,10 +12612,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:12606: checking for msgget" >&5
+echo "configure:12616: checking for msgget" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12609 "configure"
+#line 12619 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -12628,7 +12638,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:12632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -12643,15 +12653,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
-echo "configure:12647: checking for sys/ipc.h" >&5
+echo "configure:12657: checking for sys/ipc.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12650 "configure"
+#line 12660 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12665: \"$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*
@@ -12668,15 +12678,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
-echo "configure:12672: checking for sys/msg.h" >&5
+echo "configure:12682: checking for sys/msg.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12675 "configure"
+#line 12685 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12690: \"$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*
@@ -12714,15 +12724,15 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:12718: checking for dirent.h" >&5
+echo "configure:12728: checking for dirent.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12721 "configure"
+#line 12731 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12736: \"$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*
@@ -12749,15 +12759,15 @@
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
-echo "configure:12753: checking for sys/dir.h" >&5
+echo "configure:12763: checking for sys/dir.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12756 "configure"
+#line 12766 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12771: \"$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*
@@ -12790,15 +12800,15 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:12794: checking for nlist.h" >&5
+echo "configure:12804: checking for nlist.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12797 "configure"
+#line 12807 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12812: \"$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*
@@ -12828,22 +12838,22 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:12832: checking "for sound support"" >&5
+echo "configure:12842: checking "for sound support"" >&5
 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
 
 if test "$with_native_sound" != "no"; then
     if test -n "$native_sound_lib"; then
     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
-echo "configure:12839: checking for multimedia/audio_device.h" >&5
+echo "configure:12849: checking for multimedia/audio_device.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12842 "configure"
+#line 12852 "configure"
 #include "confdefs.h"
 #include <multimedia/audio_device.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12857: \"$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*
@@ -12891,12 +12901,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:12895: checking for ALopenport in -laudio" >&5
+echo "configure:12905: checking for ALopenport in -laudio" >&5
 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -laudio "
 cat > conftest.$ac_ext <<EOF
-#line 12900 "configure"
+#line 12910 "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
@@ -12907,7 +12917,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:12911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12921: \"$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
@@ -12938,12 +12948,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:12942: checking for AOpenAudio in -lAlib" >&5
+echo "configure:12952: checking for AOpenAudio in -lAlib" >&5
 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lAlib "
 cat > conftest.$ac_ext <<EOF
-#line 12947 "configure"
+#line 12957 "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
@@ -12954,7 +12964,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:12958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12968: \"$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
@@ -13002,15 +13012,15 @@
     for dir in "machine" "sys" "linux"; do
       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
-echo "configure:13006: checking for ${dir}/soundcard.h" >&5
+echo "configure:13016: checking for ${dir}/soundcard.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13009 "configure"
+#line 13019 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13024: \"$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*
@@ -13064,15 +13074,15 @@
 if test "$with_nas_sound" != "no"; then
   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
-echo "configure:13068: checking for audio/audiolib.h" >&5
+echo "configure:13078: checking for audio/audiolib.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13071 "configure"
+#line 13081 "configure"
 #include "confdefs.h"
 #include <audio/audiolib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13086: \"$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*
@@ -13090,12 +13100,12 @@
   
     
 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
-echo "configure:13094: checking for AuOpenServer in -laudio" >&5
+echo "configure:13104: checking for AuOpenServer in -laudio" >&5
 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -laudio "
 cat > conftest.$ac_ext <<EOF
-#line 13099 "configure"
+#line 13109 "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
@@ -13106,7 +13116,7 @@
 AuOpenServer()
 ; return 0; }
 EOF
-if { (eval echo configure:13110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13120: \"$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
@@ -13145,7 +13155,7 @@
  fi
     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
             cat > conftest.$ac_ext <<EOF
-#line 13149 "configure"
+#line 13159 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -13176,7 +13186,7 @@
   # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:13180: checking for $ac_word" >&5
+echo "configure:13190: checking for $ac_word" >&5
 
 if test -n "$have_esd_config"; then
   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
@@ -13205,10 +13215,10 @@
     c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
-echo "configure:13209: checking for esd_play_stream" >&5
+echo "configure:13219: checking for esd_play_stream" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13212 "configure"
+#line 13222 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char esd_play_stream(); below.  */
@@ -13231,7 +13241,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:13235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_esd_play_stream=yes"
 else
@@ -13282,7 +13292,7 @@
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:13286: checking for TTY-related features" >&5
+echo "configure:13296: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -13295,12 +13305,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:13299: checking for tgetent in -lncurses" >&5
+echo "configure:13309: checking for tgetent in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lncurses "
 cat > conftest.$ac_ext <<EOF
-#line 13304 "configure"
+#line 13314 "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
@@ -13311,7 +13321,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:13315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13325: \"$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
@@ -13344,15 +13354,15 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:13348: checking for ncurses/curses.h" >&5
+echo "configure:13358: checking for ncurses/curses.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13351 "configure"
+#line 13361 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13366: \"$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*
@@ -13374,15 +13384,15 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:13378: checking for ncurses/term.h" >&5
+echo "configure:13388: checking for ncurses/term.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13381 "configure"
+#line 13391 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13396: \"$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*
@@ -13412,15 +13422,15 @@
       c_switch_site="$c_switch_site -I/usr/include/ncurses"
       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:13416: checking for ncurses/curses.h" >&5
+echo "configure:13426: checking for ncurses/curses.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13419 "configure"
+#line 13429 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13434: \"$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*
@@ -13455,12 +13465,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:13459: checking for tgetent in -l$lib" >&5
+echo "configure:13469: checking for tgetent in -l$lib" >&5
 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$lib "
 cat > conftest.$ac_ext <<EOF
-#line 13464 "configure"
+#line 13474 "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
@@ -13471,7 +13481,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:13475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13485: \"$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
@@ -13502,12 +13512,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:13506: checking for tgetent in -lcurses" >&5
+echo "configure:13516: checking for tgetent in -lcurses" >&5
 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcurses "
 cat > conftest.$ac_ext <<EOF
-#line 13511 "configure"
+#line 13521 "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
@@ -13518,7 +13528,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:13522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13532: \"$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
@@ -13536,12 +13546,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:13540: checking for tgetent in -ltermcap" >&5
+echo "configure:13550: checking for tgetent in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltermcap "
 cat > conftest.$ac_ext <<EOF
-#line 13545 "configure"
+#line 13555 "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
@@ -13552,7 +13562,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:13556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13566: \"$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
@@ -13600,15 +13610,15 @@
 
     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
-echo "configure:13604: checking for gpm.h" >&5
+echo "configure:13614: checking for gpm.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13607 "configure"
+#line 13617 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13622: \"$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*
@@ -13631,12 +13641,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:13635: checking for Gpm_Open in -lgpm" >&5
+echo "configure:13645: checking for Gpm_Open in -lgpm" >&5
 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgpm "
 cat > conftest.$ac_ext <<EOF
-#line 13640 "configure"
+#line 13650 "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
@@ -13647,7 +13657,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:13651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13661: \"$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
@@ -13690,20 +13700,20 @@
 
 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
   != "no no no" && echo "checking for database support" 1>&6
-echo "configure:13694: checking for database support" >&5
+echo "configure:13704: checking for database support" >&5
 
 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
-echo "configure:13699: checking for ndbm.h" >&5
+echo "configure:13709: checking for ndbm.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13702 "configure"
+#line 13712 "configure"
 #include "confdefs.h"
 #include <ndbm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13717: \"$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*
@@ -13733,12 +13743,12 @@
 if test "$with_database_gdbm" != "no"; then
   
 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:13737: checking for dbm_open in -lgdbm" >&5
+echo "configure:13747: checking for dbm_open in -lgdbm" >&5
 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgdbm "
 cat > conftest.$ac_ext <<EOF
-#line 13742 "configure"
+#line 13752 "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
@@ -13749,7 +13759,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:13753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13763: \"$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
@@ -13777,10 +13787,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:13781: checking for dbm_open" >&5
+echo "configure:13791: checking for dbm_open" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13784 "configure"
+#line 13794 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -13803,7 +13813,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:13807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -13822,12 +13832,12 @@
 
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:13826: checking for dbm_open in -ldbm" >&5
+echo "configure:13836: checking for dbm_open in -ldbm" >&5
 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldbm "
 cat > conftest.$ac_ext <<EOF
-#line 13831 "configure"
+#line 13841 "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
@@ -13838,7 +13848,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:13842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13852: \"$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
@@ -13879,10 +13889,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
-echo "configure:13883: checking for Berkeley db.h" >&5
+echo "configure:13893: checking for Berkeley db.h" >&5
   for header in "db/db.h" "db.h"; do
     cat > conftest.$ac_ext <<EOF
-#line 13886 "configure"
+#line 13896 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -13904,7 +13914,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:13908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_file="$header"; break
 else
@@ -13920,9 +13930,9 @@
 
   if test "$with_database_berkdb" != "no"; then
     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
-echo "configure:13924: checking for Berkeley DB version" >&5
+echo "configure:13934: checking for Berkeley DB version" >&5
     cat > conftest.$ac_ext <<EOF
-#line 13926 "configure"
+#line 13936 "configure"
 #include "confdefs.h"
 #include <$db_h_file>
 #if DB_VERSION_MAJOR > 1
@@ -13934,7 +13944,7 @@
   egrep "yes" >/dev/null 2>&1; then
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 13938 "configure"
+#line 13948 "configure"
 #include "confdefs.h"
 #include <$db_h_file>
 #if DB_VERSION_MAJOR > 2
@@ -13961,10 +13971,10 @@
 rm -f conftest*
 
     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
-echo "configure:13965: checking for $dbfunc" >&5
+echo "configure:13975: checking for $dbfunc" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13968 "configure"
+#line 13978 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $dbfunc(); below.  */
@@ -13987,7 +13997,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:13991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$dbfunc=yes"
 else
@@ -14006,12 +14016,12 @@
 
     
 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
-echo "configure:14010: checking for $dbfunc in -ldb" >&5
+echo "configure:14020: checking for $dbfunc in -ldb" >&5
 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldb "
 cat > conftest.$ac_ext <<EOF
-#line 14015 "configure"
+#line 14025 "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
@@ -14022,7 +14032,7 @@
 $dbfunc()
 ; return 0; }
 EOF
-if { (eval echo configure:14026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14036: \"$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
@@ -14083,12 +14093,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:14087: checking for SOCKSinit in -lsocks" >&5
+echo "configure:14097: checking for SOCKSinit in -lsocks" >&5
 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocks "
 cat > conftest.$ac_ext <<EOF
-#line 14092 "configure"
+#line 14102 "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
@@ -14099,7 +14109,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:14103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14113: \"$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
@@ -14154,22 +14164,22 @@
 
 if test "$with_modules" != "no"; then
   echo "checking for module support" 1>&6
-echo "configure:14158: checking for module support" >&5
+echo "configure:14168: checking for module support" >&5
 
     if test "$with_msw" = "yes"; then
     have_dl=yes;
   else
         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:14165: checking for dlfcn.h" >&5
+echo "configure:14175: checking for dlfcn.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 14168 "configure"
+#line 14178 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:14183: \"$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*
@@ -14186,16 +14196,16 @@
   echo "$ac_t""yes" 1>&6
   
       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
-echo "configure:14190: checking for dlopen in -lc" >&5
+echo "configure:14200: checking for dlopen in -lc" >&5
       cat > conftest.$ac_ext <<EOF
-#line 14192 "configure"
+#line 14202 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 int main() {
 	dlopen ("", 0);
 ; return 0; }
 EOF
-if { (eval echo configure:14199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    have_dl=yes 
 else
@@ -14204,18 +14214,18 @@
   rm -rf conftest*
   
       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:14208: checking for dlopen in -ldl" >&5
+echo "configure:14218: checking for dlopen in -ldl" >&5
       ac_save_LIBS="$LIBS"
       LIBS="-ldl $LIBS"
       cat > conftest.$ac_ext <<EOF
-#line 14212 "configure"
+#line 14222 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 int main() {
 	dlopen ("", 0);
 ; return 0; }
 EOF
-if { (eval echo configure:14219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    have_dl=yes 
 else
@@ -14244,12 +14254,12 @@
     else
       
 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:14248: checking for shl_load in -ldld" >&5
+echo "configure:14258: checking for shl_load in -ldld" >&5
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldld "
 cat > conftest.$ac_ext <<EOF
-#line 14253 "configure"
+#line 14263 "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
@@ -14260,7 +14270,7 @@
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:14264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14274: \"$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
@@ -14287,12 +14297,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
-echo "configure:14291: checking for dld_init in -ldld" >&5
+echo "configure:14301: checking for dld_init in -ldld" >&5
 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldld "
 cat > conftest.$ac_ext <<EOF
-#line 14296 "configure"
+#line 14306 "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
@@ -14303,7 +14313,7 @@
 dld_init()
 ; return 0; }
 EOF
-if { (eval echo configure:14307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14317: \"$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
@@ -14348,7 +14358,7 @@
 xealias=$internal_configuration
 
 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
-echo "configure:14352: checking how to build dynamic libraries for ${xehost}" >&5
+echo "configure:14362: checking how to build dynamic libraries for ${xehost}" >&5
 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
 case "$xehost" in
 *-*-linux-gnu*) ;;
@@ -14376,9 +14386,9 @@
   XEGCC=yes
 else
   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:14380: checking checking whether we are using GNU C" >&5
+echo "configure:14390: checking checking whether we are using GNU C" >&5
   cat > conftest.$ac_ext <<EOF
-#line 14382 "configure"
+#line 14392 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -14400,7 +14410,7 @@
 fi
 
 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
-echo "configure:14404: checking how to produce PIC code" >&5
+echo "configure:14414: checking how to produce PIC code" >&5
 wl=
 
 can_build_shared=yes
@@ -14501,18 +14511,18 @@
 
   # Check to make sure the dll_cflags actually works.
   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
-echo "configure:14505: checking if PIC flag ${dll_cflags} really works" >&5
+echo "configure:14515: checking if PIC flag ${dll_cflags} really works" >&5
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $dll_cflags -DPIC"
   cat > conftest.$ac_ext <<EOF
-#line 14509 "configure"
+#line 14519 "configure"
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
-if { (eval echo configure:14516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
@@ -14543,7 +14553,7 @@
 xldf=
 xcldf=
 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
-echo "configure:14547: checking if C compiler can produce shared libraries" >&5
+echo "configure:14557: checking if C compiler can produce shared libraries" >&5
 if test "$XEGCC" = yes; then
   xcldf="-shared"
   xldf="-shared"
@@ -14594,14 +14604,14 @@
   xe_libs=
   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
   cat > conftest.$ac_ext <<EOF
-#line 14598 "configure"
+#line 14608 "configure"
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
-if { (eval echo configure:14605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cc_produces_so=yes
 else
@@ -14626,7 +14636,7 @@
   if test "$XEGCC" = yes; then
     # Check if gcc -print-prog-name=ld gives a path.
     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:14630: checking for ld used by GCC" >&5
+echo "configure:14640: checking for ld used by GCC" >&5
     ac_prog=`($CC -print-prog-name=ld) 2>&5`
     case "$ac_prog" in
     # Accept absolute paths.
@@ -14652,7 +14662,7 @@
     esac
   else
     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:14656: checking for GNU ld" >&5
+echo "configure:14666: checking for GNU ld" >&5
   fi
 
   if test -z "$LTLD"; then
@@ -14690,7 +14700,7 @@
 
 # Check to see if it really is or isn't GNU ld.
 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
-echo "configure:14694: checking if the linker is GNU ld" >&5
+echo "configure:14704: checking if the linker is GNU ld" >&5
 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
   xe_gnu_ld=yes
@@ -14718,7 +14728,7 @@
   # OK - only NOW do we futz about with ld.
   # See if the linker supports building shared libraries.
   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
-echo "configure:14722: checking whether the linker supports shared libraries" >&5
+echo "configure:14732: checking whether the linker supports shared libraries" >&5
   dll_ld=$CC
   dll_ldflags=$LDFLAGS
   ld_shlibs=yes
@@ -14926,10 +14936,10 @@
     for ac_func in dlerror _dlerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:14930: checking for $ac_func" >&5
+echo "configure:14940: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 14933 "configure"
+#line 14943 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -14952,7 +14962,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:14956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -14991,11 +15001,11 @@
 fi
 
 cat > conftest.$ac_ext <<EOF
-#line 14995 "configure"
+#line 15005 "configure"
 #include "confdefs.h"
 int main(int c,char *v[]){return 0;}
 EOF
-if { (eval echo configure:14999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:15009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
@@ -15587,7 +15597,7 @@
 (
 echo "
 
-XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
+XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" $xemacs_extra_name configured for \`$canonical'.
 "
 echo "
 Compilation / Installation:"
Index: configure.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.in,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -r1.181 -r1.182
--- configure.in	2002/07/16 08:26:46	1.181
+++ configure.in	2002/08/28 05:36:27	1.182
@@ -995,6 +995,9 @@
   fi
 fi
 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
+if test "X$xemacs_extra_name" != "X"; then
+  AC_DEFINE_UNQUOTED(XEMACS_EXTRA_NAME, "$xemacs_extra_name")
+fi
 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
 
 if test "$with_infodock" = "yes"; then
@@ -4842,7 +4845,7 @@
 (
 echo "
 
-XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
+XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" $xemacs_extra_name configured for \`$canonical'.
 "
 echo "
 Compilation / Installation:"
Index: configure.usage
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.usage,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- configure.usage	2002/07/16 08:26:47	1.27
+++ configure.usage	2002/08/24 10:23:48	1.28
@@ -82,8 +82,8 @@
                         Lucid menubars and scrollbars are the default.
                         Motif dialog boxes will be used if Motif can be found.
 --with-widgets=TYPE     Use TYPE widgets (lucid, motif, athena, or no).
-                        Motif widgets will be used if Motif can be found.
                         Other widget types are currently unsupported.
+                        Motif widgets will be used if Motif can be found.
 --with-dragndrop        Compile in the generic drag and drop API. This is
                         automatically added if one of the drag and drop
                         protocols is found (currently CDE, OffiX, MSWindows,
Index: version.sh
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/version.sh,v
retrieving revision 1.178
retrieving revision 1.183
diff -u -r1.178 -r1.183
--- version.sh	2002/07/27 03:52:44	1.178
+++ version.sh	2002/08/30 08:25:49	1.183
@@ -2,8 +2,9 @@
 emacs_is_beta=t
 emacs_major_version=21
 emacs_minor_version=5
-emacs_beta_version=8
-xemacs_codename="broccoli"
+emacs_beta_version=9
+xemacs_codename="brussels sprouts"
+xemacs_extra_name=
 emacs_kit_version=
 infodock_major_version=4
 infodock_minor_version=0
Index: etc/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/etc/ChangeLog,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- etc/ChangeLog	2002/07/27 03:52:48	1.8
+++ etc/ChangeLog	2002/08/30 08:25:54	1.9
@@ -1,3 +1,7 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: lib-src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/ChangeLog,v
retrieving revision 1.145
retrieving revision 1.148
diff -u -r1.145 -r1.148
--- lib-src/ChangeLog	2002/07/27 03:52:50	1.145
+++ lib-src/ChangeLog	2002/08/30 08:25:57	1.148
@@ -1,3 +1,19 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
+2002-08-21  Jerry James  <james@xemacs.org>
+
+	* gnuserv.h: Revert previous patch.  Include syssignal.h instead
+	of signal.h.
+	* tcp.c: Include config.h, and substitute syssignal.h for
+	signal.h.
+
+2002-08-02  Jerry James  <james@xemacs.org>
+
+	* gnuserv.h: Include signal.h early to define NSIG before config.h
+	is included.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: lib-src/gnuserv.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/gnuserv.h,v
retrieving revision 1.9
retrieving revision 1.11
diff -u -r1.9 -r1.11
--- lib-src/gnuserv.h	2002/03/13 08:51:59	1.9
+++ lib-src/gnuserv.h	2002/08/29 19:45:20	1.11
@@ -107,7 +107,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <signal.h>
+#include "syssignal.h"
 #include <errno.h>
 
 #ifdef HAVE_UNISTD_H
Index: lib-src/tcp.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/tcp.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- lib-src/tcp.c	2001/06/10 10:42:18	1.2
+++ lib-src/tcp.c	2002/08/29 19:45:20	1.3
@@ -32,6 +32,9 @@
  *	cc -O -o tcp tcp.c -DFUJITSU_UTS -lu -lsocket
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <stdio.h>
 #include <fcntl.h>
 #include <ctype.h>
@@ -51,7 +54,7 @@
 
 #ifdef USG
 #include <sys/stat.h>
-#include <signal.h>
+#include "syssignal.h"
 #endif
 
 #ifdef USG
Index: lisp/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.422
retrieving revision 1.429
diff -u -r1.422 -r1.429
--- lisp/ChangeLog	2002/07/27 03:52:51	1.422
+++ lisp/ChangeLog	2002/08/30 08:26:00	1.429
@@ -1,3 +1,61 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
+2002-08-16  Steve Youngs  <youngs@xemacs.org>
+
+	* build-report.el (build-report-installation-version-regexp):
+	Update to cater for 'xemacs-extra-name'.
+	(build-report-version-file-regexp): Ditto.
+	(build-report): Ditto.
+	(build-report-installation-data): Ditto.
+	(build-report-version-file-data): Ditto.
+
+	* version.el (emacs-version): Test for 'xemacs-extra-name'.
+
+2002-08-16  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* autoload.el (make-autoload): Make comment more precise.  Support
+	docstring for define-derived-mode.
+
+2002-08-13  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* startup.el (command-line-do-help): Fix typo in help string.
+
+2002-08-11  John Paul Wallington  <jpw@shootybangbang.com>
+
+	* simple.el (join-line): New alias for `delete-indentation'.
+
+2002-08-03  Steve Youngs  <youngs@xemacs.org>
+
+	* lib-complete.el (find-library): Remove check for mule because
+	decompression DOES work on Mule.
+
+2002-05-29  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mule/japan-util.el (setup-japanese-environment-internal): Use
+	proper coding-systems.
+
+2002-05-28  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mule/japan-util.el: Use `characterp' instead of `integerp' while
+	defining char properties for katakana.
+
+	* mule/mule-category.el: Clear the category table before defining
+	categories for `predefined-category-list'.
+
+	* mule/mule-cmds.el (finish-set-language-environment): Fit the
+	charsets preferences in unicode conversions for the language
+	environment.  Suggested by ARISAWA Akihiro <ari@mbf.sphere.ne.jp>.
+
+2002-08-02  Ville Skytt�  <ville.skytta@xemacs.org>
+
+	* font-lock.el: Some faces and doc typo fixes from GNU Emacs.
+	(font-lock-doc-face): New alias to font-lock-doc-string-face.
+	(font-lock-builtin-face): New.
+	(font-lock-constant-face): New.
+	(font-lock-face-list): Add builtin and constant faces.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: lisp/autoload.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/autoload.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- lisp/autoload.el	2002/03/16 10:39:02	1.11
+++ lisp/autoload.el	2002/08/22 11:19:58	1.12
@@ -40,8 +40,9 @@
 ;;; Code:
 
 (defun make-autoload (form file)
-  "Turn FORM, a defun or defmacro, into an autoload for source file FILE.
-Returns nil if FORM is not a defun, define-skeleton or defmacro."
+  "Turn a definition generator FORM into an autoload for source file FILE.
+Returns nil if FORM is not a defun, defun*, defmacro, defmacro*,
+define-skeleton, or define-derived-mode."
   (let ((car (car-safe form)))
     (if (memq car '(defun defun* define-skeleton defmacro defmacro*
 		     define-derived-mode))
@@ -118,6 +119,7 @@
 (put 'defmacro 'doc-string-elt 3)
 (put 'defmacro* 'doc-string-elt 3)
 (put 'define-skeleton 'doc-string-elt 3)
+(put 'define-derived-mode 'doc-string-elt 4)
 
 (defun autoload-trim-file-name (file)
   "Returns a relative pathname of FILE including the last directory."
Index: lisp/build-report.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/build-report.el,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- lisp/build-report.el	2001/05/03 21:08:39	1.10
+++ lisp/build-report.el	2002/08/28 05:36:31	1.11
@@ -57,7 +57,7 @@
 ;;; report it to the maintainers of `build-report' when you think you
 ;;; need to do this.
 (defconst build-report-installation-version-regexp
-  "XEmacs\\s-+\\([0-9]+\\)\\.\\([0-9]+\\)\\(\\(-b\\|\\.\\)\\([0-9]+\\)\\)?\\s-+\\\\?\"\\([^\\\"]+\\)\\\\?\"\\s-+configured\\s-+for\\s-+`\\(.+\\)'\\."
+  "XEmacs\\s-+\\([0-9]+\\)\\.\\([0-9]+\\)\\(\\(-b\\|\\.\\)\\([0-9]+\\)\\)?\\s-+\\\\?\"\\([^\\\"]+\\)\\\\?\"\\s-+\\(.*\\)?configured\\s-+for\\s-+`\\(.+\\)'\\."
   "*REGEXP matching XEmacs Beta Version string in
 `build-report-installation-file' file.  This variable is used by
 `build-report-installation-data'.")
@@ -66,7 +66,8 @@
   "emacs_major_version\\s-*=\\s-*\\([0-9]+\\)
 emacs_minor_version\\s-*=\\s-*\\([0-9]+\\)
 emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)?
-xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\""
+xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\"
+xemacs_extra_name\\s-*=\\s-*\"\\([^\"]+\\)\""
   "*REGEXP matching XEmacs Beta Version variable assignments in
 `build-report-version-file' file.  This variable is used by
 `build-report-version-file-data'.")
@@ -308,17 +309,17 @@
   (save-excursion
     (if (file-exists-p build-report-installation-file)
         (multiple-value-bind
-            (major minor beta codename configuration)
+            (major minor beta codename extraname configuration)
             (build-report-installation-data build-report-installation-file)
           (setq build-report-subject
-                (format "[%%s] XEmacs %s.%s%s \"%s\", %s"
-                        major minor beta codename configuration)))
+                (format "[%%s] XEmacs %s.%s%s \"%s\" %s %s"
+                        major minor beta codename extraname configuration)))
       (multiple-value-bind
-          (major minor beta codename)
+          (major minor beta codename extraname)
           (build-report-version-file-data build-report-version-file)
         (setq build-report-subject
-              (format "[%%s] XEmacs %s.%s%s \"%s\", %s"
-                      major minor beta codename system-configuration))))
+              (format "[%%s] XEmacs %s.%s%s \"%s\" %s %s"
+                      major minor beta codename extraname system-configuration))))
     (compose-mail
      ;; `build-report-destination' used to be a single string, so
      ;; let's test if we really get a list of destinations.
@@ -492,7 +493,7 @@
   (unless file
     (setq file build-report-installation-file))
   (let
-      (major minor beta codename configuration srcdir)
+      (major minor beta codename extraname configuration srcdir)
     (save-window-excursion
       (find-file-read-only file)
       (goto-char (point-min))
@@ -504,7 +505,8 @@
           (setq minor (match-string 2))
           (setq beta (match-string 3))
           (setq codename (match-string 6))
-          (setq configuration (match-string 7)))
+	  (setq extraname (match-string 7))
+          (setq configuration (match-string 8)))
          ((looking-at build-report-installation-srcdir-regexp)
           (goto-char (match-end 0))
           (setq srcdir (match-string 1)))
@@ -515,7 +517,7 @@
           (goto-char (match-end 0)))
          ((looking-at "\n")
           (goto-char (match-end 0)))))
-      (values major minor (or beta "") codename configuration srcdir))))
+      (values major minor (or beta "") codename extraname configuration srcdir))))
 
 (defun build-report-version-file-data (&optional file)
   "Return a list of XEmacs version information containing
@@ -525,7 +527,7 @@
   (unless file
     (setq file build-report-version-file))
   (let
-      (major minor beta codename)
+      (major minor beta codename extraname)
     (save-window-excursion
       (find-file-read-only file)
       (goto-char (point-min))
@@ -536,7 +538,8 @@
           (setq major (match-string 1))
           (setq minor (match-string 2))
           (setq beta (match-string 3))
-          (setq codename (match-string 4)))
+          (setq codename (match-string 4))
+	  (setq extraname (match-string 5)))
          ;; We avoid matching a potentially zero-length string to avoid
          ;; infinite looping.
          ((looking-at
@@ -544,6 +547,6 @@
           (goto-char (match-end 0)))
          ((looking-at "\n")
           (goto-char (match-end 0)))))
-      (values major minor (or beta "") codename))))
+      (values major minor (or beta "") codename extraname))))
 
 ;;; build-report.el ends here
Index: lisp/font-lock.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/font-lock.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- lisp/font-lock.el	2002/06/20 21:18:03	1.23
+++ lisp/font-lock.el	2002/08/02 15:01:10	1.24
@@ -282,7 +282,7 @@
 				      (symbol :tag "name"))
 			       (radio :tag "Decoration"
 				      (const :tag "default" nil)
-				      (const :tag "maximum" t) 
+				      (const :tag "maximum" t)
 				      (integer :tag "level" 1)))))
   :group 'font-lock)
 
@@ -634,7 +634,7 @@
 ;; #### barf gag retch.  Horrid FSF lossage that we need to
 ;; keep around for compatibility with font-lock-keywords that
 ;; forget to properly quote their faces.  I tried just let-binding
-;; them when we eval the face expression, but that failes because
+;; them when we eval the face expression, but that fails because
 ;; some	files actually use the variables directly in their init code
 ;; without quoting them. --ben
 (defvar font-lock-comment-face 'font-lock-comment-face
@@ -647,6 +647,9 @@
 It is present only for horrid FSF compatibility reasons.
 The corresponding face should be set using `edit-faces' or the
 `set-face-*' functions.")
+;; GNU compatibility
+(define-compatible-variable-alias
+  'font-lock-doc-face 'font-lock-doc-string-face)
 (defvar font-lock-string-face 'font-lock-string-face
   "This variable should not be set.
 It is present only for horrid FSF compatibility reasons.
@@ -657,6 +660,11 @@
 It is present only for horrid FSF compatibility reasons.
 The corresponding face should be set using `edit-faces' or the
 `set-face-*' functions.")
+(defvar font-lock-builtin-face 'font-lock-builtin-face
+  "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
 (defvar font-lock-function-name-face 'font-lock-function-name-face
   "This variable should not be set.
 It is present only for horrid FSF compatibility reasons.
@@ -672,6 +680,11 @@
 It is present only for horrid FSF compatibility reasons.
 The corresponding face should be set using `edit-faces' or the
 `set-face-*' functions.")
+(defvar font-lock-constant-face 'font-lock-constant-face
+  "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
 (defvar font-lock-reference-face 'font-lock-reference-face
   "This variable should not be set.
 It is present only for horrid FSF compatibility reasons.
@@ -688,9 +701,11 @@
     font-lock-string-face
     font-lock-doc-string-face
     font-lock-keyword-face
+    font-lock-builtin-face
     font-lock-function-name-face
     font-lock-variable-name-face
     font-lock-type-face
+    font-lock-constant-face
     font-lock-reference-face
     font-lock-preprocessor-face
     font-lock-warning-face))
@@ -739,6 +754,15 @@
   "Font Lock mode face used to highlight keywords."
   :group 'font-lock-faces)
 
+(defface font-lock-builtin-face
+  '((((class color) (background light)) (:foreground "Purple"))
+    (((class color) (background dark)) (:foreground "Cyan"))
+    (((class grayscale) (background light)) (:foreground "LightGray" :bold t))
+    (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
+    (t (:bold t)))
+  "Font Lock mode face used to highlight builtins."
+  :group 'font-lock-faces)
+
 (defface font-lock-function-name-face
   '((((class color) (background dark)) (:foreground "aquamarine"))
     ;; brown4 is hardly different from black on windows.
@@ -771,6 +795,17 @@
   "Font Lock mode face used to highlight types."
   :group 'font-lock-faces)
 
+(defface font-lock-constant-face
+  '((((class color) (background light)) (:foreground "CadetBlue"))
+    (((class color) (background dark)) (:foreground "Aquamarine"))
+    (((class grayscale) (background light))
+     (:foreground "LightGray" :bold t :underline t))
+    (((class grayscale) (background dark))
+     (:foreground "Gray50" :bold t :underline t))
+    (t (:bold t :underline t)))
+  "Font Lock mode face used to highlight constants and labels."
+  :group 'font-lock-faces)
+
 (defface font-lock-reference-face
   '((((class color) (background dark)) (:foreground "cadetblue2"))
     (((class color) (background light)) (:foreground "red3"))
@@ -781,8 +816,6 @@
   "Font Lock mode face used to highlight references."
   :group 'font-lock-faces)
 
-;; #### FSF has font-lock-builtin-face.
-
 (defface font-lock-preprocessor-face
   '((((class color) (background dark)) (:foreground "steelblue1"))
     (((class color) (background light)) (:foreground "blue3"))
@@ -790,7 +823,6 @@
   "Font Lock Mode face used to highlight preprocessor conditionals."
   :group 'font-lock-faces)
 
-;; #### Currently unused
 (defface font-lock-warning-face
   '((((class color) (background light)) (:foreground "Red" :bold t))
     (((class color) (background dark)) (:foreground "Pink" :bold t))
@@ -1457,8 +1489,8 @@
 
 (defun font-lock-apply-syntactic-highlight (highlight)
   "Apply HIGHLIGHT following a match.
- HIGHLIGHT should be of the form MATCH-HIGHLIGHT,
- see `font-lock-syntactic-keywords'."
+HIGHLIGHT should be of the form MATCH-HIGHLIGHT,
+see `font-lock-syntactic-keywords'."
   (let* ((match (nth 0 highlight))
  	 (start (match-beginning match)) (end (match-end match))
  	 (value (nth 1 highlight))
@@ -1536,8 +1568,7 @@
 	      (font-lock-apply-syntactic-highlight (car highlights))
 	    (font-lock-fontify-syntactic-anchored-keywords (car highlights)
 							   end))
-	  (setq highlights (cdr highlights)))
-	)
+	  (setq highlights (cdr highlights))))
       (setq keywords (cdr keywords)))))
 
 ;;; Regexp fontification functions.
@@ -1683,8 +1714,9 @@
 ;; Various functions.
 
 (defun font-lock-compile-keywords (keywords)
-  ;; Compile `font-lock-keywords' into the form (t KEYWORD ...) where KEYWORD
-  ;; is the (MATCHER HIGHLIGHT ...) shown in the variable's doc string.
+  "Compile KEYWORDS into the form (t KEYWORD ...).
+Here KEYWORD is of the form (MATCHER HIGHLIGHT ...) as shown in the
+`font-lock-keywords' doc string."
   (if (eq (car-safe keywords) t)
       keywords
     (cons t (mapcar 'font-lock-compile-keyword keywords))))
@@ -1704,7 +1736,7 @@
 	 keyword)))
 
 (defun font-lock-eval-keywords (keywords)
-  ;; Evalulate KEYWORDS if a function (funcall) or variable (eval) name.
+  "Evaluate KEYWORDS if a function (funcall) or variable (eval) name."
   (if (listp keywords)
       keywords
     (font-lock-eval-keywords (if (fboundp keywords)
Index: lisp/lib-complete.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/lib-complete.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lisp/lib-complete.el	2002/03/13 08:52:06	1.7
+++ lisp/lib-complete.el	2002/08/04 00:05:48	1.8
@@ -328,11 +328,7 @@
   (let ((path (if (or (null library) (equal library ""))
 		   nil
 		(locate-file library (or find-library-source-path load-path)
-			     ;; decompression doesn't work with Mule -slb
-			     ;; !!#### fix this
-			     (if (featurep 'mule)
-				 ":.el:.elc"
-			       ":.el:.el.gz:.el.Z:.elc")))))
+			       ":.el:.el.gz:.el.Z:.elc"))))
     (if path (funcall (if (fboundp display-function)
 			  display-function 'find-file)
 		      path codesys)
Index: lisp/simple.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/simple.el,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- lisp/simple.el	2002/05/16 13:30:58	1.42
+++ lisp/simple.el	2002/08/12 07:44:28	1.43
@@ -298,6 +298,8 @@
 	    (delete-region (point) (+ (point) (length fill-prefix))))
 	(fixup-whitespace))))
 
+(defalias 'join-line 'delete-indentation)
+
 (defun fixup-whitespace ()
   "Fixup white space between objects around point.
 Leave one space or none, according to the context."
Index: lisp/startup.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/startup.el,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- lisp/startup.el	2002/06/04 17:39:48	1.42
+++ lisp/startup.el	2002/08/22 11:19:56	1.43
@@ -320,7 +320,7 @@
 			startup.  Also implies `-vanilla'.
   -no-packages          Pretend like the packages don't exist.  Don't put
                         any packages in the load path or set up any package
-                        autoloads.  Also Implies `-vanilla'.  Use this when
+                        autoloads.  Also implies `-vanilla'.  Use this when
                         running XEmacs in batch mode when you aren't using
                         any functionality in packages and want to make sure
                         that you get no interference from packages
Index: lisp/version.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/version.el,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- lisp/version.el	2001/06/10 10:42:24	1.49
+++ lisp/version.el	2002/08/28 05:36:32	1.50
@@ -36,7 +36,7 @@
 Warning, this variable did not exist in XEmacs versions prior to 20.3")
 
 (defconst emacs-version
-  (format "%d.%d %s%s%s%s"
+  (format "%d.%d %s%s%s%s%s"
 	  emacs-major-version
 	  emacs-minor-version
 	  (if emacs-patch-level
@@ -47,6 +47,9 @@
 	    "")
 	  (if xemacs-codename
 	      (concat " \"" xemacs-codename "\"")
+	    "")
+	  (if xemacs-extra-name
+	      (concat " " xemacs-extra-name)
 	    "")
 	  " XEmacs Lucid")
   "Version numbers of this version of XEmacs.")
Index: lisp/mule/japan-util.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/japan-util.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- lisp/mule/japan-util.el	2002/03/16 10:39:06	1.4
+++ lisp/mule/japan-util.el	2002/08/02 16:54:24	1.5
@@ -35,9 +35,9 @@
 ;;;###autoload
 (defun setup-japanese-environment-internal ()
   (cond ((eq system-type 'ms-dos)
-	 (prefer-coding-system 'japanese-shift-jis))
+	 (prefer-coding-system 'shift_jis))
 	((eq system-type 'usg-unix-v)
-	 (prefer-coding-system 'japanese-iso-8bit)))
+	 (prefer-coding-system 'euc-jp)))
   (setq sentence-end-save sentence-end)
   (setq sentence-end (concat sentence-end "\\|[。?!]")))
 
@@ -89,7 +89,7 @@
 			 (get-char-code-property hira 'kana-composition)))))
 	  (put-char-code-property hiragana 'katakana katakana)
 	  (put-char-code-property hiragana 'jisx0201 jisx0201)))
-    (when (integerp katakana)
+    (when (characterp katakana)
       (put-char-code-property katakana 'hiragana hiragana)
       (put-char-code-property katakana 'jisx0201 jisx0201))
     (if jisx0201
Index: lisp/mule/mule-category.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/mule-category.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- lisp/mule/mule-category.el	2002/03/21 07:30:22	1.8
+++ lisp/mule/mule-category.el	2002/08/02 16:54:25	1.9
@@ -266,7 +266,7 @@
     (if (and (nth 2 (car l))
 	     (not (defined-category-p (nth 2 (car l)))))
 	(define-category (nth 1 (car l)) (nth 2 (car l))))
-    (modify-category-entry (car (car l)) (nth 1 (car l)))
+    (modify-category-entry (car (car l)) (nth 1 (car l)) nil t)
     (setq l (cdr l))))
 
 ;;; Setting word boundary.
Index: lisp/mule/mule-cmds.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/mule-cmds.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- lisp/mule/mule-cmds.el	2002/04/01 03:58:14	1.20
+++ lisp/mule/mule-cmds.el	2002/08/02 16:54:25	1.21
@@ -753,6 +753,11 @@
   (let ((func (get-language-info language-name 'setup-function)))
     (if (fboundp func)
 	(funcall func)))
+
+  ;; Fit the charsets preferences in unicode conversions for the
+  ;; language environment.
+  (set-language-unicode-precedence-list (charset-list))
+
   (run-hooks 'set-language-environment-hook)
   (force-mode-line-update t))
 
Index: lwlib/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/ChangeLog,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- lwlib/ChangeLog	2002/07/27 03:52:53	1.41
+++ lwlib/ChangeLog	2002/08/30 08:26:05	1.42
@@ -1,3 +1,7 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: man/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/ChangeLog,v
retrieving revision 1.179
retrieving revision 1.188
diff -u -r1.179 -r1.188
--- man/ChangeLog	2002/07/27 03:52:55	1.179
+++ man/ChangeLog	2002/08/30 08:26:08	1.188
@@ -1,11 +1,45 @@
-2002-07-27  Steve Youngs  <youngs@xemacs.org>
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
 
-	* XEmacs 21.5.8 "broccoli" is released.
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
+2002-08-22  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* internals/internals.texi (Regression Testing XEmacs): Document
+	how to skip and warn about tests that depend on packages.
+
+2002-08-16  Stephen J. Turnbull  <stephen@xemacs.org>
+ 
+	* internals/internals.texi (Regression Testing XEmacs): Fix typo.
+
+2002-08-15  Stephen J. Turnbull  <stephen@xemacs.org>
+ 
+	* internals/internals.texi (GCPROing): Add comment on GCPRO.
+	(Regression Testing XEmacs): New node.
+	(Modules for Regression Testing): New node.
+
+2002-08-12  Simon Josefsson  <jas@extundo.com>
+
+	* lispref/building.texi (Pure Storage): purecopy is a no-op.
+
+2002-08-08  Ville Skytt�  <ville.skytta@xemacs.org>
 
-2002-07-13  Adrian Aichner  <adrian@xemacs.org>
+	* xemacs/packages.texi (Available Packages): Bring up to date.
 
-	* xemacs/packages.texi (Installing Packages): Fix reference to
-	EFS.
+2002-08-02  Ville Skytt�  <ville.skytta@xemacs.org>
+
+	* xemacs/packages.texi (Available Packages):
+	Bring package list up to date, thanks also to Brian Palmer.
+
+2002-07-30  Ville Skytt�  <ville.skytta@xemacs.org>
+
+	* term.texi (Input to the inferior): Fix term line/char mode
+	switch keybindings.  Kudos to Jacob P. Burckhardt.
+
+	* xemacs/misc.texi (Term Mode): Ditto.
+
+2002-07-27  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.8 "broccoli" is released.
 
 2002-07-06  Adrian Aichner  <adrian@xemacs.org>
 
Index: man/term.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/term.texi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- man/term.texi	2001/12/15 19:25:19	1.3
+++ man/term.texi	2002/07/29 21:52:15	1.4
@@ -178,8 +178,8 @@
 (except possibly the prompt) is sent to the inferior process.
 Line mode is basically the original shell mode from earlier Emacs versions.
 
-To switch from line mode to character mode type @kbd{C-c c}.
-To switch from character mode to line mode type @kbd{C-c l}.
+To switch from line mode to character mode type @kbd{C-c C-k}.
+To switch from character mode to line mode type @kbd{C-c C-j}.
 
 In either mode, "echoing" of user input is handled by the inferior.
 Therefor, in line mode after an input line at the end of the buffer
Index: man/internals/internals.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/internals/internals.texi,v
retrieving revision 1.31
retrieving revision 1.34
diff -u -r1.31 -r1.34
--- man/internals/internals.texi	2002/06/05 12:00:46	1.31
+++ man/internals/internals.texi	2002/08/22 14:56:32	1.34
@@ -118,6 +118,7 @@
 * How Lisp Objects Are Represented in C::
 * Major Textual Changes::
 * Rules When Writing New C Code::
+* Regression Testing XEmacs::
 * CVS Techniques::
 * A Summary of the Various XEmacs Modules::
 * Allocation of Objects in XEmacs Lisp::
@@ -174,6 +175,8 @@
 
 * Merging a Branch into the Trunk::
 
+Regression Testing XEmacs
+
 A Summary of the Various XEmacs Modules
 
 * Low-Level Modules::
@@ -188,6 +191,7 @@
 * Modules for Interfacing with the Operating System::
 * Modules for Interfacing with X Windows::
 * Modules for Internationalization::
+* Modules for Regression Testing::
 
 Allocation of Objects in XEmacs Lisp
 
@@ -2175,7 +2179,7 @@
 gr '_Itext' _CHARPTR $files
 @end example
 
-@node Rules When Writing New C Code, CVS Techniques, Major Textual Changes, Top
+@node Rules When Writing New C Code, Regression Testing XEmacs, Major Textual Changes, Top
 @chapter Rules When Writing New C Code
 @cindex writing new C code, rules when
 @cindex C code, rules when writing new
@@ -3431,8 +3435,117 @@
 @item
 add an INIT_LRECORD_IMPLEMENTATION call to @code{syms_of_@var{foo}.c}
 @end enumerate
+
+@node Regression Testing XEmacs, CVS Techniques, Rules When Writing New C Code, Top
+@chapter Regression Testing XEmacs
+@cindex testing, regression
+
+The source directory @file{tests/automated} contains XEmacs' automated
+test suite.  The usual way of running all the tests is running
+@code{make check} from the top-level build directory.
+
+The test suite is unfinished and it's still lacking some essential
+features.  It is nevertheless recommended that you run the tests to
+confirm that XEmacs behaves correctly.
+
+If you want to run a specific test case, you can do it from the
+command-line like this:
+
+@example
+$ xemacs -batch -l test-harness.elc -f batch-test-emacs TEST-FILE
+@end example
+
+If something goes wrong, you can run the test suite interactively by
+loading @file{test-harness.el} into a running XEmacs and typing
+@kbd{M-x test-emacs-test-file RET <filename> RET}.  You will see a log of
+passed and failed tests, which should allow you to investigate the
+source of the error and ultimately fix the bug.
+
+Adding a new test file is trivial: just create a new file here and it
+will be run.  There is no need to byte-compile any of the files in
+this directory---the test-harness will take care of any necessary
+byte-compilation.
+
+Look at the existing test cases for the examples of coding test cases.
+It all boils down to your imagination and judicious use of the macros
+@code{Assert}, @code{Check-Error}, @code{Check-Error-Message}, and
+@code{Check-Message}.
+
+Here's a simple example checking case-sensitive and case-insensitive
+comparisons from @file{case-tests.el}.
+
+@example
+(with-temp-buffer
+  (insert "Test Buffer")
+  (let ((case-fold-search t))
+    (goto-char (point-min))
+    (Assert (eq (search-forward "test buffer" nil t) 12))
+    (goto-char (point-min))
+    (Assert (eq (search-forward "Test buffer" nil t) 12))
+    (goto-char (point-min))
+    (Assert (eq (search-forward "Test Buffer" nil t) 12))
+
+    (setq case-fold-search nil)
+    (goto-char (point-min))
+    (Assert (not (search-forward "test buffer" nil t)))
+    (goto-char (point-min))
+    (Assert (not (search-forward "Test buffer" nil t)))
+    (goto-char (point-min))
+    (Assert (eq (search-forward "Test Buffer" nil t) 12))))
+@end example
+
+This example could be inserted in a file in @file{tests/automated}, and
+it would be a complete test, automatically executed when you run
+@kbd{make check} after building XEmacs.  More complex tests may require
+substantial temporary scaffolding to create the environment that elicits
+the bugs, but the top-level Makefile and @file{test-harness.el} handle
+the running and collection of results from the @code{Assert},
+@code{Check-Error}, @code{Check-Error-Message}, and @code{Check-Message}
+macros.
+
+In general, you should avoid using functionality from packages in your
+tests, because you can't be sure that everyone will have the required
+package.  However, if you've got a test that works, by all means add it.
+Simply wrap the test in an appropriate test, add a notice that the test
+was skipped, and update the @code{skipped-test-reasons} hashtable.
+Here's an example from @file{syntax-tests.el}:
+
+@example
+;; Test forward-comment at buffer boundaries
+(with-temp-buffer
+
+  ;; try to use exactly what you need: featurep, boundp, fboundp
+  (if (not (fboundp 'c-mode))
+
+      ;; We should provide a standard function for this boilerplate,
+      ;; probably called `Skip-Test' -- check for that API with C-h f
+      (let* ((reason "c-mode unavailable")
+	     (count (gethash reason skipped-test-reasons)))
+	(puthash reason (if (null count) 1 (1+ count))
+		 skipped-test-reasons)
+	(Print-Skip "comment and parse-partial-sexp tests" reason))
+
+    ;; and here's the test code
+    (c-mode)
+    (insert "// comment\n")
+    (forward-comment -2)
+    (Assert (eq (point) (point-min)))
+    (let ((point (point)))
+      (insert "/* comment */")
+      (goto-char point)
+      (forward-comment 2)
+      (Assert (eq (point) (point-max)))
+      (parse-partial-sexp point (point-max)))))
+@end example
+
+@code{Skip-Test} is intended for use with features that are normally
+present in typical configurations.  For truly optional features, or
+tests that apply to one of several alternative implementations (eg, to
+GTK widgets, but not Athena, Motif, MS Windows, or Carbon), simply
+silently omit the test.
 
-@node CVS Techniques, A Summary of the Various XEmacs Modules, Rules When Writing New C Code, Top
+
+@node CVS Techniques, A Summary of the Various XEmacs Modules, Regression Testing XEmacs, Top
 @chapter CVS Techniques
 @cindex CVS techniques
 
@@ -3541,6 +3654,7 @@
 * Modules for Interfacing with the Operating System::
 * Modules for Interfacing with X Windows::
 * Modules for Internationalization::
+* Modules for Regression Testing::
 @end menu
 
 @node Low-Level Modules
@@ -5205,6 +5319,36 @@
 
 
 
+@node Modules for Regression Testing
+@section Modules for Regression Testing
+@cindex modules for regression testing
+@cindex regression testing, modules for
+
+@example
+test-harness.el
+base64-tests.el
+byte-compiler-tests.el
+case-tests.el
+ccl-tests.el
+c-tests.el
+database-tests.el
+extent-tests.el
+hash-table-tests.el
+lisp-tests.el
+md5-tests.el
+mule-tests.el
+regexp-tests.el
+symbol-tests.el
+syntax-tests.el
+@end example
+
+@file{test-harness.el} defines the macros @code{Assert},
+@code{Check-Error}, @code{Check-Error-Message}, and
+@code{Check-Message}.  The other files are test files, testing various
+XEmacs facilities.
+
+
+
 @node Allocation of Objects in XEmacs Lisp, Dumping, A Summary of the Various XEmacs Modules, Top
 @chapter Allocation of Objects in XEmacs Lisp
 @cindex allocation of objects in XEmacs Lisp
@@ -5471,6 +5615,10 @@
 weirdly corrupted objects or even in incorrect values in a totally
 different section of code.
 @end enumerate
+
+If you don't understand whether to @code{GCPRO} in a particular
+instance, ask on the mailing lists.  A general hint is that @code{prog1}
+is the canonical example
 
 @cindex garbage collection, conservative
 @cindex conservative garbage collection
Index: man/lispref/building.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/lispref/building.texi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- man/lispref/building.texi	2001/04/12 18:22:11	1.4
+++ man/lispref/building.texi	2002/08/12 07:45:38	1.5
@@ -209,10 +209,7 @@
 as symbols, but just returns them unchanged.  It signals an error if
 asked to copy markers.
 
-This function is a no-op except while XEmacs is being built and dumped;
-it is usually called only in the file
-@file{xemacs/lisp/prim/loaddefs.el}, but a few packages call it just in
-case you decide to preload them.
+This function is a no-op in XEmacs, and its use is deprecated.
 @end defun
 
 @defvar pure-bytes-used
Index: man/xemacs/misc.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/xemacs/misc.texi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- man/xemacs/misc.texi	2001/04/12 18:22:28	1.2
+++ man/xemacs/misc.texi	2002/07/29 21:52:17	1.3
@@ -417,14 +417,14 @@
 
 To switch between line and char mode, use these commands:
 @table @kbd
-@kindex C-c C-k @r{(Term mode)}
+@kindex C-c C-j @r{(Term mode)}
 findex term-char-mode
-@item C-c C-k
+@item C-c C-j
 Switch to line mode.  Do nothing if already in line mode.
 
-@kindex C-c C-j @r{(Term mode)}
+@kindex C-c C-k @r{(Term mode)}
 @findex term-line-mode
-@item C-c C-j
+@item C-c C-k
 Switch to char mode.  Do nothing if already in char mode.
 @end table
 
Index: man/xemacs/packages.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/xemacs/packages.texi,v
retrieving revision 1.14
retrieving revision 1.18
diff -u -r1.14 -r1.18
--- man/xemacs/packages.texi	2002/05/01 08:25:52	1.14
+++ man/xemacs/packages.texi	2002/08/16 12:40:52	1.18
@@ -664,7 +664,7 @@
 looking for isn't here, please send a message to the
 @email{xemacs-beta@@xemacs.org, XEmacs Beta list}.
 
-This data is up-to-date as of May 15, 2001.
+This data is up-to-date as of August 8, 2002.
 
 @subsection Normal Packages
 A very broad selection of elisp packages.
@@ -683,7 +683,7 @@
 Basic TeX/LaTeX support.
 
 @item bbdb
-The Big Brother Data Base
+The Big Brother Data Base: a rolodex-like database program.
 
 @item build
 Build XEmacs using custom widgets.
@@ -700,8 +700,12 @@
 @item cc-mode
 C, C++ and Java language support.
 
+@item clearcase
+Support for the Clearcase version control system.
+
 @item cookie
-Spook and Yow (Zippy quotes).
+"Fortune cookie"-style messages. Includes Spook (suspicious phrases) 
+and Yow (Zippy quotes).
 
 @item crisp
 Crisp/Brief emulation.
@@ -709,10 +713,19 @@
 @item debug
 GUD, gdb, dbx debugging support.
 
+@item dictionary
+Interface to RFC2229 dictionary servers.
+
 @item dired
 The DIRectory EDitor is for manipulating, and running commands on
 files in a directory.
 
+@item docbookide
+DocBook editing support.
+
+@item ecrypto
+Crypto functionality in Emacs Lisp.
+
 @item edebug
 A Lisp debugger.
 
@@ -729,10 +742,6 @@
 @item efs
 Treat files on remote systems the same as local files.
 
-@item eicq
-ICQ Client developed and tested on Linux x86; 
-only supported on that platform
-
 @item eieio
 Enhanced Implementation of Emacs Interpreted Objects.
 
@@ -745,6 +754,9 @@
 @item eshell
 Command shell implemented entirely in Emacs Lisp.
 
+@item ess
+ESS: Emacs Speaks Statistics.
+
 @item eterm
 Terminal emulator.
 
@@ -772,9 +784,15 @@
 @item gnus
 The Gnus Newsreader and Mailreader.
 
+@item haskell-mode
+Haskell editing support.
+
 @item hm--html-menus
 HTML editing.
 
+@item ibuffer
+Advanced replacement for buffer-menu.
+
 @item idlwave
 Editing and Shell mode for the Interactive Data Language.
 
@@ -782,7 +800,7 @@
 Enhanced front-end for Grep.
 
 @item ilisp
-Front-end for Inferior Lisp.
+Front-end for interacting with Inferior Lisp (external lisps).
 
 @item ispell
 Spell-checking with ispell.
@@ -790,6 +808,9 @@
 @item jde
 Java language and development support.
 
+@item liece
+IRC (Internet Relay Chat) client for Emacs.
+
 @item mail-lib
 Fundamental lisp files for providing email support.
 
@@ -797,17 +818,20 @@
 Support for messaging encryption with PGP.
 
 @item mew
-Messaging in an Emacs World.
+Messaging in an Emacs World; a MIME-based email program.
 
 @item mh-e
 Front end support for MH.
 
 @item mine
-Minehunt.
+Elisp implementation of the game 'Minehunt'.
 
 @item misc-games
 Other amusements and diversions.
 
+@item mmm-mode
+Support for Multiple Major Modes within a single buffer.
+
 @item net-utils
 Miscellaneous Networking Utilities.  This is a single-file package and 
 files may be deleted at will.
@@ -816,6 +840,9 @@
 Miscellaneous single-file O/S utilities, for printing, archiving,
 compression, remote shells, etc.
 
+@item ocaml
+Objective Caml editing support.
+
 @item pc
 PC style interface emulation.
 
@@ -828,8 +855,8 @@
 @item prog-modes
 Miscellaneous single-file lisp files for various programming languages.
 
-@item ps-print-nomule
-Old, but no-Mule safe ps-print.
+@item ps-print
+Print buffers to PostScript printers.
 
 @item psgml
 Validated HTML/SGML editing.
@@ -840,6 +867,9 @@
 @item rmail
 An obsolete Emacs mailer.  If you do not already use it don't start.
 
+@item sasl
+Simple Authentication and Security Layer (SASL) library.
+
 @item scheme
 Front-end support for Inferior Scheme.
 
@@ -852,9 +882,15 @@
 @item sh-script
 Support for editing shell scripts.
 
+@item sieve
+Manage Sieve email filtering scripts.
+
 @item slider
 User interface tool.
 
+@item sml-mode
+Standard ML editing support.
+
 @item sounds-au
 XEmacs Sun sound files.
 
@@ -891,6 +927,10 @@
 @item tpu
 DEC EDIT/TPU support.
 
+@item tramp
+Remote shell-based file editing.  This is similar to EFS or Ange-FTP,
+but works with rsh/ssh and rcp/scp.
+
 @item vc
 Version Control for Free systems.
 
@@ -922,6 +962,9 @@
 supporting Lisp development.  It is a single-file package so it may be 
 tailored.
 
+@item xslide
+XSL editing support.
+
 @item xslt-process
 A minor mode for (X)Emacs which allows running an XSLT processor on a
 buffer.
@@ -945,6 +988,12 @@
 Wnn (4.2 and 6) support.  SJ3 support.  Must be installed prior to
 XEmacs build.
 
+@item latin-unity
+Unify character sets in a buffer. When characters belong to disjoint
+character sets, this attempts to translate the characters so
+that they belong to one character set. If the buffer coding system is
+not sufficient, this suggests different coding systems.
+
 @item leim
 Quail.  Used for everything other than English and Japanese.
 
@@ -957,6 +1006,9 @@
 
 @item mule-base
 Basic Mule support.  Must be installed prior to building with Mule.
+
+@item mule-ucs
+Extended coding systems (including Unicode) for XEmacs.
 
 @item skk
 Another Japanese Language Input Method.  Can be used without a
Index: modules/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/modules/ChangeLog,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- modules/ChangeLog	2002/07/27 03:52:59	1.6
+++ modules/ChangeLog	2002/08/30 08:26:11	1.7
@@ -1,3 +1,7 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: netinstall/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/netinstall/ChangeLog,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- netinstall/ChangeLog	2002/07/27 03:53:00	1.21
+++ netinstall/ChangeLog	2002/08/30 08:26:13	1.22
@@ -1,3 +1,7 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
@@ -459,6 +463,6 @@
 
 	* all: port from cygwin setup.
 
-%%% $Id: ChangeLog,v 1.21 2002/07/27 03:53:00 youngs Exp $
-$Revision: 1.21 $
+%%% $Id: ChangeLog,v 1.22 2002/08/30 08:26:13 youngs Exp $
+$Revision: 1.22 $
 
Index: nt/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/ChangeLog,v
retrieving revision 1.139
retrieving revision 1.141
diff -u -r1.139 -r1.141
--- nt/ChangeLog	2002/07/27 03:53:01	1.139
+++ nt/ChangeLog	2002/08/30 08:26:15	1.141
@@ -1,3 +1,13 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
+2002-07-31  Adrian Aichner  <adrian@xemacs.org>
+
+	* xemacs.mak (USE_KKCC): New.  Default it to 1 to get it noticed.
+	Add line to Installation file, when it's enabled.  Add period to
+	line add to Installation for USE_CRTDLL.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: nt/xemacs.mak
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/xemacs.mak,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- nt/xemacs.mak	2002/06/25 21:20:47	1.92
+++ nt/xemacs.mak	2002/07/31 20:26:41	1.93
@@ -208,6 +208,9 @@
 !if !defined(USE_MINITAR)
 USE_MINITAR=$(HAVE_ZLIB)
 !endif
+!if !defined(USE_KKCC)
+USE_KKCC=1
+!endif
 
 # A little bit of adhockery. Default to use system malloc and
 # DLL version of the C runtime library when using portable
@@ -1531,7 +1534,7 @@
   Using system malloc.
 !endif
 !if $(USE_CRTDLL)
-  Using DLL version of C runtime library
+  Using DLL version of C runtime library.
 !endif
 !if $(ERROR_CHECK_ALL)
   Compiling in extra internal error-checking. XEmacs will be slow!
@@ -1544,6 +1547,9 @@
 !endif
 !if $(QUICK_BUILD)
   Disabling non-essential build actions.  Use with care!
+!endif
+!if $(USE_KKCC)
+  Using new experimental GC algorithms.
 !endif
 <<NOKEEP
 	@echo --------------------------------------------------------------------
Index: nt/installer/Wise/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/installer/Wise/ChangeLog,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- nt/installer/Wise/ChangeLog	2002/07/27 03:53:04	1.10
+++ nt/installer/Wise/ChangeLog	2002/08/30 08:26:17	1.11
@@ -1,3 +1,7 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.480
retrieving revision 1.501
diff -u -r1.480 -r1.501
--- src/ChangeLog	2002/07/27 03:53:05	1.480
+++ src/ChangeLog	2002/08/30 08:26:18	1.501
@@ -1,3 +1,272 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
+2002-08-29  Jerry James  <james@xemacs.org>
+
+	* lisp.h: structrures -> structures.
+
+2002-08-21  Jerry James  <james@xemacs.org>
+
+	* getloadavg.c: Substitute syssignal.h for signal.h.
+	* malloc.c: Ditto.
+	* unexhp9k3.c: Ditto.
+	* syssignal.h: Put NSIG setting code for SVR4 here.
+	* s/usg5-4.h: Don't include signal.h.  Remove NSIG setting code,
+	since signal.h has not yet been included.
+
+2002-08-16  Steve Youngs  <youngs@xemacs.org>
+
+	* config.h.in (XEMACS_EXTRA_NAME): New.
+
+	* emacs.c (vars_of_emacs): Use it.
+
+2002-08-22  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* eval.c (do_autoload): GCPRO both arguments and a local Lisp_Object.
+
+	* callint.c (Fcall_interactively):
+	* eval.c (function_argcount):
+	(Fmacroexpand_internal):
+	(Fcommand_execute):
+	(Feval):
+	(Ffuncall):
+	* keymap.c (get_keymap):
+	* lisp.h (do_autoload):
+	Add comment that do_autoload GCPROs both arguments.
+
+2002-08-20  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* extents.c (SOE_DEBUG): Warn not to use this until debugging
+	functions are rewritten.
+
+2001-08-13  Dmitry Astapov  <adept@umc.com.ua>
+
+	* event-Xt.c (maybe_define_x_key_as_self_inserting_character):
+	Don't bogusly reinitialize ascii_character property.
+
+2002-08-13  David Bush  <David.Bush@intel.com>
+
+	* device-msw.c: Correct initialization list for devmode_description
+	Add dumpable flag to msprinter-settings for USE_KKCC
+	* dialog-msw.c: Add dumpable flag to mswindows-dialog-id for USE_KKCC
+	* event-msw.c (mswindows_enqueue_misc_user_event): With USE_KKCC
+	use mutator macros to set event parameters
+	* event-msw.c (mswindows_enqueue_magic_event): With USE_KKCC
+	use mutator macros to set event parameters
+	* event-msw.c (mswindows_enqueue_process_event): With USE_KKCC
+	use mutator macros to set event parameters
+	* event-msw.c (mswindows_enqueue_mouse_button_event): Reorder
+	event setup so event type is set first to support USE_KKCC.
+	For USE_KKCC use mutator macros to set event parameters
+	* event-msw.c (mswindows_enqueue_keypress_event): With USE_KKCC
+	use mutator macros to set event parameters
+	* event-msw.c (mswindows_dequeue_dispatch_event): With USE_KKCC
+	use accessor to get and mutator macros to set event parameters
+	* event-msw.c (mswindows_cancel_dispatch_event): With USE_KKCC
+	use accessor macros to get event parameters
+	* event-msw.c (mswindows_wm_timer_callback): With USE_KKCC
+	use mutator macros to set event parameters
+	* event-msw.c (mswindows_dde_callback): With USE_KKCC
+	use mutator macros to set event parameters
+	* event-msw.c (mswindows_wnd_proc): With USE_KKCC
+	use mutator macros to set event parameters
+	* event-msw.c (emacs_mswindows_remove_timeout): With USE_KKCC
+	use mutator macros to set event parameters
+	* event-msw.c (emacs_mswindows_format_magic_event): With USE_KKCC
+	use accessor macro to access magic event type
+	* event-msw.c (emacs_mswindows_compare_magic_event): With USE_KKCC
+	use accessor macro to access magic event type
+	* event-msw.c (emacs_mswindows_hash_magic_event): With USE_KKCC
+	use accessor macro to access magic event type
+	* event-msw.c (emacs_mswindows_handle_magic_event): With USE_KKCC
+	use accessor macro to access magic event type and event data
+	* event-msw.c (emacs_mswindows_quit_p): With USE_KKCC use event
+	accessor and mutator macros to get/set event parameters
+	* gui-msw.c (mswindows_handle_gui_wm_command): For USE_KKCC
+	use mutator macros to set event parameters.  Make the event
+	data type match the event type.
+	* menubar-msw.c (mswindows_popup_menu): With USE_KKCC use
+	accessor macros to extract button position
+
+2002-08-12  David Bush  <David.Bush@intel.com>
+
+	* events.c: Use DEFINE_BASIC_LRECORD_IMPLEMENTATION instead of
+	DEFINE_LRECORD_IMPLEMENTATION for the new event data objects to cause
+	the objects to be flagged as basic.
+
+2002-08-08  Jerry James  <james@xemacs.org>
+
+	* s/linux.h: Turn ORDINARY_LINK on for Linux.
+
+2002-08-02  Marcus Crestani  <crestani@informatik.uni-tuebingen.de>
+
+	Additions for USE_KKCC:
+	* tooltalk.c: Add dumpable-flag to tooltalk_message and
+	tooltalk_pattern.
+	* ui-gtk.c: Add dumpable-flag to emacs_ffi and emacs_gtk_object.
+	Add description for emacs_gtk_boxed.
+
+2002-08-12  Mike Sperber <mike@xemacs.org>
+
+	* event-Xt.c (x_to_emacs_keysym):
+	(enqueue_focus_event): Properly initialize event type for USE_KKCC
+	(due to suggestions from David Bush <David.Bush@intel.com>).
+
+2002-08-06  Jerry James  <james@xemacs.org>
+
+ 	* window.c (Fsplit_window): Count only half of the divider width
+ 	against the left window when splitting horizontally.
+
+2002-07-29  Jerry James  <james@xemacs.org>
+
+	* lread.c (locate_file): Any nonnegative return value indicates
+	success if MODE is nonnegative.
+
+2002-08-03  Brian A Palmer  <bpalmer@rescomp.Stanford.EDU>
+
+	* fns.c (Fsplit_string_by_char): Make 2nd arg SEPCHAR a required
+	argument. 
+
+2002-08-03  Steve Youngs  <youngs@xemacs.org>
+
+	* objects-gtk.c: Fix '--with-mule' '--with-gtk' builds.
+	From Vaclav Barta <vbar@comp.cz>.
+
+2002-08-02  Marcus Crestani  <crestani@informatik.uni-tuebingen.de>
+
+	* postgresql.c: Add dumpable-flag to pgconn and pgresult for
+	USE_KKCC.
+
+2002-07-31  Didier Verna  <didier@xemacs.org>
+
+	* file-coding.c (make_coding_system_1): Add missing call to
+	`xfree (newname)'.
+
+	* fix memory leak introduced by
+	2002-04-14  Ben Wing  <ben@xemacs.org>:
+	alloc.c (Fmake_byte_code): don't xnew_array of size 0.
+	(sweep_compiled_functions): define ADDITIONAL_FREE_compiled_function
+	to free the args field when needed.
+
+2002-07-31  David Bush  <David.Bush@intel.com>
+
+	* eldap.c: Add the dumpable-flag to the USE_KKCC version of 
+	DEFINE_LRECORD_IMPLEMENTATION for "ldap"
+
+2002-08-01  Mike Sperber <mike@xemacs.org>
+
+	* event-stream.c:
+	* event-Xt.c: 
+	* events.h: 
+	* events.c: 
+	* alloc.c: Fix various kkcc-related nits that show up in MULE and
+	union-type builds.
+
+2002-07-31  David Bush  <David.Bush@intel.com>
+
+	* events.c (event_equal): Correct comparison in MS Windows
+	conditional code to use event structure defined for -use-kkcc.
+
+2002-07-29  Sean MacLennan <seanm@seanm.ca>
+
+	* glyphs-x.c (x_locate_pixmap_file): Test path not to be 0, before
+	using it.
+
+2002-07-29  Jonathan Harris  <jonathan@xemacs.org>
+
+	* s/win32-native.h: Define HAVE_WCHAR_H for native Win32 build.
+
+2002-07-17  Marcus Crestani  <crestani@informatik.uni-tuebingen.de>
+	    Markus Kaltenbach  <makalten@informatik.uni-tuebingen.de>
+	    Mike Sperber <mike@xemacs.org>
+
+	configure flag to turn these changes on: --use-kkcc
+	
+	First we added a dumpable flag to lrecord_implementation. It shows,
+	if the object is dumpable and should be processed by the dumper.
+	* lrecord.h (struct lrecord_implementation): added dumpable flag
+	(MAKE_LRECORD_IMPLEMENTATION): fitted the different makro definitions
+	to the new lrecord_implementation and their calls.
+
+	Then we changed mark_object, that it no longer needs a mark method for
+	those types that have pdump descritions.
+	* alloc.c: 
+	(mark_object): If the object has a description, the new mark algorithm
+	is called, and the object is marked according to its description. 
+	Otherwise it uses the mark method like before.
+	
+	These procedures mark objects according to their descriptions. They 
+	are modeled on the corresponding pdumper procedures.
+	(mark_with_description): 
+	(get_indirect_count): 
+	(structure_size): 
+	(mark_struct_contents): 
+	These procedures still call mark_object, this is needed while there are
+	Lisp_Objects without descriptions left.
+
+	We added pdump descriptions for many Lisp_Objects:
+	* extents.c: extent_auxiliary_description
+	* database.c: database_description
+	* gui.c: gui_item_description
+	* scrollbar.c: scrollbar_instance_description
+	* toolbar.c: toolbar_button_description
+	* event-stream.c: command_builder_description
+	* mule-charset.c: charset_description
+	* device-msw.c: devmode_description
+	* dialog-msw.c: mswindows_dialog_id_description
+	* eldap.c: ldap_description
+	* postgresql.c: pgconn_description
+			pgresult_description
+	* tooltalk.c: tooltalk_message_description
+		      tooltalk_pattern_description
+	* ui-gtk.c: emacs_ffi_description
+	            emacs_gtk_object_description
+
+	* events.c:
+	* events.h:
+	* event-stream.c:
+	* event-Xt.c:
+	* event-gtk.c:
+	* event-tty.c:
+	To write a pdump description for Lisp_Event, we converted every struct
+	in the union event to a Lisp_Object. So we created nine new 
+	Lisp_Objects: Lisp_Key_Data, Lisp_Button_Data, Lisp_Motion_Data,
+	Lisp_Process_Data, Lisp_Timeout_Data, Lisp_Eval_Data, 
+	Lisp_Misc_User_Data, Lisp_Magic_Data, Lisp_Magic_Eval_Data.
+	We also wrote makro selectors and mutators for the fields of the new 
+	designed Lisp_Event and added everywhere these new abstractions.
+
+
+	We implemented XD_UNION support in (mark_with_description), so
+	we can describe exspecially console/device specific data with XD_UNION.
+	To describe with XD_UNION, we added a field to these objects, which 
+	holds the variant type of the object. This field is initialized in 
+	the appendant constructor. The variant is an integer, it has also to 
+	be described in an description, if XD_UNION is used.
+
+	XD_UNION is used in following descriptions:	
+	* console.c: console_description
+	(get_console_variant): returns the variant
+	(create_console): added variant initialization
+	* console.h (console_variant): the different console types
+	* console-impl.h (struct console): added enum console_variant contype
+
+	* device.c: device_description
+	(Fmake_device): added variant initialization
+	* device-impl.h (struct device): added enum console_variant devtype
+
+	* objects.c: image_instance_description
+	             font_instance_description
+	(Fmake_color_instance): added variant initialization
+	(Fmake_font_instance): added variant initialization
+	* objects-impl.h (struct Lisp_Color_Instance): added color_instance_type
+	* objects-impl.h (struct Lisp_Font_Instance): added font_instance_type
+
+	* process.c: process_description
+	(make_process_internal): added variant initialization
+	* process.h (process_variant): the different process types
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: src/alloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/alloc.c,v
retrieving revision 1.72
retrieving revision 1.75
diff -u -r1.72 -r1.75
--- src/alloc.c	2002/06/28 14:21:41	1.72
+++ src/alloc.c	2002/08/01 08:38:44	1.75
@@ -61,6 +61,10 @@
 #include "window.h"
 #include "console-stream.h"
 
+#ifdef USE_KKCC
+#include "file-coding.h"
+#endif /* USE_KKCC */
+
 #ifdef DOUG_LEA_MALLOC
 #include <malloc.h>
 #endif
@@ -937,6 +941,20 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("cons", cons,
+				     1, /*dumpable-flag*/
+				     mark_cons, print_cons, 0,
+				     cons_equal,
+				     /*
+				      * No `hash' method needed.
+				      * internal_hash knows how to
+				      * handle conses.
+				      */
+				     0,
+				     cons_description,
+				     Lisp_Cons);
+#else /* not USE_KKCC */
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("cons", cons,
 				     mark_cons, print_cons, 0,
 				     cons_equal,
@@ -948,6 +966,7 @@
 				     0,
 				     cons_description,
 				     Lisp_Cons);
+#endif /* not USE_KKCC */
 
 DEFUN ("cons", Fcons, 2, 2, 0, /*
 Create a new cons, give it CAR and CDR as components, and return it.
@@ -1155,13 +1174,22 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION("vector", vector,
+				       1, /*dumpable-flag*/
 				       mark_vector, print_vector, 0,
 				       vector_equal,
 				       vector_hash,
 				       vector_description,
 				       size_vector, Lisp_Vector);
-
+#else /* not USE_KKCC */
+DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION("vector", vector,
+				       mark_vector, print_vector, 0,
+				       vector_equal,
+				       vector_hash,
+				       vector_description,
+				       size_vector, Lisp_Vector);
+#endif /* not USE_KKCC */
 /* #### should allocate `small' vectors from a frob-block */
 static Lisp_Vector *
 make_vector_internal (Elemcount sizei)
@@ -1509,7 +1537,8 @@
 	}
     }
   
-    f->args = xnew_array (Lisp_Object, totalargs);
+    if (totalargs)
+      f->args = xnew_array (Lisp_Object, totalargs);
 
     {
       LIST_LOOP_2 (arg, arglist)
@@ -1661,6 +1690,133 @@
   return wrap_event (e);
 }
 
+#ifdef USE_KKCC
+DECLARE_FIXED_TYPE_ALLOC (key_data, Lisp_Key_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_key_data 1000
+
+Lisp_Object
+allocate_key_data (void)
+{
+  Lisp_Key_Data *d;
+
+  ALLOCATE_FIXED_TYPE (key_data, Lisp_Key_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_key_data);
+
+  return wrap_key_data(d);
+}
+
+DECLARE_FIXED_TYPE_ALLOC (button_data, Lisp_Button_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_button_data 1000
+
+Lisp_Object
+allocate_button_data (void)
+{
+  Lisp_Button_Data *d;
+
+  ALLOCATE_FIXED_TYPE (button_data, Lisp_Button_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_button_data);
+
+  return wrap_button_data(d);
+}
+
+DECLARE_FIXED_TYPE_ALLOC (motion_data, Lisp_Motion_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_motion_data 1000
+
+Lisp_Object
+allocate_motion_data (void)
+{
+  Lisp_Motion_Data *d;
+
+  ALLOCATE_FIXED_TYPE (motion_data, Lisp_Motion_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_motion_data);
+
+  return wrap_motion_data(d);
+}
+
+DECLARE_FIXED_TYPE_ALLOC (process_data, Lisp_Process_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_process_data 1000
+
+Lisp_Object
+allocate_process_data (void)
+{
+  Lisp_Process_Data *d;
+
+  ALLOCATE_FIXED_TYPE (process_data, Lisp_Process_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_process_data);
+
+  return wrap_process_data(d);
+}
+
+DECLARE_FIXED_TYPE_ALLOC (timeout_data, Lisp_Timeout_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_timeout_data 1000
+
+Lisp_Object
+allocate_timeout_data (void)
+{
+  Lisp_Timeout_Data *d;
+
+  ALLOCATE_FIXED_TYPE (timeout_data, Lisp_Timeout_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_timeout_data);
+
+  return wrap_timeout_data(d);
+}
+
+DECLARE_FIXED_TYPE_ALLOC (magic_data, Lisp_Magic_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_magic_data 1000
+
+Lisp_Object
+allocate_magic_data (void)
+{
+  Lisp_Magic_Data *d;
+
+  ALLOCATE_FIXED_TYPE (magic_data, Lisp_Magic_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_magic_data);
+
+  return wrap_magic_data(d);
+}
+
+DECLARE_FIXED_TYPE_ALLOC (magic_eval_data, Lisp_Magic_Eval_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_magic_eval_data 1000
+
+Lisp_Object
+allocate_magic_eval_data (void)
+{
+  Lisp_Magic_Eval_Data *d;
+
+  ALLOCATE_FIXED_TYPE (magic_eval_data, Lisp_Magic_Eval_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_magic_eval_data);
+
+  return wrap_magic_eval_data(d);
+}
+
+DECLARE_FIXED_TYPE_ALLOC (eval_data, Lisp_Eval_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_eval_data 1000
+
+Lisp_Object
+allocate_eval_data (void)
+{
+  Lisp_Eval_Data *d;
+
+  ALLOCATE_FIXED_TYPE (eval_data, Lisp_Eval_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_eval_data);
+
+  return wrap_eval_data(d);
+}
+
+DECLARE_FIXED_TYPE_ALLOC (misc_user_data, Lisp_Misc_User_Data);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_misc_user_data 1000
+
+Lisp_Object
+allocate_misc_user_data (void)
+{
+  Lisp_Misc_User_Data *d;
+
+  ALLOCATE_FIXED_TYPE (misc_user_data, Lisp_Misc_User_Data, d);
+  set_lheader_implementation (&d->lheader, &lrecord_misc_user_data);
+
+  return wrap_misc_user_data(d);
+}
+#endif /* USE_KKCC */
 
 /************************************************************************/
 /*			 Marker allocation				*/
@@ -1799,7 +1955,9 @@
    is done with the ADDITIONAL_FREE_string macro, which is the
    standard way to do finalization when using
    SWEEP_FIXED_TYPE_BLOCK(). */
+#ifdef USE_KKCC
 DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("string", string,
+						1, /*dumpable-flag*/
 						mark_string, print_string,
 						0, string_equal, 0,
 						string_description,
@@ -1808,7 +1966,17 @@
 						string_remprop,
 						string_plist,
 						Lisp_String);
-
+#else /* not USE_KKCC */
+DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("string", string,
+						mark_string, print_string,
+						0, string_equal, 0,
+						string_description,
+						string_getprop,
+						string_putprop,
+						string_remprop,
+						string_plist,
+						Lisp_String);
+#endif /* not USE_KKCC */
 /* String blocks contain this many useful bytes. */
 #define STRING_CHARS_BLOCK_SIZE					\
   ((Bytecount) (8192 - MALLOC_OVERHEAD -			\
@@ -2380,9 +2548,17 @@
   return Qnil;
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("lcrecord-list", lcrecord_list,
+			       0, /*dumpable-flag*/
 			       mark_lcrecord_list, internal_object_printer,
 			       0, 0, 0, 0, struct lcrecord_list);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("lcrecord-list", lcrecord_list,
+			       mark_lcrecord_list, internal_object_printer,
+			       0, 0, 0, 0, struct lcrecord_list);
+#endif /* not USE_KKCC */
+
 Lisp_Object
 make_lcrecord_list (Elemcount size,
 		    const struct lrecord_implementation *implementation)
@@ -2663,7 +2839,341 @@
 #define GC_CHECK_LHEADER_INVARIANTS(lheader)
 #endif
 
-
+
+
+#ifdef USE_KKCC
+/* The following functions implement the new mark algorithm. 
+   They mark objects according to their descriptions. They 
+   are modeled on the corresponding pdumper procedures. */
+
+static void mark_struct_contents (const void *data,
+						   const struct struct_description *
+						   sdesc,
+						   int count);
+
+/* This function extracts the value of a count variable described somewhere 
+   else in the description. It is converted corresponding to the type */ 
+static EMACS_INT
+get_indirect_count (EMACS_INT code,
+			  const struct lrecord_description *idesc,
+			  const void *idata)
+{
+  EMACS_INT count;
+  const void *irdata;
+
+  int line = XD_INDIRECT_VAL (code);
+  int delta = XD_INDIRECT_DELTA (code);
+
+  irdata = ((char *)idata) + idesc[line].offset;
+  switch (idesc[line].type)
+    {
+    case XD_BYTECOUNT:
+      count = *(Bytecount *)irdata;
+      break;
+    case XD_ELEMCOUNT:
+      count = *(Elemcount *)irdata;
+      break;
+    case XD_HASHCODE:
+      count = *(Hashcode *)irdata;
+      break;
+    case XD_INT:
+      count = *(int *)irdata;
+      break;
+    case XD_LONG:
+      count = *(long *)irdata;
+      break;
+    default:
+      stderr_out ("Unsupported count type : %d (line = %d, code = %ld)\n",
+		  idesc[line].type, line, (long)code);
+      count = 0; /* warning suppression */
+      abort ();
+    }
+  count += delta;
+  return count;
+}
+
+/* This function is called to mark the elements of an object. It processes
+   the description of the object and calls mark object with every described
+   object. */
+static void
+mark_with_description (const void *lheader, const struct lrecord_description *desc)
+{
+  int pos;
+
+  static const Lisp_Object *last_occured_object = (Lisp_Object *) 0;
+  static int mark_last_occured_object = 0;
+
+ reprocess_desc:
+  for (pos=0; desc[pos].type != XD_END; pos++)
+    {
+      const void *rdata = (const char *)lheader + desc[pos].offset;
+      switch (desc[pos].type) {
+      case XD_LISP_OBJECT: 
+	{
+	  const Lisp_Object *stored_obj = (const Lisp_Object *)rdata;
+
+	  if (EQ (*stored_obj, Qnull_pointer))
+	    break;
+
+	  if (desc[pos+1].type == XD_END)
+	    {
+	      mark_last_occured_object = 1;
+	      last_occured_object = stored_obj;
+	      break;
+	    }
+	  else
+	    {
+	      mark_object (*stored_obj);
+	    }
+	  
+	  
+	  break;
+	}
+      case XD_LISP_OBJECT_ARRAY:
+	{
+	  int i;
+	  EMACS_INT count = desc[pos].data1;
+	  if (XD_IS_INDIRECT (count))
+	    count = get_indirect_count (count, desc, lheader);
+	
+	  for (i = 0; i < count; i++)
+	    {
+	      const Lisp_Object *stored_obj = ((const Lisp_Object *)rdata) + i;
+
+	      if (EQ (*stored_obj, Qnull_pointer))
+		break;
+
+	      mark_object (*stored_obj);
+	    }
+	  break;
+	}
+      case XD_SPECIFIER_END:
+	desc = ((const Lisp_Specifier *)lheader)->methods->extra_description;
+	goto reprocess_desc;
+	break;
+      case XD_CODING_SYSTEM_END:
+	desc = ((const Lisp_Coding_System *)lheader)->methods->extra_description;
+	goto reprocess_desc;
+	break;
+      case XD_BYTECOUNT:
+	break;
+      case XD_ELEMCOUNT:
+	break;
+      case XD_HASHCODE:
+	break;
+      case XD_INT:
+	break;
+      case XD_LONG:
+	break;
+      case XD_INT_RESET:
+	break;
+      case XD_LO_LINK:
+	break;
+      case XD_OPAQUE_PTR:
+	break;
+      case XD_OPAQUE_DATA_PTR:
+	break;
+      case XD_C_STRING:
+	break;
+      case XD_DOC_STRING:
+	break;
+      case XD_STRUCT_PTR:
+	{
+	  EMACS_INT count = desc[pos].data1;
+	  const struct struct_description *sdesc = desc[pos].data2;
+	  const char *dobj = *(const char **)rdata;
+	  if (dobj)
+	    {
+	      if (XD_IS_INDIRECT (count))
+		count = get_indirect_count (count, desc, lheader);
+	      mark_struct_contents (dobj, sdesc, count);
+	    }
+	  break;
+	}
+      case XD_STRUCT_ARRAY:
+	{
+	  EMACS_INT count = desc[pos].data1;
+	  const struct struct_description *sdesc = desc[pos].data2;
+		      
+	  if (XD_IS_INDIRECT (count))
+	    count = get_indirect_count (count, desc, lheader);
+		      
+	  mark_struct_contents (rdata, sdesc, count);
+	  break;
+	}
+      case XD_UNION:
+	{
+	  int count = 0;
+	  int variant = desc[pos].data1;
+	  const struct struct_description *sdesc = desc[pos].data2;
+	  const char *dobj = *(const char **)rdata;
+	  if (XD_IS_INDIRECT (variant))
+	    variant = get_indirect_count (variant, desc, lheader);
+	  
+	  for (count=0; sdesc[count].size != XD_END; count++)
+	    {
+	      if (sdesc[count].size == variant)
+		{
+		  mark_with_description(dobj, sdesc[count].description);
+		  break;
+		}
+	    }
+	  break;
+	}
+		    
+      default:
+	stderr_out ("Unsupported description type : %d\n", desc[pos].type);
+	abort ();
+      }
+    }
+
+  if (mark_last_occured_object)
+    {
+      mark_object(*last_occured_object);
+      mark_last_occured_object = 0;
+    }
+}
+
+
+/* This function calculates the size of a described struct. */
+static Bytecount
+structure_size (const void *obj, const struct struct_description *sdesc)
+{
+  int max_offset = -1;
+  int max_offset_pos = -1;
+  int size_at_max = 0;
+  int pos;
+  const struct lrecord_description *desc;
+  void *rdata;
+
+  if (sdesc->size)
+    return sdesc->size;
+
+  desc = sdesc->description;
+
+  for (pos = 0; desc[pos].type != XD_END; pos++)
+    {
+      if (desc[pos].offset == max_offset)
+	{
+	  stderr_out ("Two relocatable elements at same offset?\n");
+	  abort ();
+	}
+      else if (desc[pos].offset > max_offset)
+	{
+	  max_offset = desc[pos].offset;
+	  max_offset_pos = pos;
+	}
+    }
+
+  if (max_offset_pos < 0)
+    return 0;
+
+  pos = max_offset_pos;
+  rdata = (char *) obj + desc[pos].offset;
+
+  switch (desc[pos].type)
+    {
+    case XD_LISP_OBJECT_ARRAY:
+      {
+	EMACS_INT val = desc[pos].data1;
+	if (XD_IS_INDIRECT (val))
+	  val = get_indirect_count (val, desc, obj);
+	size_at_max = val * sizeof (Lisp_Object);
+	break;
+      }
+    case XD_LISP_OBJECT:
+    case XD_LO_LINK:
+      size_at_max = sizeof (Lisp_Object);
+      break;
+    case XD_OPAQUE_PTR:
+      size_at_max = sizeof (void *);
+      break;
+    case XD_STRUCT_PTR:
+      {
+	EMACS_INT val = desc[pos].data1;
+	if (XD_IS_INDIRECT (val))
+	  val = get_indirect_count (val, desc, obj);
+	size_at_max = val * sizeof (void *);
+	break;
+      }
+      break;
+    case XD_STRUCT_ARRAY:
+      {
+	EMACS_INT val = desc[pos].data1;
+
+	if (XD_IS_INDIRECT (val))
+	  val = get_indirect_count (val, desc, obj);
+	    
+	size_at_max = val * structure_size (rdata, desc[pos].data2);
+	break;
+      }
+      break;
+    case XD_OPAQUE_DATA_PTR:
+      size_at_max = sizeof (void *);
+      break;
+    case XD_UNION:
+      abort ();
+      break;
+    case XD_C_STRING:
+      size_at_max = sizeof (void *);
+      break;
+    case XD_DOC_STRING:
+      size_at_max = sizeof (void *);
+      break;
+    case XD_INT_RESET:
+      size_at_max = sizeof (int);
+      break;
+    case XD_BYTECOUNT:
+      size_at_max = sizeof (Bytecount);
+      break;
+    case XD_ELEMCOUNT:
+      size_at_max = sizeof (Elemcount);
+      break;
+    case XD_HASHCODE:
+      size_at_max = sizeof (Hashcode);
+      break;
+    case XD_INT:
+      size_at_max = sizeof (int);
+      break;
+    case XD_LONG:
+      size_at_max = sizeof (long);
+      break;
+    case XD_SPECIFIER_END:
+    case XD_CODING_SYSTEM_END:
+      stderr_out
+	("Should not be seeing XD_SPECIFIER_END or\n"
+	 "XD_CODING_SYSTEM_END outside of struct Lisp_Specifier\n"
+	 "and struct Lisp_Coding_System.\n");
+      abort ();
+    default:
+      stderr_out ("Unsupported dump type : %d\n", desc[pos].type);
+      abort ();
+    }
+
+  return ALIGN_SIZE (max_offset + size_at_max, ALIGNOF (max_align_t));
+}
+
+
+/* This function loops all elements of a struct pointer and calls 
+   mark_with_description with each element. */
+static void
+mark_struct_contents (const void *data,
+				const struct struct_description *sdesc,
+				int count)
+{
+  int i;
+  Bytecount elsize;
+  elsize = structure_size (data, sdesc);
+
+  for (i = 0; i < count; i++)
+    {
+      mark_with_description (((char *) data) + elsize * i,
+					  sdesc->description);
+    }
+}
+
+#endif /* USE_KKCC */  
+
 /* Mark reference to a Lisp_Object.  If the object referred to has not been
    seen yet, recursively mark all the references contained in it. */
 
@@ -2680,6 +3190,10 @@
   if (XTYPE (obj) == Lisp_Type_Record)
     {
       struct lrecord_header *lheader = XRECORD_LHEADER (obj);
+#ifdef USE_KKCC
+      const struct lrecord_implementation *imp;
+      const struct lrecord_description *desc;
+#endif /* USE_KKCC */      
 
       GC_CHECK_LHEADER_INVARIANTS (lheader);
 
@@ -2692,11 +3206,30 @@
 	{
 	  MARK_RECORD_HEADER (lheader);
 
-	  if (RECORD_MARKER (lheader))
+#ifdef USE_KKCC
+	  imp = LHEADER_IMPLEMENTATION (lheader);
+	  desc = imp->description;
+	  
+	  if (desc) /* && !CONSP(obj))*/  /* KKCC cons special case */
+	    {
+	      mark_with_description (lheader, desc);
+	    }
+	  
+	  else 
 	    {
-	      obj = RECORD_MARKER (lheader) (obj);
-	      if (!NILP (obj)) goto tail_recurse;
+
+#endif /* USE_KKCC */
+
+
+	      if (RECORD_MARKER (lheader))
+		{
+		  obj = RECORD_MARKER (lheader) (obj);
+		  if (!NILP (obj)) goto tail_recurse;
+		}
+
+#ifdef USE_KKCC
 	    }
+#endif /* USE_KKCC */
 	}
     }
 }
@@ -3089,7 +3622,8 @@
 sweep_compiled_functions (void)
 {
 #define UNMARK_compiled_function(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
-#define ADDITIONAL_FREE_compiled_function(ptr)
+#define ADDITIONAL_FREE_compiled_function(ptr) \
+  if (ptr->args_in_array) xfree (ptr->args)
 
   SWEEP_FIXED_TYPE_BLOCK (compiled_function, Lisp_Compiled_Function);
 }
@@ -3133,7 +3667,92 @@
   SWEEP_FIXED_TYPE_BLOCK (event, Lisp_Event);
 }
 
+#ifdef USE_KKCC
+
+static void
+sweep_key_data (void)
+{
+#define UNMARK_key_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_key_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (key_data, Lisp_Key_Data);
+}
+
+static void
+sweep_button_data (void)
+{
+#define UNMARK_button_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_button_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (button_data, Lisp_Button_Data);
+}
+
+static void
+sweep_motion_data (void)
+{
+#define UNMARK_motion_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_motion_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (motion_data, Lisp_Motion_Data);
+}
+
+static void
+sweep_process_data (void)
+{
+#define UNMARK_process_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_process_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (process_data, Lisp_Process_Data);
+}
+
+static void
+sweep_timeout_data (void)
+{
+#define UNMARK_timeout_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_timeout_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (timeout_data, Lisp_Timeout_Data);
+}
+
 static void
+sweep_magic_data (void)
+{
+#define UNMARK_magic_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_magic_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (magic_data, Lisp_Magic_Data);
+}
+
+static void
+sweep_magic_eval_data (void)
+{
+#define UNMARK_magic_eval_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_magic_eval_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (magic_eval_data, Lisp_Magic_Eval_Data);
+}
+
+static void
+sweep_eval_data (void)
+{
+#define UNMARK_eval_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_eval_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (eval_data, Lisp_Eval_Data);
+}
+
+static void
+sweep_misc_user_data (void)
+{
+#define UNMARK_misc_user_data(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_misc_user_data(ptr)
+
+  SWEEP_FIXED_TYPE_BLOCK (misc_user_data, Lisp_Misc_User_Data);
+}
+
+#endif /* USE_KKCC */
+
+static void
 sweep_markers (void)
 {
 #define UNMARK_marker(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
@@ -3443,6 +4062,18 @@
 
   sweep_events ();
 
+#ifdef USE_KKCC
+  sweep_key_data ();
+  sweep_button_data ();
+  sweep_motion_data ();
+  sweep_process_data ();
+  sweep_timeout_data ();
+  sweep_magic_data ();
+  sweep_magic_eval_data ();
+  sweep_eval_data ();
+  sweep_misc_user_data ();
+#endif /* USE_KKCC */
+
 #ifdef PDUMP
   pdump_objects_unmark ();
 #endif
@@ -3880,7 +4511,6 @@
   Lisp_Object pl = Qnil;
   int i;
   int gc_count_vector_total_size = 0;
-
   garbage_collect_1 ();
 
   for (i = 0; i < lrecord_type_count; i++)
@@ -4229,6 +4859,17 @@
   init_marker_alloc ();
   init_extent_alloc ();
   init_event_alloc ();
+#ifdef USE_KKCC
+  init_key_data_alloc ();
+  init_button_data_alloc ();
+  init_motion_data_alloc ();
+  init_process_data_alloc ();
+  init_timeout_data_alloc ();
+  init_magic_data_alloc ();
+  init_magic_eval_data_alloc ();
+  init_eval_data_alloc ();
+  init_misc_user_data_alloc ();
+#endif /* USE_KKCC */
 
   ignore_malloc_warnings = 0;
 
Index: src/buffer.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/buffer.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- src/buffer.c	2002/06/20 21:18:21	1.60
+++ src/buffer.c	2002/07/29 09:21:14	1.61
@@ -277,9 +277,16 @@
 /* We do not need a finalize method to handle a buffer's children list
    because all buffers have `kill-buffer' applied to them before
    they disappear, and the children removal happens then. */
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("buffer", buffer,
+			       0, /*dumpable-flag*/
                                mark_buffer, print_buffer, 0, 0, 0, 0,
 			       struct buffer);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("buffer", buffer,
+                               mark_buffer, print_buffer, 0, 0, 0, 0,
+			       struct buffer);
+#endif /* not USE_KKCC */
 
 DEFUN ("bufferp", Fbufferp, 1, 1, 0, /*
 Return t if OBJECT is an editor buffer.
@@ -2073,7 +2080,6 @@
       = intern (lname);							      \
   }									      \
 } while (0)
-
 #define DEFVAR_BUFFER_LOCAL_MAGIC(lname, field_name, magicfun)		\
 	DEFVAR_BUFFER_LOCAL_1 (lname, field_name,			\
 			       SYMVAL_CURRENT_BUFFER_FORWARD, magicfun)
Index: src/bytecode.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/bytecode.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- src/bytecode.c	2002/06/20 21:18:21	1.28
+++ src/bytecode.c	2002/07/29 09:21:15	1.29
@@ -1959,13 +1959,24 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("compiled-function", compiled_function,
+				     1, /*dumpable_flag*/
 				     mark_compiled_function,
 				     print_compiled_function, 0,
 				     compiled_function_equal,
 				     compiled_function_hash,
 				     compiled_function_description,
 				     Lisp_Compiled_Function);
+#else /* not USE_KKCC */
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("compiled-function", compiled_function,
+				     mark_compiled_function,
+				     print_compiled_function, 0,
+				     compiled_function_equal,
+				     compiled_function_hash,
+				     compiled_function_description,
+				     Lisp_Compiled_Function);
+#endif /* not USE_KKCC */
 
 DEFUN ("compiled-function-p", Fcompiled_function_p, 1, 1, 0, /*
 Return t if OBJECT is a byte-compiled function object.
Index: src/callint.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/callint.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- src/callint.c	2002/06/20 21:18:21	1.25
+++ src/callint.c	2002/08/22 11:31:41	1.26
@@ -369,8 +369,9 @@
 
       if (EQ (funcar, Qautoload))
 	{
-	  struct gcpro gcpro1, gcpro2;
-	  GCPRO2 (function, prefix);
+	  struct gcpro gcpro1;
+	  GCPRO1 (prefix);
+	  /* do_autoload GCPROs both arguments */
 	  do_autoload (fun, function);
 	  UNGCPRO;
 	  goto retry;
Index: src/casetab.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/casetab.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- src/casetab.c	2002/06/05 09:55:00	1.12
+++ src/casetab.c	2002/07/29 09:21:15	1.13
@@ -105,9 +105,17 @@
   { XD_END }
 };
 
+
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION("case-table", case_table,
+			      1, /*dumpable-flag*/
+			      mark_case_table, print_case_table, 0,
+			      0, 0, case_table_description, Lisp_Case_Table);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("case-table", case_table,
 			      mark_case_table, print_case_table, 0,
 			      0, 0, case_table_description, Lisp_Case_Table);
+#endif /* not USE_KKCC */
 
 static Lisp_Object
 allocate_case_table (int init_tables)
Index: src/chartab.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/chartab.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- src/chartab.c	2002/06/05 09:55:01	1.26
+++ src/chartab.c	2002/07/29 09:21:15	1.27
@@ -138,12 +138,23 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("char-table-entry", char_table_entry,
+			       1, /* dumpable flag */
                                mark_char_table_entry, internal_object_printer,
 			       0, char_table_entry_equal,
 			       char_table_entry_hash,
 			       char_table_entry_description,
 			       Lisp_Char_Table_Entry);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("char-table-entry", char_table_entry,
+                               mark_char_table_entry, internal_object_printer,
+			       0, char_table_entry_equal,
+			       char_table_entry_hash,
+			       char_table_entry_description,
+			       Lisp_Char_Table_Entry);
+#endif /* not USE_KKCC */
+
 #endif /* MULE */
 
 static Lisp_Object
@@ -389,11 +400,20 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("char-table", char_table,
+			       1, /*dumpable-flag*/
+                               mark_char_table, print_char_table, 0,
+			       char_table_equal, char_table_hash,
+			       char_table_description,
+			       Lisp_Char_Table);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("char-table", char_table,
                                mark_char_table, print_char_table, 0,
 			       char_table_equal, char_table_hash,
 			       char_table_description,
 			       Lisp_Char_Table);
+#endif /* not USE_KKCC */
 
 DEFUN ("char-table-p", Fchar_table_p, 1, 1, 0, /*
 Return non-nil if OBJECT is a char table.
Index: src/config.h.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/config.h.in,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- src/config.h.in	2002/07/16 08:27:11	1.76
+++ src/config.h.in	2002/08/28 05:36:34	1.77
@@ -94,6 +94,7 @@
 #undef EMACS_BETA_VERSION
 #undef EMACS_VERSION
 #undef XEMACS_CODENAME
+#undef XEMACS_EXTRA_NAME
 /* InfoDock versions, not used with XEmacs */
 #undef INFODOCK_MAJOR_VERSION
 #undef INFODOCK_MINOR_VERSION
Index: src/console-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-impl.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- src/console-impl.h	2002/07/06 21:05:52	1.2
+++ src/console-impl.h	2002/07/29 09:21:15	1.3
@@ -407,6 +407,10 @@
   /* Description of this console's methods.  */
   struct console_methods *conmeths;
 
+#ifdef USE_KKCC
+  enum console_variant contype;
+#endif /* USE_KKCC */  
+
   /* A structure of auxiliary data specific to the console type.
      struct x_console is used for X window frames; defined in console-x.h
      struct tty_console is used to TTY's; defined in console-tty.h */
Index: src/console.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- src/console.c	2002/06/20 21:18:24	1.30
+++ src/console.c	2002/07/29 09:21:15	1.31
@@ -105,6 +105,70 @@
 console_type_entry_dynarr *the_console_type_entry_dynarr;
 
 
+
+#ifdef USE_KKCC
+
+static const struct lrecord_description empty_condata_description [] = {
+  { XD_END }
+};
+
+static const struct lrecord_description tty_condata_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct tty_console, terminal_type) },
+  { XD_LISP_OBJECT, offsetof (struct tty_console, instream) },
+  { XD_LISP_OBJECT, offsetof (struct tty_console, outstream) },
+  { XD_END }
+};
+
+static const struct struct_description condata_description []= {
+  { dead_console, empty_condata_description },
+  { tty_console, tty_condata_description },
+  { gtk_console, empty_condata_description },
+  { x_console, empty_condata_description },
+  { mswindows_console, empty_condata_description },
+  { stream_console, empty_condata_description },
+  { XD_END }
+};
+
+static const struct lrecord_description conmeths_description_1 [] = {
+  { XD_LISP_OBJECT, offsetof (struct console_methods, symbol) },
+  /*{ XD_LISP_OBJECT, offsetof (struct console_methods, predicate_symbol) },
+    { XD_LISP_OBJECT, offsetof (struct console_methods, image_conversion_list) },*/
+  { XD_END }
+};
+
+static const struct struct_description conmeths_description = {
+  sizeof (struct console_methods),
+  conmeths_description_1
+};
+
+static const struct lrecord_description console_description [] = {
+  { XD_INT, offsetof (struct console, contype) },
+  { XD_LISP_OBJECT, offsetof (struct console, name) },
+  { XD_LISP_OBJECT, offsetof (struct console, connection) },
+  { XD_LISP_OBJECT, offsetof (struct console, canon_connection) },
+  { XD_LISP_OBJECT, offsetof (struct console, device_list) },
+  { XD_LISP_OBJECT, offsetof (struct console, selected_device) },
+  { XD_LISP_OBJECT, offsetof (struct console, last_nonminibuf_frame) },
+  { XD_LISP_OBJECT, offsetof (struct console, overriding_terminal_local_map) },
+  { XD_LISP_OBJECT, offsetof (struct console, last_command) },
+  { XD_LISP_OBJECT, offsetof (struct console, prefix_arg) },
+  { XD_LISP_OBJECT, offsetof (struct console, command_builder) },
+  { XD_LISP_OBJECT, offsetof (struct console, defining_kbd_macro) },
+  { XD_LISP_OBJECT, offsetof (struct console, kbd_macro_builder) },
+  { XD_LISP_OBJECT, offsetof (struct console, last_kbd_macro) },
+#ifdef HAVE_TTY
+  { XD_LISP_OBJECT, offsetof (struct console, tty_erase_char) },
+#endif
+  { XD_LISP_OBJECT, offsetof (struct console, default_minibuffer_frame) },
+  { XD_LISP_OBJECT, offsetof (struct console, function_key_map) },
+  { XD_STRUCT_PTR, offsetof (struct console, conmeths), 1, &conmeths_description },
+  { XD_UNION, offsetof (struct console, console_data), 
+    XD_INDIRECT (0, 0), condata_description },
+  { XD_END }
+};
+
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_console (Lisp_Object obj)
 {
@@ -140,9 +204,17 @@
   write_fmt_string (printcharfun, " 0x%x>", con->header.uid);
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("console", console,
+			       0, /*dumpable-flag*/
+			       mark_console, print_console, 0, 0, 0, 
+			       console_description,
+			       struct console);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("console", console,
 			       mark_console, print_console, 0, 0, 0, 0,
 			       struct console);
+#endif /* not USE_KKCC */
 
 static struct console *
 allocate_console (void)
@@ -191,6 +263,40 @@
   return 0;
 }
 
+#ifdef USE_KKCC
+enum console_variant
+get_console_variant (Lisp_Object type)
+{
+  if (EQ (type, Qtty)) 
+    {
+      return tty_console;
+    }
+
+  if (EQ (type, Qgtk)) 
+    {
+      return gtk_console;
+    }
+
+  if (EQ (type, Qx)) 
+    {
+      return x_console;
+    }
+
+  if (EQ (type, Qmswindows)) 
+    {
+      return mswindows_console;
+    }
+
+  if (EQ (type, Qstream)) 
+    {
+      return stream_console;
+    }
+
+  abort (); /* should never happen */
+  return dead_console; 
+}
+#endif /* USE_KKCC */
+
 int
 valid_console_type_p (Lisp_Object type)
 {
@@ -493,6 +599,9 @@
   GCPRO1 (console);
 
   con->conmeths = decode_console_type (type, ERROR_ME);
+#ifdef USE_KKCC
+  con->contype = get_console_variant (type);
+#endif /* USE_KKCC */
 
   CONSOLE_NAME (con) = name;
   CONSOLE_CONNECTION (con) =
Index: src/console.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- src/console.h	2002/06/22 17:14:45	1.38
+++ src/console.h	2002/07/29 09:21:15	1.39
@@ -46,6 +46,19 @@
 /* GCC does not like forward enum declaration. This needs to be
    defined here. What a disgust! */
 
+#ifdef USE_KKCC
+enum console_variant
+{
+  dead_console,
+  tty_console,
+  gtk_console,
+  x_console,
+  mswindows_console,
+  stream_console
+};
+
+#endif /* USE_KKCC */
+
 enum device_metrics
 {
   DM_color_default, DM_color_select, DM_color_balloon, DM_color_3d_face,
@@ -120,6 +133,11 @@
 				     struct console_methods *type);
 struct console_methods *decode_console_type (Lisp_Object type,
 					     Error_Behavior errb);
+
+#ifdef USE_KKCC
+enum console_variant get_console_variant (Lisp_Object type);
+#endif /* USE_KKCC */
+
 void delete_console_internal (struct console *con, int force,
 			      int from_kill_emacs, int from_io_error);
 void io_error_delete_console (Lisp_Object console);
Index: src/data.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/data.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- src/data.c	2002/06/28 14:24:07	1.41
+++ src/data.c	2002/07/29 09:21:15	1.42
@@ -1635,11 +1635,20 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("weak-list", weak_list,
+			       1, /*dumpable-flag*/
 			       mark_weak_list, print_weak_list,
 			       0, weak_list_equal, weak_list_hash,
 			       weak_list_description,
 			       struct weak_list);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("weak-list", weak_list,
+			       mark_weak_list, print_weak_list,
+			       0, weak_list_equal, weak_list_hash,
+			       weak_list_description,
+			       struct weak_list);
+#endif /* not USE_KKCC */
 /*
    -- we do not mark the list elements (either the elements themselves
       or the cons cells that hold them) in the normal marking phase.
@@ -2096,11 +2105,20 @@
   { XD_END}
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("weak_box", weak_box,
+			       0, /*dumpable-flag*/
 			       mark_weak_box, print_weak_box,
 			       0, weak_box_equal, weak_box_hash,
 			       weak_box_description,
 			       struct weak_box);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("weak_box", weak_box,
+			       mark_weak_box, print_weak_box,
+			       0, weak_box_equal, weak_box_hash,
+			       weak_box_description,
+			       struct weak_box);
+#endif /* not USE_KKCC */
 
 DEFUN ("make-weak-box", Fmake_weak_box, 1, 1, 0, /*
 Return a new weak box from value CONTENTS.
@@ -2275,11 +2293,20 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("ephemeron", ephemeron,
+			       0, /*dumpable-flag*/
+			       mark_ephemeron, print_ephemeron,
+			       0, ephemeron_equal, ephemeron_hash,
+			       ephemeron_description,
+			       struct ephemeron);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("ephemeron", ephemeron,
 			       mark_ephemeron, print_ephemeron,
 			       0, ephemeron_equal, ephemeron_hash,
 			       ephemeron_description,
 			       struct ephemeron);
+#endif /* not USE_KKCC */
 
 DEFUN ("make-ephemeron", Fmake_ephemeron, 2, 3, 0, /*
 Return a new ephemeron with key KEY, value CONTENTS, and finalizer FINALIZER.
Index: src/database.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/database.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- src/database.c	2002/03/29 04:47:07	1.22
+++ src/database.c	2002/07/29 09:21:16	1.23
@@ -139,6 +139,13 @@
   return db;
 }
 
+#ifdef USE_KKCC
+static const struct lrecord_description database_description[] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Database, fname) },
+  { XD_END}
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_database (Lisp_Object object)
 {
@@ -179,10 +186,19 @@
   db->funcs->close (db);
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("database", database,
+			       0, /*dumpable-flag*/
+                               mark_database, print_database,
+			       finalize_database, 0, 0, 
+			       database_description,
+			       Lisp_Database);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("database", database,
                                mark_database, print_database,
 			       finalize_database, 0, 0, 0,
 			       Lisp_Database);
+#endif /* not USE_KKCC */
 
 DEFUN ("close-database", Fclose_database, 1, 1, 0, /*
 Close database DATABASE.
Index: src/device-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-impl.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- src/device-impl.h	2002/07/06 21:05:52	1.2
+++ src/device-impl.h	2002/07/29 09:21:16	1.3
@@ -77,6 +77,10 @@
      through device->console, but it's faster this way. */
   struct console_methods *devmeths;
 
+#ifdef USE_KKCC
+  enum console_variant devtype;
+#endif /* USE_KKCC */  
+
   /* A structure of auxiliary data specific to the device type.
      struct x_device is used for X window frames; defined in console-x.h
      struct tty_device is used to TTY's; defined in console-tty.h */
Index: src/device-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-msw.c,v
retrieving revision 1.47
retrieving revision 1.49
diff -u -r1.47 -r1.49
--- src/device-msw.c	2002/07/06 05:48:21	1.47
+++ src/device-msw.c	2002/08/16 08:15:33	1.49
@@ -1074,6 +1074,14 @@
 /*                                devmode                               */
 /************************************************************************/
 
+#ifdef USE_KKCC
+static const struct lrecord_description devmode_description[] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Devmode, printer_name) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Devmode, device) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_devmode (Lisp_Object obj)
 {
@@ -1143,10 +1151,20 @@
 		internal_hash (dm->printer_name, depth + 1));
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("msprinter-settings", devmode,
+			       0, /*dumpable-flag*/
 			       mark_devmode, print_devmode, finalize_devmode,
+			       equal_devmode, hash_devmode, 
+			       devmode_description,
+			       Lisp_Devmode);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("msprinter-settings", devmode,
+			       mark_devmode, print_devmode, finalize_devmode,
 			       equal_devmode, hash_devmode, 0/*description*/,
 			       Lisp_Devmode);
+#endif /* not USE_KKCC */
+
 static Lisp_Object
 allocate_devmode (DEVMODEW* src_devmode, int do_copy,
 		  Lisp_Object src_name, struct device *d)
Index: src/device.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- src/device.c	2002/06/20 21:18:26	1.26
+++ src/device.c	2002/07/29 09:21:16	1.27
@@ -45,6 +45,19 @@
 #include "toolbar.h"
 #include "window.h"
 
+#ifdef USE_KKCC
+#include "console-tty-impl.h"
+#ifdef HAVE_MS_WINDOWS
+#include "console-msw-impl.h"
+#endif
+#ifdef HAVE_X_WINDOWS
+#include "console-x-impl.h"
+#endif
+#ifdef HAVE_GTK
+#include "console-gtk-impl.h"
+#endif
+#endif /* USE_KKCC */
+
 #ifdef HAVE_SCROLLBARS
 #include "scrollbar.h"
 #endif
@@ -84,6 +97,84 @@
 Lisp_Object Vdevice_class_list;
 
 
+
+#ifdef USE_KKCC
+
+static const struct lrecord_description empty_devdata_description [] = {
+  { XD_END }
+};
+
+static const struct lrecord_description mswindows_devdata_description [] = {
+#ifdef HAVE_MS_WINDOWS
+  { XD_LISP_OBJECT, offsetof (struct mswindows_device, fontlist) },
+#endif
+  { XD_END }
+};
+
+static const struct lrecord_description gtk_devdata_description [] = {
+#ifdef HAVE_GTK
+  { XD_LISP_OBJECT, offsetof (struct gtk_device, x_keysym_map_hash_table) },
+  { XD_LISP_OBJECT, offsetof (struct gtk_device, WM_COMMAND_frame) },
+#endif
+  { XD_END }
+};
+
+static const struct lrecord_description x_devdata_description [] = {
+#ifdef HAVE_X_WINDOWS
+  { XD_LISP_OBJECT, offsetof (struct x_device, x_keysym_map_hash_table) },
+  { XD_LISP_OBJECT, offsetof (struct x_device, WM_COMMAND_frame) },
+#endif
+  { XD_END }
+};
+
+static const struct struct_description devdata_description []= {
+  { dead_console, empty_devdata_description},
+  { tty_console, empty_devdata_description},
+  { gtk_console, gtk_devdata_description},
+  { x_console, x_devdata_description},
+  { mswindows_console, mswindows_devdata_description},
+  { stream_console, empty_devdata_description},
+  { XD_END }
+};
+
+static const struct lrecord_description conmeths_description_1 [] = {
+  { XD_LISP_OBJECT, offsetof (struct console_methods, symbol) },
+  { XD_END }
+};
+
+static const struct struct_description conmeths_description = {
+  sizeof (struct console_methods),
+  conmeths_description_1
+};
+
+static const struct lrecord_description device_description [] = {
+  { XD_INT, offsetof (struct device, devtype) },
+  { XD_LISP_OBJECT, offsetof (struct device, name) },
+  { XD_LISP_OBJECT, offsetof (struct device, connection) },
+  { XD_LISP_OBJECT, offsetof (struct device, canon_connection) },
+  { XD_LISP_OBJECT, offsetof (struct device, frame_list) },
+  { XD_LISP_OBJECT, offsetof (struct device, console) },
+  { XD_LISP_OBJECT, offsetof (struct device, selected_frame) },
+  { XD_LISP_OBJECT, offsetof (struct device, frame_with_focus_real) },
+  { XD_LISP_OBJECT, offsetof (struct device, frame_with_focus_for_hooks) },
+  { XD_LISP_OBJECT, offsetof (struct device, frame_that_ought_to_have_focus) },
+  { XD_LISP_OBJECT, offsetof (struct device, device_class) },
+  { XD_LISP_OBJECT, offsetof (struct device, user_defined_tags) },
+  { XD_LISP_OBJECT, offsetof (struct device, color_instance_cache) },
+  { XD_LISP_OBJECT, offsetof (struct device, font_instance_cache) },
+#ifdef MULE
+  { XD_LISP_OBJECT, offsetof (struct device, charset_font_cache_stage_1) },
+  { XD_LISP_OBJECT, offsetof (struct device, charset_font_cache_stage_2) },
+#endif
+  { XD_LISP_OBJECT, offsetof (struct device, image_instance_cache) },
+  { XD_LISP_OBJECT, offsetof (struct device, frame_list) },
+  { XD_STRUCT_PTR, offsetof (struct device, devmeths), 1, &conmeths_description },
+  { XD_UNION, offsetof (struct device, device_data), 
+    XD_INDIRECT (0, 0), devdata_description },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_device (Lisp_Object obj)
 {
@@ -117,9 +208,17 @@
   write_fmt_string (printcharfun, " 0x%x>", d->header.uid);
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("device", device,
+			       0, /*dumpable-flag*/
+			       mark_device, print_device, 0, 0, 0, 
+			       device_description,
+			       struct device);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("device", device,
 			       mark_device, print_device, 0, 0, 0, 0,
 			       struct device);
+#endif /* not USE_KKCC */
 
 int
 valid_device_class_p (Lisp_Object class)
@@ -603,6 +702,9 @@
   device = wrap_device (d);
 
   d->devmeths = con->conmeths;
+#ifdef USE_KKCC
+  d->devtype = get_console_variant (type);
+#endif /* USE_KKCC */
 
   DEVICE_NAME (d) = name;
   DEVICE_CONNECTION (d) =
Index: src/dialog-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dialog-msw.c,v
retrieving revision 1.22
retrieving revision 1.24
diff -u -r1.22 -r1.24
--- src/dialog-msw.c	2002/06/20 21:18:26	1.22
+++ src/dialog-msw.c	2002/08/16 08:15:35	1.24
@@ -169,6 +169,14 @@
   return 0;
 }
 
+#ifdef USE_KKCC
+static const struct lrecord_description mswindows_dialog_id_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct mswindows_dialog_id, frame) },
+  { XD_LISP_OBJECT, offsetof (struct mswindows_dialog_id, callbacks) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_mswindows_dialog_id (Lisp_Object obj)
 {
@@ -177,10 +185,19 @@
   return data->callbacks;
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("mswindows-dialog-id", mswindows_dialog_id,
+			       0, /* dump-able flag */
+			       mark_mswindows_dialog_id,
+			       internal_object_printer, 0, 0, 0, 
+			       mswindows_dialog_id_description,
+			       struct mswindows_dialog_id);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("mswindows-dialog-id", mswindows_dialog_id,
 			       mark_mswindows_dialog_id,
 			       internal_object_printer, 0, 0, 0, 0,
 			       struct mswindows_dialog_id);
+#endif /* not USE_KKCC */
 
 /* Dialog procedure */
 static BOOL CALLBACK 
Index: src/dumper.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dumper.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- src/dumper.c	2002/05/05 11:31:02	1.11
+++ src/dumper.c	2002/07/29 09:21:17	1.12
@@ -591,7 +591,12 @@
 
   imp = LHEADER_IMPLEMENTATION (objh);
 
+#ifdef USE_KKCC
+  if (imp->description
+      && RECORD_DUMPABLE(objh))
+#else /* not USE_KKCC */
   if (imp->description)
+#endif /* not USE_KKCC */    
     {
       int me = depth++;
       if (me > 65536)
Index: src/eldap.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/eldap.c,v
retrieving revision 1.28
retrieving revision 1.30
diff -u -r1.28 -r1.30
--- src/eldap.c	2002/06/23 09:54:41	1.28
+++ src/eldap.c	2002/08/01 08:33:11	1.30
@@ -98,6 +98,13 @@
   return wrap_ldap (ldap);
 }
 
+#ifdef USE_KKCC
+static const struct lrecord_description ldap_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_LDAP, host) },
+  { XD_END }
+};
+#endif USE_KKCC
+
 static Lisp_Object
 mark_ldap (Lisp_Object obj)
 {
@@ -142,10 +149,16 @@
   ldap->ld = NULL;
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("ldap", ldap,
+			       0, /*dumpable-flag*/
+                               mark_ldap, print_ldap, finalize_ldap,
+                               NULL, NULL, ldap_description, Lisp_LDAP);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("ldap", ldap,
                                mark_ldap, print_ldap, finalize_ldap,
                                NULL, NULL, 0, Lisp_LDAP);
-
+#endif /* not USE_KKCC */
 
 
 
Index: src/elhash.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/elhash.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- src/elhash.c	2002/05/05 11:31:04	1.28
+++ src/elhash.c	2002/07/29 09:21:17	1.29
@@ -429,12 +429,22 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table,
+			       1, /*dumpable-flag*/
                                mark_hash_table, print_hash_table,
 			       finalize_hash_table,
 			       hash_table_equal, hash_table_hash,
 			       hash_table_description,
 			       Lisp_Hash_Table);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table,
+                               mark_hash_table, print_hash_table,
+			       finalize_hash_table,
+			       hash_table_equal, hash_table_hash,
+			       hash_table_description,
+			       Lisp_Hash_Table);
+#endif /* not USE_KKCC */
 
 static Lisp_Hash_Table *
 xhash_table (Lisp_Object hash_table)
Index: src/emacs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emacs.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -r1.127 -r1.128
--- src/emacs.c	2002/07/09 11:55:35	1.127
+++ src/emacs.c	2002/08/28 05:36:34	1.128
@@ -324,6 +324,7 @@
 Lisp_Object Vemacs_patch_level;
 Lisp_Object Vemacs_beta_version;
 Lisp_Object Vxemacs_codename;
+Lisp_Object Vxemacs_extra_name;
 #ifdef INFODOCK
 Lisp_Object Vinfodock_major_version;
 Lisp_Object Vinfodock_minor_version;
@@ -3856,6 +3857,16 @@
 #endif
   Vxemacs_codename = build_string (XEMACS_CODENAME);
 
+  DEFVAR_LISP ("xemacs-extra-name", &Vxemacs_extra_name /*
+Extra string to maybe put into the version string.
+
+Usually used to denote an XEmacs built from a CVS checkout between
+releases.  In that case its value would be \"(+CVS)\".
+*/ );
+#ifdef XEMACS_EXTRA_NAME
+  Vxemacs_extra_name = build_string (XEMACS_EXTRA_NAME);
+#endif
+  
   /* Lisp variables which contain command line flags.
 
      The portable dumper stomps on these; they must be saved and restored
Index: src/eval.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/eval.c,v
retrieving revision 1.59
retrieving revision 1.61
diff -u -r1.59 -r1.61
--- src/eval.c	2002/07/23 08:35:10	1.59
+++ src/eval.c	2002/08/22 11:31:39	1.61
@@ -440,10 +440,18 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("subr", subr,
+				     1, /*dumpable-flag*/
 				     0, print_subr, 0, 0, 0,
 				     subr_description,
 				     Lisp_Subr);
+#else /* not USE_KKCC */
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("subr", subr,
+				     0, print_subr, 0, 0, 0,
+				     subr_description,
+				     Lisp_Subr);
+#endif /* not USE_KKCC */
 
 /************************************************************************/
 /*			 Entering the debugger				*/
@@ -1395,6 +1403,7 @@
 	      if (EQ (tem, Qt) || EQ (tem, Qmacro))
 		{
 		  /* Yes, load it and try again.  */
+		  /* do_autoload GCPROs both arguments */
 		  do_autoload (def, sym);
 		  continue;
 		}
@@ -3028,7 +3037,10 @@
     {
       final = indirect_function (cmd, 1);
       if (CONSP (final) && EQ (Fcar (final), Qautoload))
-	do_autoload (final, cmd);
+	{
+	  /* do_autoload GCPROs both arguments */
+	  do_autoload (final, cmd);
+	}
       else
 	break;
     }
@@ -3204,6 +3216,7 @@
   return Qnil;
 }
 
+/* do_autoload GCPROs both arguments */
 void
 do_autoload (Lisp_Object fundef,
              Lisp_Object funname)
@@ -3211,10 +3224,10 @@
   /* This function can GC */
   int speccount = specpdl_depth();
   Lisp_Object fun = funname;
-  struct gcpro gcpro1, gcpro2;
+  struct gcpro gcpro1, gcpro2, gcpro3;
 
   CHECK_SYMBOL (funname);
-  GCPRO2 (fun, funname);
+  GCPRO3 (fundef, funname, fun);
 
   /* Value saved here is to be restored into Vautoload_queue */
   record_unwind_protect (un_autoload, Vautoload_queue);
@@ -3602,6 +3615,7 @@
 
       if (EQ (funcar, Qautoload))
 	{
+	  /* do_autoload GCPROs both arguments */
 	  do_autoload (fun, original_fun);
 	  goto retry;
 	}
@@ -3794,6 +3808,7 @@
 	}
       else if (EQ (funcar, Qautoload))
 	{
+	  /* do_autoload GCPROs both arguments */
 	  do_autoload (fun, args[0]);
 	  goto retry;
 	}
@@ -3884,11 +3899,8 @@
 	}
       else if (EQ (funcar, Qautoload))
 	{
-	  struct gcpro gcpro1;
-
-	  GCPRO1 (function);
+	  /* do_autoload GCPROs both arguments */
 	  do_autoload (function, orig_function);
-	  UNGCPRO;
 	  function = orig_function;
 	  goto retry;
 	}
Index: src/event-Xt.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-Xt.c,v
retrieving revision 1.64
retrieving revision 1.68
diff -u -r1.64 -r1.68
--- src/event-Xt.c	2002/06/20 21:18:28	1.64
+++ src/event-Xt.c	2002/08/22 11:34:20	1.68
@@ -311,9 +311,11 @@
     {
       extern Lisp_Object Vcurrent_global_map;
       extern Lisp_Object Qascii_character;
-      Fput (symbol, Qascii_character, character);
-      if (NILP (Flookup_key (Vcurrent_global_map, symbol, Qnil)))
-	Fdefine_key (Vcurrent_global_map, symbol, Qself_insert_command);
+      if (NILP (Flookup_key (Vcurrent_global_map, symbol, Qnil))) 
+        {
+	  Fput (symbol, Qascii_character, character);
+	  Fdefine_key (Vcurrent_global_map, symbol, Qself_insert_command); 
+        }
     }
 }
 
@@ -1070,10 +1072,16 @@
             Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
 	    Lisp_Event *ev          = XEVENT (emacs_event);
             ev->channel	            = DEVICE_CONSOLE (d);
-            ev->event_type	    = key_press_event;
             ev->timestamp	    = event->time;
+            ev->event_type	    = key_press_event;
+#ifdef USE_KKCC
+	    XSET_EVENT_TYPE (emacs_event, key_press_event);
+	    XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (emacs_event), 0);
+	    XSET_KEY_DATA_KEYSYM (XEVENT_DATA (emacs_event), make_char (ch));
+#else
             ev->event.key.modifiers = 0;
             ev->event.key.keysym    = make_char (ch);
+#endif
             enqueue_Xt_dispatch_event (emacs_event);
           }
 	Lstream_close (istr);
@@ -1130,9 +1138,10 @@
   switch (x_event->type)
     {
     case KeyRelease:
-      x_handle_sticky_modifiers (x_event, d);
-      return 0;
-
+      {
+	x_handle_sticky_modifiers (x_event, d);
+	return 0;
+      }
     case KeyPress:
     case ButtonPress:
     case ButtonRelease:
@@ -1208,7 +1217,11 @@
 	    XKeyEvent *ev = &x_event->xkey;
 	    /* This used to compute the frame from the given X window and
 	       store it here, but we really don't care about the frame. */
+#ifdef USE_KKCC
+	    SET_EVENT_CHANNEL (emacs_event, DEVICE_CONSOLE (d));
+#else /* not USE_KKCC */
 	    emacs_event->channel = DEVICE_CONSOLE (d);
+#endif /* not USE_KKCC */
 	    keysym = x_to_emacs_keysym (&x_event->xkey, 0);
 
 	    /* If the emacs keysym is nil, then that means that the X
@@ -1252,10 +1265,17 @@
 		if (top && bot && top != bot)
 		  modifiers &= ~XEMACS_MOD_SHIFT;
 	      }
+#ifdef USE_KKCC
+	    set_event_type (emacs_event, key_press_event);
+	    SET_EVENT_TIMESTAMP (emacs_event, ev->time);
+	    XSET_KEY_DATA_MODIFIERS (EVENT_DATA (emacs_event), modifiers);
+	    XSET_KEY_DATA_KEYSYM (EVENT_DATA (emacs_event), keysym);
+#else /* not USE_KKCC */
 	    emacs_event->event_type	     = key_press_event;
 	    emacs_event->timestamp	     = ev->time;
 	    emacs_event->event.key.modifiers = modifiers;
 	    emacs_event->event.key.keysym    = keysym;
+#endif /* not USE_KKCC */
 	  }
 	else                    /* Mouse press/release event */
 	  {
@@ -1264,8 +1284,18 @@
 
 	    if (! frame)
 	      return 0;	/* not for us */
+#ifdef USE_KKCC
+	    set_event_type (emacs_event, (x_event->type == ButtonPress) ?
+                        button_press_event : button_release_event);
+            SET_EVENT_CHANNEL (emacs_event, wrap_frame(frame));
+
+	    XSET_BUTTON_DATA_MODIFIERS (EVENT_DATA (emacs_event), modifiers);
+	    SET_EVENT_TIMESTAMP (emacs_event, ev->time);
+	    XSET_BUTTON_DATA_BUTTON (EVENT_DATA (emacs_event), ev->button);
+	    XSET_BUTTON_DATA_X (EVENT_DATA (emacs_event), ev->x);
+	    XSET_BUTTON_DATA_Y (EVENT_DATA (emacs_event), ev->y);
+#else /* not USE_KKCC */
 	    emacs_event->channel = wrap_frame (frame);
-
 	    emacs_event->event_type = (x_event->type == ButtonPress) ?
 	      button_press_event : button_release_event;
 
@@ -1274,6 +1304,7 @@
 	    emacs_event->event.button.button	= ev->button;
 	    emacs_event->event.button.x		= ev->x;
 	    emacs_event->event.button.y		= ev->y;
+#endif /* not USE_KKCC */
 	    /* because we don't seem to get a FocusIn event for button clicks
 	       when a widget-glyph is selected we will assume that we want the
 	       focus if a button gets pressed. */
@@ -1310,12 +1341,19 @@
           ev = &event2; /* only one structure copy */
 
         DEVICE_X_MOUSE_TIMESTAMP (d) = ev->time;
-
+#ifdef USE_KKCC
+        SET_EVENT_CHANNEL (emacs_event, wrap_frame(frame));
+        set_event_type (emacs_event, pointer_motion_event);
+        SET_EVENT_TIMESTAMP (emacs_event, ev->time);
+        XSET_MOTION_DATA_X (EVENT_DATA (emacs_event), ev->x);
+        XSET_MOTION_DATA_Y (EVENT_DATA (emacs_event), ev->y);
+#else /* not USE_KKCC */
         emacs_event->channel = wrap_frame (frame);
         emacs_event->event_type	    = pointer_motion_event;
         emacs_event->timestamp      = ev->time;
         emacs_event->event.motion.x = ev->x;
         emacs_event->event.motion.y = ev->y;
+#endif /* not USE_KKCC */
         if (ev->state & ShiftMask)	modifiers |= XEMACS_MOD_SHIFT;
         if (ev->state & ControlMask)	modifiers |= XEMACS_MOD_CONTROL;
         if (ev->state & xd->MetaMask)	modifiers |= XEMACS_MOD_META;
@@ -1329,7 +1367,11 @@
         if (ev->state & Button5Mask)	modifiers |= XEMACS_MOD_BUTTON5;
         /* Currently ignores Shift_Lock but probably shouldn't
            (but it definitely should ignore Caps_Lock). */
+#ifdef USE_KKCC
+        XSET_MOTION_DATA_MODIFIERS (EVENT_DATA (emacs_event), modifiers);
+#else /* not USE_KKCC */
         emacs_event->event.motion.modifiers = modifiers;
+#endif /* not USE_KKCC */
       }
     break;
 
@@ -1356,11 +1398,15 @@
 	      return 0;	/* not for us */
 
 	    GCPRO4 (l_type, l_data, l_dndlist, l_item);
+#ifdef USE_KKCC
+	    set_event_type (emacs_event, misc_user_event);
+	    SET_EVENT_CHANNEL (emacs_event, wrap_frame(frame));
+	    SET_EVENT_TIMESTAMP (emacs_event, DEVICE_X_LAST_SERVER_TIMESTAMP (d));
+#else /* not USE_KKCC */
 	    emacs_event->channel = wrap_frame (frame);
-
 	    emacs_event->event_type = misc_user_event;
 	    emacs_event->timestamp  = DEVICE_X_LAST_SERVER_TIMESTAMP (d);
-
+#endif /* not USE_KKCC */
 	    state=DndDragButtons(x_event);
 
 	    if (state & ShiftMask)	modifiers |= XEMACS_MOD_SHIFT;
@@ -1381,13 +1427,21 @@
 	    if (state & Button2Mask)    button = Button2;
 	    if (state & Button1Mask)    button = Button1;
 
+#ifdef USE_KKCC
+	    XSET_MISC_USER_DATA_MODIFIERS (EVENT_DATA (emacs_event), modifiers);
+	    XSET_MISC_USER_DATA_BUTTON (EVENT_DATA (emacs_event), button);
+
+	    DndDropCoordinates(FRAME_X_TEXT_WIDGET(frame), x_event,
+			       &(XMISC_USER_DATA_X (EVENT_DATA (emacs_event))),
+			       &(XMISC_USER_DATA_Y (EVENT_DATA (emacs_event))) );
+#else /* not USE_KKCC */
 	    emacs_event->event.misc.modifiers = modifiers;
 	    emacs_event->event.misc.button    = button;
 
 	    DndDropCoordinates(FRAME_X_TEXT_WIDGET(frame), x_event,
 			       &(emacs_event->event.misc.x),
 			       &(emacs_event->event.misc.y) );
-
+#endif /* not USE_KKCC */
 	    DndGetData(x_event,&data,&size);
 
 	    dtype=DndDataType(x_event);
@@ -1463,8 +1517,13 @@
 		break;
 	      }
 
+#ifdef USE_KKCC
+	    XSET_MISC_USER_DATA_FUNCTION (EVENT_DATA (emacs_event), Qdragdrop_drop_dispatch);
+	    XSET_MISC_USER_DATA_OBJECT (EVENT_DATA (emacs_event), Fcons (l_type, l_dndlist));
+#else /* not USE_KKCC */
 	    emacs_event->event.misc.function = Qdragdrop_drop_dispatch;
 	    emacs_event->event.misc.object = Fcons (l_type, l_dndlist);
+#endif /* not USE_KKCC */
 
 	    UNGCPRO;
 
@@ -1484,7 +1543,13 @@
       {
         struct frame *frame;
         Window w;
+#ifdef USE_KKCC
+	XEvent *x_event_copy;
+	SET_EVENT_TYPE (emacs_event, magic_event);
+        x_event_copy = &XMAGIC_DATA_X_EVENT (EVENT_DATA (emacs_event));
+#else /* not USE_KKCC */
 	XEvent *x_event_copy = &emacs_event->event.magic.underlying_x_event;
+#endif /* not USE_KKCC */
 
 #define FROB(event_member, window_member) \
 	x_event_copy->event_member = x_event->event_member; \
@@ -1519,9 +1584,14 @@
         if (!frame)
           return 0;
 
+#ifdef USE_KKCC
+	SET_EVENT_TYPE (emacs_event, magic_event);
+	SET_EVENT_CHANNEL (emacs_event, wrap_frame(frame));
+	XSET_MAGIC_DATA_X_EVENT (EVENT_DATA(emacs_event), *x_event_copy);
+#else /* not USE_KKCC */
         emacs_event->event_type = magic_event;
         emacs_event->channel = wrap_frame (frame);
-
+#endif /* not USE_KKCC */
         break;
       }
     }
@@ -1617,13 +1687,25 @@
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
   Lisp_Event *ev          = XEVENT (emacs_event);
-  XEvent *x_event = &ev->event.magic.underlying_x_event;
+  XEvent *x_event;
 
+  ev->event_type = magic_event;
+
+#ifdef USE_KKCC
+  XSET_EVENT_TYPE (emacs_event, magic_event);
+  x_event = &XMAGIC_DATA_X_EVENT (EVENT_DATA (ev));
+#else /* not USE_KKCC */
+  x_event = &ev->event.magic.underlying_x_event;
+#endif /* not USE_KKCC */
+
   x_event->type = in_p ? FocusIn : FocusOut;
   x_event->xfocus.window = XtWindow (wants_it);
 
-  ev->channel	            = frame;
-  ev->event_type	    = magic_event;
+#ifdef USE_KKCC
+  SET_EVENT_CHANNEL (ev, frame);
+#else /* not USE_KKCC */
+  ev->channel = frame;
+#endif /* not USE_KKCC */
 
   enqueue_Xt_dispatch_event (emacs_event);
 }
@@ -1904,7 +1986,11 @@
   Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (event));
   if (CONSOLE_X_P (XCONSOLE (console)))
     write_c_string
+#ifdef USE_KKCC
+      (pstream, x_event_name ((XMAGIC_DATA_X_EVENT (EVENT_DATA(event))).type));
+#else /* not USE_KKCC */
       (pstream, x_event_name (event->event.magic.underlying_x_event.type));
+#endif /* not USE_KKCC */
 }
 
 static int
@@ -1912,8 +1998,13 @@
 {
   if (CONSOLE_X_P (XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e1)))) &&
       CONSOLE_X_P (XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e2)))))
+#ifdef USE_KKCC
+    return ((XMAGIC_DATA_X_EVENT (EVENT_DATA(e1))).xany.serial ==
+	    (XMAGIC_DATA_X_EVENT (EVENT_DATA(e2))).xany.serial);
+#else /* not USE_KKCC */
     return (e1->event.magic.underlying_x_event.xany.serial ==
 	    e2->event.magic.underlying_x_event.xany.serial);
+#endif /* not USE_KKCC */
   if (CONSOLE_X_P (XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e1)))) ||
       CONSOLE_X_P (XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e2)))))
     return 0;
@@ -1925,7 +2016,11 @@
 {
   Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (e));
   if (CONSOLE_X_P (XCONSOLE (console)))
+#ifdef USE_KKCC
+    return (XMAGIC_DATA_X_EVENT (EVENT_DATA(e))).xany.serial;
+#else /* not USE_KKCC */
     return e->event.magic.underlying_x_event.xany.serial;
+#endif /* not USE_KKCC */
   return 0;
 }
 
@@ -1933,7 +2028,11 @@
 emacs_Xt_handle_magic_event (Lisp_Event *emacs_event)
 {
   /* This function can GC */
+#ifdef USE_KKCC
+  XEvent *event = &XMAGIC_DATA_X_EVENT (EVENT_DATA(emacs_event));
+#else /* not USE_KKCC */
   XEvent *event = &emacs_event->event.magic.underlying_x_event;
+#endif /* not USE_KKCC */
   struct frame *f = XFRAME (EVENT_CHANNEL (emacs_event));
 
   if (!FRAME_LIVE_P (f) || DEVICE_X_BEING_DELETED (XDEVICE (FRAME_DEVICE (f))))
@@ -1944,19 +2043,19 @@
     case SelectionRequest:
       x_handle_selection_request (&event->xselectionrequest);
       break;
-
+      
     case SelectionClear:
       x_handle_selection_clear (&event->xselectionclear);
       break;
-
+      
     case SelectionNotify:
       x_handle_selection_notify (&event->xselection);
       break;
-
+      
     case PropertyNotify:
       x_handle_property_notify (&event->xproperty);
       break;
-
+	
     case Expose:
       if (!check_for_ignored_expose (f, event->xexpose.x, event->xexpose.y,
 				     event->xexpose.width, event->xexpose.height)
@@ -2182,12 +2281,20 @@
   struct Xt_timeout *timeout = completed_timeouts;
   assert (timeout);
   completed_timeouts = completed_timeouts->next;
-  emacs_event->event_type = timeout_event;
   /* timeout events have nil as channel */
+#ifdef USE_KKCC
+  set_event_type(emacs_event, timeout_event);
+  SET_EVENT_TIMESTAMP_ZERO (emacs_event); /* #### wrong!! */
+  XSET_TIMEOUT_DATA_INTERVAL_ID (EVENT_DATA (emacs_event), timeout->id);
+  XSET_TIMEOUT_DATA_FUNCTION (EVENT_DATA (emacs_event), Qnil);
+  XSET_TIMEOUT_DATA_OBJECT (EVENT_DATA (emacs_event), Qnil);
+#else /* not USE_KKCC */
+  emacs_event->event_type = timeout_event;
   emacs_event->timestamp  = 0; /* #### wrong!! */
   emacs_event->event.timeout.interval_id = timeout->id;
   emacs_event->event.timeout.function = Qnil;
   emacs_event->event.timeout.object = Qnil;
+#endif /* not USE_KKCC */
   Blocktype_free (the_Xt_timeout_blocktype, timeout);
 }
 
@@ -2441,9 +2548,15 @@
 	  filedesc_with_input[i] = Qnil;
 	  process_events_occurred--;
 	  /* process events have nil as channel */
+#ifdef USE_KKCC
+	  set_event_type (emacs_event, process_event);
+	  SET_EVENT_TIMESTAMP_ZERO (emacs_event); /* #### */
+	  XSET_PROCESS_DATA_PROCESS (EVENT_DATA (emacs_event), process);
+#else /* not USE_KKCC */
 	  emacs_event->event_type = process_event;
 	  emacs_event->timestamp  = 0; /* #### */
 	  emacs_event->event.process.process = process;
+#endif /* not USE_KKCC */
 	  return;
 	}
     }
@@ -2769,11 +2882,17 @@
 {
   Lisp_Object event = Fmake_event (Qnil, Qnil);
 
+#ifdef USE_KKCC
+  XSET_EVENT_TYPE (event, misc_user_event);
+  XSET_EVENT_CHANNEL (event, channel);
+  XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), function);
+  XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), object);
+#else /* not USE_KKCC */
   XEVENT (event)->event_type = misc_user_event;
   XEVENT (event)->channel = channel;
   XEVENT (event)->event.eval.function = function;
   XEVENT (event)->event.eval.object = object;
-
+#endif /* not USE_KKCC */
   enqueue_Xt_dispatch_event (event);
 }
 
@@ -2844,9 +2963,15 @@
       /* A dummy event, so that a cycle of the command loop will occur. */
       fake_event_occurred = 0;
       /* eval events have nil as channel */
+#ifdef USE_KKCC
+      set_event_type (emacs_event, eval_event);
+      XSET_EVAL_DATA_FUNCTION (EVENT_DATA (emacs_event), Qidentity);
+      XSET_EVAL_DATA_OBJECT (EVENT_DATA (emacs_event), Qnil);
+#else /* not USE_KKCC */
       emacs_event->event_type = eval_event;
       emacs_event->event.eval.function = Qidentity;
       emacs_event->event.eval.object = Qnil;
+#endif /* not USE_KKCC */
     }
   else /* if (process_events_occurred) */
     Xt_process_to_emacs_event (emacs_event);
Index: src/event-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-msw.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- src/event-msw.c	2002/07/14 23:20:36	1.83
+++ src/event-msw.c	2002/08/16 08:15:36	1.84
@@ -949,6 +949,15 @@
 				   Lisp_Object object)
 {
   Lisp_Object event = Fmake_event (Qnil, Qnil);
+
+#ifdef USE_KKCC
+
+  XSET_EVENT_TYPE (event, misc_user_event);
+  XSET_EVENT_CHANNEL (event, channel);
+  XSET_EVENT_TIMESTAMP (event, GetTickCount());
+  XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), function);
+  XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), object);
+#else /* not USE_KKCC */
   Lisp_Event *e = XEVENT (event);
 
   e->event_type = misc_user_event;
@@ -956,6 +965,7 @@
   e->timestamp = GetTickCount ();
   e->event.misc.function = function;
   e->event.misc.object = object;
+#endif /* not USE_KKCC */
 
   mswindows_enqueue_dispatch_event (event);
 }
@@ -964,12 +974,20 @@
 mswindows_enqueue_magic_event (HWND hwnd, UINT msg)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
+
+#ifdef USE_KKCC
+  XSET_EVENT_CHANNEL (emacs_event, (hwnd ? mswindows_find_frame (hwnd) : Qnil));
+  XSET_EVENT_TIMESTAMP (emacs_event, GetMessageTime ());
+  XSET_EVENT_TYPE (emacs_event, magic_event);
+  XSET_MAGIC_DATA_MSWINDOWS_EVENT (XEVENT_DATA(emacs_event), msg);
+#else /* not USE_KKCC */
   Lisp_Event *event = XEVENT (emacs_event);
 
   event->channel = hwnd ? mswindows_find_frame (hwnd) : Qnil;
   event->timestamp = GetMessageTime();
   event->event_type = magic_event;
   EVENT_MSWINDOWS_MAGIC_TYPE (event) = msg;
+#endif /* not USE_KKCC */
 
   mswindows_enqueue_dispatch_event (emacs_event);
 }
@@ -982,9 +1000,15 @@
   Lisp_Object process = wrap_process (p);
 
 
+#ifdef USE_KKCC
+  XSET_EVENT_TYPE (emacs_event, process_event);
+  XSET_EVENT_TIMESTAMP (emacs_event, GetTickCount());
+  XSET_PROCESS_DATA_PROCESS (XEVENT_DATA (emacs_event), process);
+#else /* not USE_KKCC */
   event->event_type = process_event;
   event->timestamp  = GetTickCount ();
   event->event.process.process = process;
+#endif /* not USE_KKCC */
 
   mswindows_enqueue_dispatch_event (emacs_event);
 }
@@ -1004,6 +1028,35 @@
   Lisp_Event *event = XEVENT (emacs_event);
 
   mswindows_handle_sticky_modifiers (0, 0, downp, 0);
+
+  if (downp)
+    {
+#ifdef USE_KKCC
+      XSET_EVENT_TYPE (emacs_event, button_press_event);
+#else /* not USE_KKCC */
+      event->event_type = button_press_event;
+#endif /* not USE_KKCC */
+    }
+  else
+    {
+#ifdef USE_KKCC
+      XSET_EVENT_TYPE (emacs_event, button_release_event);
+#else /* not USE_KKCC */
+      event->event_type = button_release_event;
+#endif /* not USE_KKCC */
+    }
+
+#ifdef USE_KKCC
+  XSET_EVENT_CHANNEL (emacs_event, mswindows_find_frame (hwnd));
+  XSET_EVENT_TIMESTAMP (emacs_event, when);
+  XSET_BUTTON_DATA_BUTTON (XEVENT_DATA (emacs_event), 
+	 (msg==WM_LBUTTONDOWN || msg==WM_LBUTTONUP) ? 1 :
+	 ((msg==WM_RBUTTONDOWN || msg==WM_RBUTTONUP) ? 3 : 2));
+  XSET_BUTTON_DATA_X (XEVENT_DATA (emacs_event), where.x);
+  XSET_BUTTON_DATA_Y (XEVENT_DATA (emacs_event), where.y);
+  XSET_BUTTON_DATA_MODIFIERS (XEVENT_DATA (emacs_event),
+			      mswindows_modifier_state (NULL, mods, 0));
+#else /* not USE_KKCC */
   event->channel = mswindows_find_frame (hwnd);
   event->timestamp = when;
   event->event.button.button =
@@ -1012,10 +1065,10 @@
   event->event.button.x = where.x;
   event->event.button.y = where.y;
   event->event.button.modifiers = mswindows_modifier_state (NULL, mods, 0);
+#endif /* not USE_KKCC */
 
   if (downp)
     {
-      event->event_type = button_press_event;
       SetCapture (hwnd);
       /* we need this to make sure the main window regains the focus
          from control subwindows */
@@ -1027,7 +1080,6 @@
     }
   else
     {
-      event->event_type = button_release_event;
       ReleaseCapture ();
     }
 
@@ -1038,6 +1090,14 @@
 mswindows_enqueue_keypress_event (HWND hwnd, Lisp_Object keysym, int mods)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
+
+#ifdef USE_KKCC
+  XSET_EVENT_CHANNEL (emacs_event,  mswindows_find_console(hwnd));
+  XSET_EVENT_TIMESTAMP (emacs_event, GetMessageTime());
+  XSET_EVENT_TYPE (emacs_event, key_press_event);
+  XSET_KEY_DATA_KEYSYM (XEVENT_DATA (emacs_event), keysym);
+  XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (emacs_event), mods);
+#else /* not USE_KKCC */
   Lisp_Event *event = XEVENT(emacs_event);
 
   event->channel = mswindows_find_console(hwnd);
@@ -1045,6 +1105,7 @@
   event->event_type = key_press_event;
   event->event.key.keysym = keysym;
   event->event.key.modifiers = mods;
+#endif /* not USE_KKCC */
   mswindows_enqueue_dispatch_event (emacs_event);
   return emacs_event;
 }
@@ -1070,11 +1131,19 @@
 			 &mswindows_s_dispatch_event_queue_tail :
 			 &mswindows_u_dispatch_event_queue_tail);
 
+#ifdef USE_KKCC
+  if (XEVENT_TYPE (event) == key_press_event
+      && (XKEY_DATA_MODIFIERS (XEVENT_DATA(event)) & FAKE_MOD_QUIT))
+    XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (event), 
+			    XKEY_DATA_MODIFIERS (XEVENT_DATA (event)) &
+						 ~(FAKE_MOD_QUIT | FAKE_MOD_QUIT_CRITICAL));
+#else /* not USE_KKCC */
   sevt = XEVENT (event);
   if (sevt->event_type == key_press_event
       && (sevt->event.key.modifiers & FAKE_MOD_QUIT))
     sevt->event.key.modifiers &=
       ~(FAKE_MOD_QUIT | FAKE_MOD_QUIT_CRITICAL);
+#endif /* not USE_KKCC */
 
   return event;
 }
@@ -1105,11 +1174,20 @@
   EVENT_CHAIN_LOOP (event, *head)
     {
       Lisp_Event *e = XEVENT (event);
+#ifdef USE_KKCC
+      if ((EVENT_TYPE (e) == EVENT_TYPE (match)) &&
+	  ((EVENT_TYPE (e) == timeout_event) ?
+	   (XTIMEOUT_DATA_INTERVAL_ID (EVENT_DATA (e)) ==
+	    XTIMEOUT_DATA_INTERVAL_ID (EVENT_DATA (match))) :
+	   ((XKEY_DATA_MODIFIERS (EVENT_DATA (e)) &
+	     XKEY_DATA_MODIFIERS (EVENT_DATA (match))) != 0)))
+#else /* not USE_KKCC */
       if ((e->event_type == match->event_type) &&
 	  ((e->event_type == timeout_event) ?
 	   (e->event.timeout.interval_id == match->event.timeout.interval_id) :
 	   /* Must be key_press_event */
 	   ((e->event.key.modifiers & match->event.key.modifiers) != 0)))
+#endif /* not USE_KKCC */
 	{
 	  if (NILP (previous_event))
 	    dequeue_event (head, tail);
@@ -1728,12 +1806,21 @@
   if (KillTimer (NULL, id_timer))
     --mswindows_pending_timers_count;
 
+#ifdef USE_KKCC
+  XSET_EVENT_CHANNEL (emacs_event, Qnil);
+  XSET_EVENT_TIMESTAMP (emacs_event, dwtime);
+  XSET_EVENT_TYPE (emacs_event, timeout_event);
+  XSET_TIMEOUT_DATA_INTERVAL_ID (XEVENT_DATA(emacs_event), id_timer);
+  XSET_TIMEOUT_DATA_FUNCTION (XEVENT_DATA(emacs_event), Qnil);
+  XSET_TIMEOUT_DATA_OBJECT (XEVENT_DATA(emacs_event), Qnil);
+#else /* not USE_KKCC */
   event->channel = Qnil;
   event->timestamp = dwtime;
   event->event_type = timeout_event;
   event->event.timeout.interval_id = id_timer;
   event->event.timeout.function = Qnil;
   event->event.timeout.object = Qnil;
+#endif /* not USE_KKCC */
 
   mswindows_enqueue_dispatch_event (emacs_event);
 }
@@ -2175,6 +2262,19 @@
 	    };
 	  assert (!NILP (event->channel));
 
+#ifdef USE_KKCC
+	  SET_EVENT_TIMESTAMP (event, GetTickCount());
+	  SET_EVENT_TYPE (event, misc_user_event);
+	  XSET_MISC_USER_DATA_BUTTON (EVENT_DATA (event), 1);
+	  XSET_MISC_USER_DATA_MODIFIERS (EVENT_DATA (event), 0);
+	  XSET_MISC_USER_DATA_X (EVENT_DATA (event), -1);
+	  XSET_MISC_USER_DATA_Y (EVENT_DATA (event), -1);
+	  XSET_MISC_USER_DATA_FUNCTION (EVENT_DATA (event),
+					Qdragdrop_drop_dispatch);
+	  XSET_MISC_USER_DATA_OBJECT (EVENT_DATA (event),
+				      Fcons (Qdragdrop_URL,
+					    Fcons (l_dndlist, Qnil)));
+#else /* not USE_KKCC */
 	  event->timestamp = GetTickCount();
 	  event->event_type = misc_user_event;
 	  event->event.misc.button = 1;
@@ -2184,6 +2284,7 @@
 	  event->event.misc.function = Qdragdrop_drop_dispatch;
 	  event->event.misc.object = Fcons (Qdragdrop_URL,
 					    Fcons (l_dndlist, Qnil));
+#endif /* not USE_KKCC */
 	  mswindows_enqueue_dispatch_event (emacs_event);
 	  UNGCPRO;
 	  return (HDDEDATA) DDE_FACK;
@@ -3218,6 +3319,15 @@
 	  emacs_event = Fmake_event (Qnil, Qnil);
 	  event = XEVENT(emacs_event);
 
+#ifdef USE_KKCC
+	  XSET_EVENT_CHANNEL (emacs_event,  mswindows_find_frame(hwnd));
+	  XSET_EVENT_TIMESTAMP (emacs_event, GetMessageTime());
+	  XSET_EVENT_TYPE (emacs_event, pointer_motion_event);
+	  XSET_MOTION_DATA_X (XEVENT_DATA (emacs_event),MAKEPOINTS (lParam).x);
+	  XSET_MOTION_DATA_Y (XEVENT_DATA (emacs_event),MAKEPOINTS (lParam).y);
+	  XSET_MOTION_DATA_MODIFIERS (XEVENT_DATA(emacs_event),
+                                mswindows_modifier_state (NULL, wParam, 0));
+#else /* not USE_KKCC */	  
 	  event->channel = mswindows_find_frame (hwnd);
 	  event->timestamp = GetMessageTime ();
 	  event->event_type = pointer_motion_event;
@@ -3225,6 +3335,7 @@
 	  event->event.motion.y = MAKEPOINTS (lParam).y;
 	  event->event.motion.modifiers =
 	    mswindows_modifier_state (NULL, wParam, 0);
+#endif /* not USE_KKCC */
 
 	  mswindows_enqueue_dispatch_event (emacs_event);
 	}
@@ -3745,6 +3856,18 @@
 	if (!DragQueryPoint ((HDROP) wParam, &point))
 	  point.x = point.y = -1; /* outside client area */
 
+#ifdef USE_KKCC
+	XSET_EVENT_TYPE (emacs_event, misc_user_event);
+	XSET_EVENT_CHANNEL (emacs_event,  mswindows_find_frame(hwnd));
+	XSET_EVENT_TIMESTAMP (emacs_event, GetMessageTime());
+	XSET_MISC_USER_DATA_BUTTON (XEVENT_DATA (emacs_event), 1);
+	XSET_MISC_USER_DATA_MODIFIERS (XEVENT_DATA (emacs_event),
+              mswindows_modifier_state (NULL, (DWORD) -1, 0));
+	XSET_MISC_USER_DATA_X (XEVENT_DATA (emacs_event), point.x);
+	XSET_MISC_USER_DATA_Y (XEVENT_DATA (emacs_event), point.y);
+	XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (emacs_event),
+					Qdragdrop_drop_dispatch);
+#else /* not USE_KKCC */
 	event->event_type = misc_user_event;
 	event->channel = mswindows_find_frame (hwnd);
 	event->timestamp = GetMessageTime();
@@ -3754,6 +3877,7 @@
 	event->event.misc.x = point.x;
 	event->event.misc.y = point.y;
 	event->event.misc.function = Qdragdrop_drop_dispatch;
+#endif /* not USE_KKCC */
 
 	filecount = qxeDragQueryFile ((HDROP) wParam, 0xffffffff, NULL, 0);
 	for (i = 0; i < filecount; i++)
@@ -3929,7 +4053,12 @@
 
 	DragFinish ((HDROP) wParam);
 
+#ifdef USE_KKCC
+	XSET_MISC_USER_DATA_OBJECT (EVENT_DATA (event),
+				    Fcons (Qdragdrop_URL, l_dndlist));
+#else /* not USE_KKCC */
 	event->event.misc.object = Fcons (Qdragdrop_URL, l_dndlist);
+#endif /* not USE_KKCC */
 	mswindows_enqueue_dispatch_event (emacs_event);
 	UNGCPRO;
       }
@@ -4383,8 +4512,13 @@
 
   /* If there is a dispatch event generated by this
      timeout in the queue, we have to remove it too. */
+#ifdef USE_KKCC
+  SET_EVENT_TYPE(&match_against, timeout_event);
+  XSET_TIMEOUT_DATA_INTERVAL_ID (EVENT_DATA (&match_against), id);
+#else /* not USE_KKCC */
   match_against.event_type = timeout_event;
   match_against.event.timeout.interval_id = id;
+#endif /* not USE_KKCC */
   emacs_event = mswindows_cancel_dispatch_event (&match_against);
   if (!NILP (emacs_event))
     Fdeallocate_event(emacs_event);
@@ -4429,7 +4563,11 @@
 {
 #define FROB(msg) case msg: write_c_string (pstream, "type=" #msg); break
 
+#ifdef USE_KKCC
+  switch (XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA(emacs_event)))
+#else /* not USE_KKCC */
   switch (EVENT_MSWINDOWS_MAGIC_TYPE (emacs_event))
+#endif /* not USE_KKCC */
     {
       FROB (XM_BUMPQUEUE);
       FROB (WM_PAINT);
@@ -4452,14 +4590,23 @@
 static int
 emacs_mswindows_compare_magic_event (Lisp_Event *e1, Lisp_Event *e2)
 {
+#ifdef USE_KKCC
+  return (XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA (e1)) ==
+	  XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA (e2)));
+#else /* not USE_KKCC */
   return (e1->event.magic.underlying_mswindows_event ==
 	  e2->event.magic.underlying_mswindows_event);
+#endif /* not USE_KKCC */
 }
 
 static Hashcode
 emacs_mswindows_hash_magic_event (Lisp_Event *e)
 {
+#ifdef USE_KKCC
+  return (XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA (e)));
+#else /* not USE_KKCC */
   return e->event.magic.underlying_mswindows_event;
+#endif /* not USE_KKCC */
 }
 
 /*
@@ -4468,7 +4615,11 @@
 static void
 emacs_mswindows_handle_magic_event (Lisp_Event *emacs_event)
 {
+#ifdef USE_KKCC
+  switch (XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA(emacs_event)))
+#else /* not USE_KKCC */
   switch (EVENT_MSWINDOWS_MAGIC_TYPE (emacs_event))
+#endif /* not USE_KKCC */
     {
     case XM_BUMPQUEUE:
       break;
@@ -4486,7 +4637,12 @@
       {
 	Lisp_Object frame = EVENT_CHANNEL (emacs_event);
 	struct frame *f = XFRAME (frame);
+#ifdef USE_KKCC
+	int in_p = (XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA(emacs_event))
+		    == WM_SETFOCUS);
+#else /* not USE_KKCC */
 	int in_p = (EVENT_MSWINDOWS_MAGIC_TYPE (emacs_event) == WM_SETFOCUS);
+#endif /* not USE_KKCC */
 	Lisp_Object conser;
 	struct gcpro gcpro1;
 
@@ -4509,7 +4665,11 @@
     case XM_UNMAPFRAME:
       {
 	Lisp_Object frame = EVENT_CHANNEL (emacs_event);
+#ifdef USE_KKCC
+	va_run_hook_with_args (XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA(emacs_event))
+#else /* not USE_KKCC */
 	va_run_hook_with_args (EVENT_MSWINDOWS_MAGIC_TYPE (emacs_event)
+#endif /* not USE_KKCC */
 			       == XM_MAPFRAME ?
 			       Qmap_frame_hook : Qunmap_frame_hook,
 			       1, frame);
@@ -4680,15 +4840,24 @@
       Lisp_Object emacs_event;
       int critical_p = 0;
 
+#ifdef USE_KKCC
+      SET_EVENT_TYPE (&match_against, key_press_event);
+      XSET_KEY_DATA_MODIFIERS (EVENT_DATA (&match_against), FAKE_MOD_QUIT);
+#else /* not USE_KKCC */
       match_against.event_type = key_press_event;
       match_against.event.key.modifiers = FAKE_MOD_QUIT;
+#endif /* not USE_KKCC */
 
       while (mswindows_quit_chars_count > 0)
 	{
 	  emacs_event = mswindows_cancel_dispatch_event (&match_against);
 	  assert (!NILP (emacs_event));
 
+#ifdef USE_KKCC
+	  if (XKEY_DATA_MODIFIERS (XEVENT_DATA(emacs_event)) &
+#else /* not USE_KKCC */
 	  if (XEVENT (emacs_event)->event.key.modifiers &
+#endif /* not USE_KKCC */
 	      FAKE_MOD_QUIT_CRITICAL)
 	    critical_p = 1;
 
Index: src/event-stream.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-stream.c,v
retrieving revision 1.70
retrieving revision 1.72
diff -u -r1.70 -r1.72
--- src/event-stream.c	2002/07/03 07:18:41	1.70
+++ src/event-stream.c	2002/08/01 08:28:35	1.72
@@ -318,6 +318,27 @@
 
 static Lisp_Object Vcommand_builder_free_list;
 
+#ifdef USE_KKCC
+static const struct lrecord_description munging_key_translation_description_1 [] = {
+  { XD_LISP_OBJECT, offsetof (struct munging_key_translation, first_mungeable_event) },
+  { XD_END }
+};
+
+static const struct struct_description munging_key_translation_description = {
+  sizeof (Lisp_Object),
+  munging_key_translation_description_1
+};
+
+static const struct lrecord_description command_builder_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct command_builder, current_events) },
+  { XD_LISP_OBJECT, offsetof (struct command_builder, most_current_event) },
+  { XD_LISP_OBJECT, offsetof (struct command_builder, last_non_munged_event) },
+  { XD_LISP_OBJECT, offsetof (struct command_builder, console) },
+  { XD_STRUCT_ARRAY, offsetof (struct command_builder, munge_me), 2, &munging_key_translation_description },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_command_builder (Lisp_Object obj)
 {
@@ -344,10 +365,19 @@
     }
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("command-builder", command_builder,
+			       0, /*dumpable-flag*/
+                               mark_command_builder, internal_object_printer,
+			       finalize_command_builder, 0, 0, 
+			       command_builder_description,
+			       struct command_builder);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("command-builder", command_builder,
                                mark_command_builder, internal_object_printer,
 			       finalize_command_builder, 0, 0, 0,
 			       struct command_builder);
+#endif /* not USE_KKCC */
 
 static void
 reset_command_builder_event_chain (struct command_builder *builder)
@@ -761,7 +791,11 @@
       clear_echo_area (selected_frame (), Qnil, 0);
     }
 
-  format_event_object (buf, XEVENT (event), 1);
+#ifdef USE_KKCC
+  format_event_object (buf, event, 1);
+#else /* not USE_KKCC */
+  format_event_object (buf, XEVENT(event), 1);
+#endif /* not USE_KKCC */
   len = eilen (buf);
 
   if (len + buf_index + 4 > command_builder->echo_buf_length)
@@ -876,44 +910,89 @@
 				      Qnil);
       if (!NILP (traduit) && SYMBOLP (traduit))
 	{
+#ifdef USE_KKCC
+	  XSET_KEY_DATA_KEYSYM (XEVENT_DATA (event), traduit);
+	  XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (event), 0);
+#else /* not USE_KKCC */
 	  XEVENT (event)->event.key.keysym = traduit;
 	  XEVENT (event)->event.key.modifiers = 0;
+#endif /* not USE_KKCC */
 	  did_translate = 1;
 	}
       else if (CHARP (traduit))
 	{
+#ifdef USE_KKCC
+	  Lisp_Object ev2 = Fmake_event(Qnil, Qnil);
+#else /* not USE_KKCC */
 	  Lisp_Event ev2;
 
 	  /* This used to call Fcharacter_to_event() directly into EVENT,
 	     but that can eradicate timestamps and other such stuff.
 	     This way is safer. */
 	  zero_event (&ev2);
+#endif /* not USE_KKCC */
+
+#ifdef USE_KKCC
+	  character_to_event (XCHAR (traduit), XEVENT (ev2),
+			      XCONSOLE (XEVENT_CHANNEL (event)), 1, 1);
+	  XSET_KEY_DATA_KEYSYM (XEVENT_DATA (event), XKEY_DATA_KEYSYM (XEVENT_DATA (ev2)));
+	  XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (event), 
+                               XKEY_DATA_MODIFIERS (XEVENT_DATA (ev2)));
+#else /* not USE_KKCC */
 	  character_to_event (XCHAR (traduit), &ev2,
 			      XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 1, 1);
 	  XEVENT (event)->event.key.keysym = ev2.event.key.keysym;
 	  XEVENT (event)->event.key.modifiers = ev2.event.key.modifiers;
+#endif /* not USE_KKCC */
 	  did_translate = 1;
 	}
     }
 
   if (!did_translate)
     {
+#ifdef USE_KKCC
+      Lisp_Object traduit = Fgethash (XKEY_DATA_KEYSYM (XEVENT_DATA (event)),
+				      Vkeyboard_translate_table, Qnil);
+#else /* not USE_KKCC */
       Lisp_Object traduit = Fgethash (XEVENT (event)->event.key.keysym,
 				      Vkeyboard_translate_table, Qnil);
+#endif /* not USE_KKCC */
       if (!NILP (traduit) && SYMBOLP (traduit))
 	{
+#ifdef USE_KKCC
+	  XSET_KEY_DATA_KEYSYM (XEVENT_DATA (event), traduit);
+#else /* not USE_KKCC */
 	  XEVENT (event)->event.key.keysym = traduit;
+#endif /* not USE_KKCC */
 	  did_translate = 1;
 	}
       else if (CHARP (traduit))
 	{
+#ifdef USE_KKCC
+	  Lisp_Object ev2 = Fmake_event(Qnil, Qnil);
+#else /* not USE_KKCC */
 	  Lisp_Event ev2;
 
+	  /* This used to call Fcharacter_to_event() directly into EVENT,
+	     but that can eradicate timestamps and other such stuff.
+	     This way is safer. */
 	  zero_event (&ev2);
+#endif /* not USE_KKCC */
+
+#ifdef USE_KKCC
+	  character_to_event (XCHAR (traduit), XEVENT (ev2),
+			      XCONSOLE (XEVENT_CHANNEL (event)), 1, 1);
+	  XSET_KEY_DATA_KEYSYM (XEVENT_DATA (event), XKEY_DATA_KEYSYM (XEVENT_DATA (ev2)));
+	  XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (event),
+                               XKEY_DATA_MODIFIERS (XEVENT_DATA (event)) |
+                               XKEY_DATA_MODIFIERS (XEVENT_DATA (ev2)));
+#else /* not USE_KKCC */
 	  character_to_event (XCHAR (traduit), &ev2,
 			      XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 1, 1);
 	  XEVENT (event)->event.key.keysym = ev2.event.key.keysym;
 	  XEVENT (event)->event.key.modifiers |= ev2.event.key.modifiers;
+#endif /* not USE_KKCC */
+
 	  did_translate = 1;
 	}
     }
@@ -1230,9 +1309,16 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("timeout", timeout,
+			       1, /*dumpable-flag*/
 			       mark_timeout, internal_object_printer,
 			       0, 0, 0, timeout_description, Lisp_Timeout);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("timeout", timeout,
+			       mark_timeout, internal_object_printer,
+			       0, 0, 0, timeout_description, Lisp_Timeout);
+#endif /* not USE_KKCC */
 
 /* Generate a timeout and return its ID. */
 
@@ -1628,11 +1714,17 @@
 enqueue_magic_eval_event (void (*fun) (Lisp_Object), Lisp_Object object)
 {
   Lisp_Object event = Fmake_event (Qnil, Qnil);
-
+#ifdef USE_KKCC
+  XSET_EVENT_TYPE (event, magic_eval_event);
+  /* channel for magic_eval events is nil */
+  XSET_MAGIC_EVAL_DATA_INTERNAL_FUNCTION (XEVENT_DATA (event), fun);
+  XSET_MAGIC_EVAL_DATA_OBJECT (XEVENT_DATA (event), object);
+#else /* not USE_KKCC */
   XEVENT (event)->event_type = magic_eval_event;
   /* channel for magic_eval events is nil */
   XEVENT (event)->event.magic_eval.internal_function = fun;
   XEVENT (event)->event.magic_eval.object = object;
+#endif /* not USE_KKCC */
   enqueue_command_event (event);
 }
 
@@ -1647,10 +1739,17 @@
 {
   Lisp_Object event = Fmake_event (Qnil, Qnil);
 
+#ifdef USE_KKCC
+  XSET_EVENT_TYPE (event, eval_event);
+  /* channel for eval events is nil */
+  XSET_EVAL_DATA_FUNCTION (XEVENT_DATA (event), function);
+  XSET_EVAL_DATA_OBJECT (XEVENT_DATA (event), object);
+#else /* not USE_KKCC */
   XEVENT (event)->event_type = eval_event;
   /* channel for eval events is nil */
   XEVENT (event)->event.eval.function = function;
   XEVENT (event)->event.eval.object = object;
+#endif /* not USE_KKCC */
   enqueue_command_event (event);
 
   return event;
@@ -1661,7 +1760,16 @@
 			 Lisp_Object object)
 {
   Lisp_Object event = Fmake_event (Qnil, Qnil);
-
+#ifdef USE_KKCC
+  XSET_EVENT_TYPE (event, misc_user_event);
+  XSET_EVENT_CHANNEL (event, channel);
+  XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), function);
+  XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), object);
+  XSET_MISC_USER_DATA_BUTTON (XEVENT_DATA (event), 0);
+  XSET_MISC_USER_DATA_MODIFIERS (XEVENT_DATA (event), 0);
+  XSET_MISC_USER_DATA_X (XEVENT_DATA (event), -1);
+  XSET_MISC_USER_DATA_Y (XEVENT_DATA (event), -1);
+#else /* not USE_KKCC */
   XEVENT (event)->event_type = misc_user_event;
   XEVENT (event)->channel = channel;
   XEVENT (event)->event.misc.function  = function;
@@ -1670,6 +1778,7 @@
   XEVENT (event)->event.misc.modifiers = 0;
   XEVENT (event)->event.misc.x         = -1;
   XEVENT (event)->event.misc.y         = -1;
+#endif /* not USE_KKCC */
   enqueue_command_event (event);
 
   return event;
@@ -1682,6 +1791,16 @@
 {
   Lisp_Object event = Fmake_event (Qnil, Qnil);
 
+#ifdef USE_KKCC
+  XSET_EVENT_TYPE (event, misc_user_event);
+  XSET_EVENT_CHANNEL (event, channel);
+  XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), function);
+  XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), object);
+  XSET_MISC_USER_DATA_BUTTON (XEVENT_DATA (event), button);
+  XSET_MISC_USER_DATA_MODIFIERS (XEVENT_DATA (event), modifiers);
+  XSET_MISC_USER_DATA_X (XEVENT_DATA (event), x);
+  XSET_MISC_USER_DATA_Y (XEVENT_DATA (event), y);
+#else /* not USE_KKCC */
   XEVENT (event)->event_type = misc_user_event;
   XEVENT (event)->channel = channel;
   XEVENT (event)->event.misc.function  = function;
@@ -1690,6 +1809,7 @@
   XEVENT (event)->event.misc.modifiers = modifiers;
   XEVENT (event)->event.misc.x         = x;
   XEVENT (event)->event.misc.y         = y;
+#endif /* not USE_KKCC */
   enqueue_command_event (event);
 
   return event;
@@ -2074,10 +2194,23 @@
       /* If this was a timeout, then we need to extract some data
 	 out of the returned closure and might need to resignal
 	 it. */
+#ifdef USE_KKCC
+      if (EVENT_TYPE (e) == timeout_event)
+#else /* not USE_KKCC */
       if (e->event_type == timeout_event)
+#endif /* not USE_KKCC */
 	{
 	  Lisp_Object tristan, isolde;
 
+#ifdef USE_KKCC
+	  XSET_TIMEOUT_DATA_ID_NUMBER (EVENT_DATA (e), 
+                          event_stream_resignal_wakeup (XTIMEOUT_DATA_INTERVAL_ID (EVENT_DATA (e)), 0, &tristan, &isolde));
+
+          XSET_TIMEOUT_DATA_FUNCTION (EVENT_DATA (e), tristan);
+          XSET_TIMEOUT_DATA_OBJECT (EVENT_DATA (e), isolde);
+	  /* next_event_internal() doesn't print out timeout events
+	     because of the extra info we just set. */
+#else /* not USE_KKCC */
 	  e->event.timeout.id_number =
 	    event_stream_resignal_wakeup (e->event.timeout.interval_id, 0,
 					  &tristan, &isolde);
@@ -2086,13 +2219,18 @@
 	  e->event.timeout.object = isolde;
 	  /* next_event_internal() doesn't print out timeout events
 	     because of the extra info we just set. */
+#endif /* not USE_KKCC */
 	  DEBUG_PRINT_EMACS_EVENT ("real, timeout", target_event);
 	}
 
       /* If we read a ^G, then set quit-flag and try to QUIT.
 	 This may be blocked (see above).
        */
+#ifdef USE_KKCC
+      if (EVENT_TYPE (e) == key_press_event &&
+#else /* not USE_KKCC */
       if (e->event_type == key_press_event &&
+#endif /* not USE_KKCC */
 	  event_matches_key_specifier_p
 	  (e, make_char (CONSOLE_QUIT_CHAR (XCONSOLE (EVENT_CHANNEL (e))))))
 	{
@@ -2453,7 +2591,7 @@
   /* This function can GC */
   struct gcpro gcpro1;
   GCPRO1 (event);
-
+   
   maybe_echo_keys (XCOMMAND_BUILDER
 		   (XCONSOLE (Vselected_console)->
 		    command_builder), 0); /* #### This sucks bigtime */
@@ -2741,7 +2879,11 @@
 	case process_event:
 	  {
 	    if (NILP (process) ||
+#ifdef USE_KKCC
+                EQ (XPROCESS_DATA_PROCESS (XEVENT_DATA (event)), process))
+#else /* not USE_KKCC */
                 EQ (XEVENT (event)->event.process.process, process))
+#endif /* not USE_KKCC */
 	      {
                 done = 1;
 		/* RMS's version always returns nil when proc is nil,
@@ -3023,15 +3165,25 @@
 
     case eval_event:
       {
+#ifdef USE_KKCC
+	call1 (XEVAL_DATA_FUNCTION (XEVENT_DATA (event)),
+	       XEVAL_DATA_OBJECT (XEVENT_DATA (event)));
+#else /* not USE_KKCC */
 	call1 (XEVENT (event)->event.eval.function,
 	       XEVENT (event)->event.eval.object);
+#endif /* not USE_KKCC */
 	return;
       }
 
     case magic_eval_event:
       {
+#ifdef USE_KKCC
+	XMAGIC_EVAL_DATA_INTERNAL_FUNCTION (XEVENT_DATA (event))
+	  XMAGIC_EVAL_DATA_OBJECT (XEVENT_DATA (event));
+#else /* not USE_KKCC */
 	(XEVENT (event)->event.magic_eval.internal_function)
 	  (XEVENT (event)->event.magic_eval.object);
+#endif /* not USE_KKCC */
 	return;
       }
 
@@ -3044,7 +3196,11 @@
 
     case process_event:
       {
+#ifdef USE_KKCC
+	Lisp_Object p = XPROCESS_DATA_PROCESS (XEVENT_DATA (event));
+#else /* not USE_KKCC */
 	Lisp_Object p = XEVENT (event)->event.process.process;
+#endif /* not USE_KKCC */
 	Charcount readstatus;
 	int iter;
 
@@ -3137,16 +3293,21 @@
     case timeout_event:
       {
 	Lisp_Event *e = XEVENT (event);
+
+#ifdef USE_KKCC
+	if (!NILP (XTIMEOUT_DATA_FUNCTION (EVENT_DATA (e))))
+	  call1 (XTIMEOUT_DATA_FUNCTION (EVENT_DATA (e)),
+                 XTIMEOUT_DATA_OBJECT (EVENT_DATA (e)));
+#else /* not USE_KKCC */
 	if (!NILP (e->event.timeout.function))
 	  call1 (e->event.timeout.function,
 		 e->event.timeout.object);
+#endif /* not USE_KKCC */
 	return;
       }
     case magic_event:
-      {
 	event_stream_handle_magic_event (XEVENT (event));
 	return;
-      }
     default:
       abort ();
     }
@@ -3297,8 +3458,13 @@
   if (XEVENT_TYPE (evee) == misc_user_event)
     {
       if (allow_misc_user_events_p && (NILP (XEVENT_NEXT (evee))))
+#ifdef USE_KKCC
+	return list2  (XEVAL_DATA_FUNCTION (XEVENT_DATA (evee)),
+		       XEVAL_DATA_OBJECT (XEVENT_DATA (evee)));
+#else /* not USE_KKCC */
 	return list2 (XEVENT (evee)->event.eval.function,
 		      XEVENT (evee)->event.eval.object);
+#endif /* not USE_KKCC */
       else
 	return Qnil;
     }
@@ -3355,12 +3521,23 @@
       && !NILP (Vretry_undefined_key_binding_unshifted))
     {
       Lisp_Object terminal = builder->most_current_event;
+#ifdef USE_KKCC
+      Lisp_Key_Data* key = XKEY_DATA (XEVENT_DATA (terminal));
+#else /* not USE_KKCC */
       struct key_data *key = &XEVENT (terminal)->event.key;
+#endif /* not USE_KKCC */
       Ichar c = 0;
+#ifdef USE_KKCC
+      if ((KEY_DATA_MODIFIERS (key) & XEMACS_MOD_SHIFT)
+          || (CHAR_OR_CHAR_INTP (KEY_DATA_KEYSYM(key))
+              && ((c = XCHAR_OR_CHAR_INT (KEY_DATA_KEYSYM(key))),
+		  c >= 'A' && c <= 'Z')))
+#else /* not USE_KKCC */
       if ((key->modifiers & XEMACS_MOD_SHIFT)
           || (CHAR_OR_CHAR_INTP (key->keysym)
               && ((c = XCHAR_OR_CHAR_INT (key->keysym)),
 		  c >= 'A' && c <= 'Z')))
+#endif /* not USE_KKCC */
         {
 	  Lisp_Object neubauten = copy_command_builder (builder, 0);
 	  struct command_builder *neub = XCOMMAND_BUILDER (neubauten);
@@ -3368,12 +3545,21 @@
 
 	  GCPRO1 (neubauten);
           terminal = event_chain_tail (neub->current_events);
+#ifdef USE_KKCC
+	  key = XKEY_DATA (XEVENT_DATA (terminal));
+
+          if (KEY_DATA_MODIFIERS (key) & XEMACS_MOD_SHIFT)
+            SET_KEY_DATA_MODIFIERS (key, (KEY_DATA_MODIFIERS (key) & (~ XEMACS_MOD_SHIFT)));
+          else
+            SET_KEY_DATA_KEYSYM (key, make_char (c + 'a' - 'A'));
+#else /* not USE_KKCC */
 	  key = &XEVENT (terminal)->event.key;
 
           if (key->modifiers & XEMACS_MOD_SHIFT)
             key->modifiers &= (~ XEMACS_MOD_SHIFT);
           else
             key->keysym = make_char (c + 'a' - 'A');
+#endif /* not USE_KKCC */
 
           result =
 	    command_builder_find_leaf_no_mule_processing
@@ -3443,8 +3629,13 @@
   if (XEVENT_TYPE (builder->most_current_event) == key_press_event
       && !NILP (Vcomposed_character_default_binding))
     {
+#ifdef USE_KKCC
+      Lisp_Object keysym =
+	XKEY_DATA_KEYSYM(XEVENT_DATA (builder->most_current_event));
+#else /* not USE_KKCC */
       Lisp_Object keysym =
 	XEVENT (builder->most_current_event)->event.key.keysym;
+#endif /* not USE_KKCC */
       if (CHARP (keysym) && !ichar_ascii_p (XCHAR (keysym)))
         return Vcomposed_character_default_binding;
     }
@@ -3867,11 +4058,23 @@
 	   */
 	Fcopy_event (event, recent);
 	e = XEVENT (recent);
+#ifdef USE_KKCC
+	if (EVENT_TYPE (e) == key_press_event)
+          XSET_KEY_DATA_MODIFIERS (EVENT_DATA (e), 
+                          XKEY_DATA_MODIFIERS (EVENT_DATA (e)) | 
+                          XEMACS_MOD_META);
+	else if (EVENT_TYPE (e) == button_press_event
+		 || EVENT_TYPE (e) == button_release_event)
+          XSET_BUTTON_DATA_MODIFIERS (EVENT_DATA (e), 
+                              XBUTTON_DATA_MODIFIERS (EVENT_DATA (e)) |
+                              XEMACS_MOD_META);
+#else /* not USE_KKCC */
 	if (e->event_type == key_press_event)
 	  e->event.key.modifiers |= XEMACS_MOD_META;
 	else if (e->event_type == button_press_event
 		 || e->event_type == button_release_event)
 	  e->event.button.modifiers |= XEMACS_MOD_META;
+#endif /* not USE_KKCC */
 	else
 	  abort ();
 
@@ -3965,9 +4168,15 @@
 #ifdef HAVE_SCROLLBARS
   Lisp_Object fun;
 
+#ifdef USE_KKCC
+  if (XEVENT_TYPE (event) != misc_user_event)
+    return 0;
+  fun = XMISC_USER_DATA_FUNCTION(XEVENT_DATA (event));
+#else /* not USE_KKCC */
   if (XEVENT (event)->event_type != misc_user_event)
     return 0;
   fun = XEVENT (event)->event.misc.function;
+#endif /* not USE_KKCC */
 
   return (EQ (fun, Qscrollbar_line_up) ||
 	  EQ (fun, Qscrollbar_line_down) ||
@@ -4104,11 +4313,19 @@
 
     pre_command_hook ();
 
+#ifdef USE_KKCC
+    if (XEVENT_TYPE (event) == misc_user_event)
+      {
+	call1 (XMISC_USER_DATA_FUNCTION (XEVENT_DATA (event)),
+	       XMISC_USER_DATA_OBJECT (XEVENT_DATA (event)));
+      }
+#else /* not USE_KKCC */
     if (XEVENT (event)->event_type == misc_user_event)
       {
 	call1 (XEVENT (event)->event.eval.function,
 	       XEVENT (event)->event.eval.object);
       }
+#endif /* not USE_KKCC */
     else
       {
 	Fcommand_execute (Vthis_command, Qnil, Qnil);
@@ -4292,7 +4509,11 @@
     Fselect_console (console);
 
   command_builder = XCOMMAND_BUILDER (XCONSOLE (console)->command_builder);
+#ifdef USE_KKCC
+  switch (XEVENT_TYPE (event))
+#else /* not USE_KKCC */
   switch (XEVENT (event)->event_type)
+#endif /* not USE_KKCC */
     {
     case button_press_event:
     case button_release_event:
@@ -4454,6 +4675,17 @@
 	   (a lambda expression).  So in the `eval' case I'll just
 	   convert it into a lambda expression.
 	   */
+#ifdef USE_KKCC
+	if (EQ (XMISC_USER_DATA_FUNCTION (XEVENT_DATA (event)), Qcall_interactively)
+	    && SYMBOLP (XMISC_USER_DATA_OBJECT (XEVENT_DATA (event))))
+	  Vthis_command = XMISC_USER_DATA_OBJECT (XEVENT_DATA (event));
+	else if (EQ (XMISC_USER_DATA_FUNCTION (XEVENT_DATA (event)), Qeval))
+	  Vthis_command =
+	    Fcons (Qlambda, Fcons (Qnil, XMISC_USER_DATA_OBJECT (XEVENT_DATA (event))));
+	else if (SYMBOLP (XMISC_USER_DATA_FUNCTION (XEVENT_DATA (event))))
+	  /* A scrollbar command or the like. */
+	  Vthis_command = XMISC_USER_DATA_FUNCTION (XEVENT_DATA (event));
+#else /* not USE_KKCC */
 	if (EQ (XEVENT (event)->event.eval.function, Qcall_interactively)
 	    && SYMBOLP (XEVENT (event)->event.eval.object))
 	  Vthis_command = XEVENT (event)->event.eval.object;
@@ -4463,6 +4695,7 @@
 	else if (SYMBOLP (XEVENT (event)->event.eval.function))
 	  /* A scrollbar command or the like. */
 	  Vthis_command = XEVENT (event)->event.eval.function;
+#endif /* not USE_KKCC */
 	else
 	  /* Huh? */
 	  Vthis_command = Qnil;
@@ -4479,10 +4712,8 @@
 	break;
       }
     default:
-      {
 	execute_internal_event (event);
 	break;
-      }
     }
   return Qnil;
 }
@@ -4556,7 +4787,11 @@
 	execute_internal_event (event);
       else
 	{
+#ifdef USE_KKCC
+	  if (XEVENT_TYPE (event) == misc_user_event)
+#else /* not USE_KKCC */
 	  if (XEVENT (event)->event_type == misc_user_event)
+#endif /* not USE_KKCC */
 	    reset_current_events (command_builder);
 	  result = lookup_command_event (command_builder, event, 1);
 	  if (!KEYMAPP (result))
@@ -4623,11 +4858,19 @@
   if (NILP (Vdribble_file))
     return;
 
+#ifdef USE_KKCC
+  if (XEVENT_TYPE (event) == key_press_event &&
+      !XKEY_DATA_MODIFIERS (XEVENT_DATA (event)))
+    {
+      Lisp_Object keysym = XKEY_DATA_KEYSYM (XEVENT_DATA (event));
+      if (CHARP (XKEY_DATA_KEYSYM (XEVENT_DATA (event))))
+#else /* not USE_KKCC */
   if (XEVENT (event)->event_type == key_press_event &&
       !XEVENT (event)->event.key.modifiers)
     {
       Lisp_Object keysym = XEVENT (event)->event.key.keysym;
       if (CHARP (XEVENT (event)->event.key.keysym))
+#endif /* not USE_KKCC */
 	{
 	  Ichar ch = XCHAR (keysym);
 	  Ibyte str[MAX_ICHAR_LEN];
Index: src/event-tty.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-tty.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- src/event-tty.c	2002/06/20 21:18:29	1.10
+++ src/event-tty.c	2002/07/29 09:21:18	1.11
@@ -66,13 +66,21 @@
 static void
 tty_timeout_to_emacs_event (Lisp_Event *emacs_event)
 {
-  emacs_event->event_type = timeout_event;
   /* timeout events have nil as channel */
+#ifdef USE_KKCC
+  SET_EVENT_TYPE (emacs_event, timeout_event);
+  SET_EVENT_TIMESTAMP_ZERO (emacs_event); /* #### */
+  XSET_TIMEOUT_DATA_INTERVAL_ID (EVENT_DATA (emacs_event), pop_low_level_timeout (&tty_timer_queue, 0));
+  XSET_TIMEOUT_DATA_FUNCTION (EVENT_DATA (emacs_event), Qnil);
+  XSET_TIMEOUT_DATA_OBJECT (EVENT_DATA (emacs_event), Qnil);
+#else /* not USE_KKCC */
+  emacs_event->event_type = timeout_event;
   emacs_event->timestamp  = 0; /* #### */
   emacs_event->event.timeout.interval_id =
     pop_low_level_timeout (&tty_timer_queue, 0);
   emacs_event->event.timeout.function = Qnil;
   emacs_event->event.timeout.object = Qnil;
+#endif /* not USE_KKCC */
 }
 
 
@@ -160,10 +168,17 @@
 
 		  assert (p);
 		  process = wrap_process (p);
+#ifdef USE_KKCC
+		  set_event_type (emacs_event, process_event);
+		  /* process events have nil as channel */
+		  SET_EVENT_TIMESTAMP_ZERO (emacs_event); /* #### */
+		  XSET_PROCESS_DATA_PROCESS (EVENT_DATA (emacs_event), process);
+#else /* not USE_KKCC */
 		  emacs_event->event_type = process_event;
 		  /* process events have nil as channel */
 		  emacs_event->timestamp  = 0; /* #### */
 		  emacs_event->event.process.process = process;
+#endif /* not USE_KKCC */
 		  return;
 		}
 	    }
@@ -172,10 +187,17 @@
 	  /* Return a dummy event, so that a cycle of the command loop will
 	     occur. */
 	  drain_signal_event_pipe ();
+#ifdef USE_KKCC
+	  set_event_type (emacs_event, eval_event);
+	  /* eval events have nil as channel */
+	  XSET_EVAL_DATA_FUNCTION (EVENT_DATA (emacs_event), Qidentity);
+	  XSET_EVAL_DATA_OBJECT (EVENT_DATA (emacs_event), Qnil);
+#else /* not USE_KKCC */
 	  emacs_event->event_type = eval_event;
 	  /* eval events have nil as channel */
 	  emacs_event->event.eval.function = Qidentity;
 	  emacs_event->event.eval.object = Qnil;
+#endif /* not USE_KKCC */
 	  return;
 	}
       else if (ndesc == 0) /* timeout fired */
Index: src/events.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/events.c,v
retrieving revision 1.53
retrieving revision 1.57
diff -u -r1.53 -r1.57
--- src/events.c	2002/06/20 21:18:30	1.53
+++ src/events.c	2002/08/13 11:37:32	1.57
@@ -41,6 +41,10 @@
 
 #include "console-tty-impl.h" /* for stuff in character_to_event */
 
+#ifdef USE_KKCC
+#include "console-x.h"
+#endif /* USE_KKCC */
+
 /* Where old events go when they are explicitly deallocated.
    The event chain here is cut loose before GC, so these will be freed
    eventually.
@@ -69,6 +73,641 @@
   Vevent_resource = Qnil;
 }
 
+#ifdef USE_KKCC
+/* Make sure we lose quickly if we try to use this event */
+static void
+deinitialize_event (Lisp_Object ev)
+{
+  Lisp_Event *event = XEVENT (ev);
+
+  set_event_type (event, dead_event);
+  SET_EVENT_CHANNEL (event, Qnil);
+  set_lheader_implementation (&event->lheader, &lrecord_event);
+  XSET_EVENT_NEXT (ev, Qnil);
+  XSET_EVENT_DATA (ev, Qnil);
+}
+
+/* Set everything to zero or nil so that it's predictable. */
+void
+zero_event (Lisp_Event *e)
+{
+  SET_EVENT_DATA (e, Qnil);
+  set_event_type (e, empty_event);
+  SET_EVENT_NEXT (e, Qnil);
+  SET_EVENT_CHANNEL (e, Qnil);
+  SET_EVENT_TIMESTAMP_ZERO (e);
+}
+
+static const struct lrecord_description event_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Event, next) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Event, channel) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Event, event_data) },
+  { XD_END }
+};
+
+static Lisp_Object
+mark_event (Lisp_Object obj)
+{
+  mark_object (XEVENT_DATA(obj));
+  mark_object (XEVENT_CHANNEL(obj));
+  return (XEVENT_NEXT(obj));
+}
+
+
+static const struct lrecord_description key_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Key_Data, keysym) },
+  { XD_END }
+};
+
+static Lisp_Object
+mark_key_data (Lisp_Object obj)
+{
+  return (XKEY_DATA_KEYSYM(obj));
+}
+
+
+static const struct lrecord_description button_data_description [] = {
+  { XD_END }
+};
+
+static Lisp_Object
+mark_button_data (Lisp_Object obj)
+{
+  return Qnil;
+}
+
+
+static const struct lrecord_description motion_data_description [] = {
+  { XD_END }
+};
+
+static Lisp_Object
+mark_motion_data (Lisp_Object obj)
+{
+  return Qnil;
+}
+
+
+static const struct lrecord_description process_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Process_Data, process) },
+  { XD_END }
+};
+
+static Lisp_Object
+mark_process_data (Lisp_Object obj)
+{
+  return (XPROCESS_DATA_PROCESS(obj));
+}
+
+
+static const struct lrecord_description timeout_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Timeout_Data, function) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Timeout_Data, object) },
+  { XD_END }
+};
+
+static Lisp_Object
+mark_timeout_data (Lisp_Object obj)
+{
+  mark_object (XTIMEOUT_DATA_FUNCTION(obj));
+  return (XTIMEOUT_DATA_OBJECT(obj));
+}
+
+
+static const struct lrecord_description eval_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Eval_Data, function) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Eval_Data, object) },
+  { XD_END }
+};
+
+static Lisp_Object
+mark_eval_data (Lisp_Object obj)
+{
+  mark_object (XEVAL_DATA_FUNCTION(obj));
+  return (XEVAL_DATA_OBJECT(obj));
+}
+
+
+static const struct lrecord_description misc_user_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Misc_User_Data, function) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Misc_User_Data, object) },
+  { XD_END }
+};
+
+static Lisp_Object
+mark_misc_user_data (Lisp_Object obj)
+{
+  mark_object (XMISC_USER_DATA_FUNCTION(obj));
+  return (XMISC_USER_DATA_OBJECT(obj));
+}
+
+
+static const struct lrecord_description magic_eval_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Magic_Eval_Data, object) },
+  { XD_END }
+};
+
+static Lisp_Object
+mark_magic_eval_data (Lisp_Object obj)
+{
+  return (XMAGIC_EVAL_DATA_OBJECT(obj));
+}
+
+
+static const struct lrecord_description magic_data_description [] = {
+  { XD_END }
+};
+
+static Lisp_Object
+mark_magic_data (Lisp_Object obj)
+{
+  return Qnil;
+}
+
+
+
+static void
+print_event (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  if (print_readably)
+    printing_unreadable_object ("#<event>");
+
+  switch (XEVENT_TYPE (obj))
+    {
+    case key_press_event:
+      write_c_string (printcharfun, "#<keypress-event ");
+      break;
+    case button_press_event:
+      write_c_string (printcharfun, "#<buttondown-event ");
+      break;
+    case button_release_event:
+      write_c_string (printcharfun, "#<buttonup-event ");
+      break;
+    case magic_eval_event:
+      write_c_string (printcharfun, "#<magic-eval-event ");
+      break;
+    case magic_event:
+      write_c_string (printcharfun, "#<magic-event ");         
+      break;
+    case pointer_motion_event:
+      write_c_string (printcharfun, "#<motion-event ");
+      break;
+    case process_event:
+	write_c_string (printcharfun, "#<process-event ");
+	break;
+    case timeout_event:
+	write_c_string (printcharfun, "#<timeout-event ");
+	break;
+    case misc_user_event:
+	write_c_string (printcharfun, "#<misc-user-event ");
+	break;
+    case eval_event:
+	write_c_string (printcharfun, "#<eval-event ");
+	break;
+    case empty_event:
+	write_c_string (printcharfun, "#<empty-event>");
+        return;
+    case dead_event:
+	write_c_string (printcharfun, "#<DEALLOCATED-EVENT>");
+        return;
+    default:
+	write_c_string (printcharfun, "#<UNKNOWN-EVENT-TYPE>");
+        return;
+      }
+  
+  print_internal (XEVENT_DATA (obj), printcharfun, 1);
+  write_c_string (printcharfun, ">");
+}
+
+
+static void
+print_key_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  char buf[128];
+  if (print_readably)
+    printing_unreadable_object ("#<key_data>");
+
+  sprintf (buf, "#<key_data ");
+  /*  format_event_data_object (buf + 11, obj, 0);
+  sprintf (buf + strlen (buf), ">");
+  write_c_string (printcharfun, buf);*/
+}
+
+static void
+print_button_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  char buf[128];
+  if (print_readably)
+    printing_unreadable_object ("#<button_data>");
+
+  sprintf (buf, "#<button_data ");
+  /*  format_event_data_object (buf + 14, obj, 0);
+  sprintf (buf + strlen (buf), ">");
+  write_c_string (printcharfun, buf);*/
+}
+
+
+static void
+print_motion_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  char buf[64];
+
+  if (print_readably)
+    printing_unreadable_object ("#<motion_data>");
+
+  sprintf (buf, "#<motion-data %ld, %ld>",
+	   (long) XMOTION_DATA_X (obj),
+	   (long) XMOTION_DATA_Y (obj));
+  write_c_string (printcharfun, buf);
+}
+
+
+static void
+print_process_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  if (print_readably)
+    printing_unreadable_object ("#<process_data>");
+
+  write_c_string (printcharfun, "#<process-data ");
+  print_internal (XPROCESS_DATA_PROCESS (obj), printcharfun, 1);
+  write_c_string (printcharfun, ">");
+}
+
+
+static void
+print_timeout_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  if (print_readably)
+    printing_unreadable_object ("#<timeout_data>");
+
+  write_c_string (printcharfun, "#<timeout-data ");
+  print_internal (XTIMEOUT_DATA_OBJECT (obj), printcharfun, 1);
+  write_c_string (printcharfun, ">");
+}
+
+
+static void
+print_eval_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  if (print_readably)
+    printing_unreadable_object ("#<eval_data>");
+
+  write_c_string (printcharfun, "#<eval-data ");
+  print_internal (XEVAL_DATA_FUNCTION (obj), printcharfun, 1);
+  write_c_string (printcharfun, " ");
+  print_internal (XEVAL_DATA_OBJECT (obj), printcharfun, 1);
+  write_c_string (printcharfun, ">");
+}
+
+
+static void
+print_misc_user_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  if (print_readably)
+    printing_unreadable_object ("#<misc_user_data>");
+
+  write_c_string (printcharfun, "#<misc-user-data ");
+  print_internal (XMISC_USER_DATA_FUNCTION (obj), printcharfun, 1);
+  write_c_string (printcharfun, " ");
+  print_internal (XMISC_USER_DATA_OBJECT (obj), printcharfun, 1);
+  write_c_string (printcharfun, ">");
+}
+
+
+static void
+print_magic_eval_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  //  char buf[128];
+
+  if (print_readably)
+    printing_unreadable_object ("#<magic_eval_data>");
+
+  /*  format_event_data_object (buf + 18, obj, 0);*/
+}
+
+
+static void
+print_magic_data (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  char buf[128];
+
+  if (print_readably)
+    printing_unreadable_object ("#<magic_data>");
+
+  sprintf (buf, "#<magic-data ");
+  /*  format_event_data_object (buf + 13, obj, 0);
+  sprintf (buf + strlen (buf), ">");
+  write_c_string (print_readably, buf);*/
+}
+
+
+static int
+event_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  Lisp_Event *e1 = XEVENT (obj1);
+  Lisp_Event *e2 = XEVENT (obj2);
+
+  if (EVENT_TYPE (e1) != EVENT_TYPE (e2)) return 0;
+  if (!EQ (EVENT_CHANNEL (e1), EVENT_CHANNEL (e2))) return 0;
+/*  if (EVENT_TIMESTAMP (e1) != EVENT_TIMESTAMP (e2)) return 0; */
+  switch (EVENT_TYPE (e1))
+    {
+    default: abort ();
+
+    case process_event:
+    case timeout_event:
+    case pointer_motion_event:
+    case key_press_event:
+    case button_press_event:
+    case button_release_event:
+    case misc_user_event:
+    case eval_event:
+    case magic_eval_event:
+      return internal_equal (EVENT_DATA (e1), EVENT_DATA (e2), 0);
+
+    case magic_event:
+      {
+	struct console *con = XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e1)));
+
+#ifdef HAVE_X_WINDOWS
+	if (CONSOLE_X_P (con))
+	  return (XMAGIC_DATA_X_EVENT (EVENT_DATA (e1)).xany.serial ==
+		  XMAGIC_DATA_X_EVENT (EVENT_DATA (e2)).xany.serial);
+#endif
+#ifdef HAVE_GTK
+	if (CONSOLE_GTK_P (con))
+	  return (XMAGIC_DATA_GTK_EVENT (EVENT_DATA (e1)) ==
+		  XMAGIC_DATA_GTK_EVENT (EVENT_DATA (e2)));
+#endif
+#ifdef HAVE_MS_WINDOWS
+	if (CONSOLE_MSWINDOWS_P (con))
+	  return (XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA (e1)) ==
+		  XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA (e2)));
+#endif
+	abort ();
+	return 1; /* not reached */
+      }
+
+    case empty_event:      /* Empty and deallocated events are equal. */
+    case dead_event:
+      return 1;
+    }
+}
+
+static int
+key_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  return (EQ (XKEY_DATA_KEYSYM (obj1), XKEY_DATA_KEYSYM (obj2)) &&
+          (XKEY_DATA_MODIFIERS (obj1) == XKEY_DATA_MODIFIERS (obj2)));
+}
+
+static int
+button_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  return (XBUTTON_DATA_BUTTON (obj1) == XBUTTON_DATA_BUTTON (obj2) &&
+          XBUTTON_DATA_MODIFIERS (obj1) == XBUTTON_DATA_MODIFIERS (obj2));
+}
+
+static int
+motion_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  return (XMOTION_DATA_X (obj1) == XMOTION_DATA_X (obj2) &&
+          XMOTION_DATA_Y (obj1) == XMOTION_DATA_Y (obj2));
+}
+
+static int
+process_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  return EQ (XPROCESS_DATA_PROCESS (obj1), XPROCESS_DATA_PROCESS (obj2));
+}
+
+static int
+timeout_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  return (internal_equal (XTIMEOUT_DATA_FUNCTION (obj1),
+                          XTIMEOUT_DATA_FUNCTION (obj2), 0) &&
+          internal_equal (XTIMEOUT_DATA_OBJECT (obj1),
+                          XTIMEOUT_DATA_OBJECT (obj2), 0));
+}
+
+static int
+eval_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  return (internal_equal (XEVAL_DATA_FUNCTION (obj1),
+                          XEVAL_DATA_FUNCTION (obj2), 0) &&
+          internal_equal (XEVAL_DATA_OBJECT (obj1),
+                          XEVAL_DATA_OBJECT (obj2), 0));
+}
+
+static int
+misc_user_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  return (internal_equal (XMISC_USER_DATA_FUNCTION (obj1), 
+                          XMISC_USER_DATA_FUNCTION (obj2), 0) &&
+          internal_equal (XMISC_USER_DATA_OBJECT (obj1), 
+                          XMISC_USER_DATA_OBJECT (obj2), 0) &&
+	      /* is this really needed for equality
+	         or is x and y also important? */
+          XMISC_USER_DATA_BUTTON (obj1) == XMISC_USER_DATA_BUTTON (obj2) &&
+          XMISC_USER_DATA_MODIFIERS (obj1) == 
+          XMISC_USER_DATA_MODIFIERS (obj2));
+}
+
+static int
+magic_eval_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  return (XMAGIC_EVAL_DATA_INTERNAL_FUNCTION (obj1) ==
+          XMAGIC_EVAL_DATA_INTERNAL_FUNCTION (obj2) &&
+          internal_equal (XMAGIC_EVAL_DATA_OBJECT (obj1),
+                          XMAGIC_EVAL_DATA_OBJECT (obj2), 0));
+}
+
+static int
+magic_data_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{assert (0); return 0;}
+
+static unsigned long
+event_hash (Lisp_Object obj, int depth)
+{
+  Lisp_Event *e = XEVENT (obj);
+  unsigned long hash;
+
+  hash = HASH2 (EVENT_TYPE (e), LISP_HASH (EVENT_CHANNEL (e)));
+  switch (EVENT_TYPE (e))
+    {
+    case process_event:
+    case timeout_event:
+    case key_press_event:
+    case button_press_event:
+    case button_release_event:
+    case pointer_motion_event:
+    case misc_user_event:
+    case eval_event:
+    case magic_eval_event:
+      return HASH2 (hash, internal_hash (EVENT_DATA (e), depth + 1));
+
+    case magic_event:
+      {
+	struct console *con = XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e)));
+#ifdef HAVE_X_WINDOWS
+	if (CONSOLE_X_P (con))
+	  return HASH2 (hash, XMAGIC_DATA_X_EVENT (EVENT_DATA (e)).xany.serial);
+#endif
+#ifdef HAVE_GTK
+	if (CONSOLE_GTK_P (con))
+	  return HASH2 (hash, XMAGIC_DATA_GTK_EVENT (EVENT_DATA (e)));
+#endif
+#ifdef HAVE_MS_WINDOWS
+	if (CONSOLE_MSWINDOWS_P (con))
+	  return HASH2 (hash, XMAGIC_DATA_MSWINDOWS_EVENT (EVENT_DATA (e)));
+#endif
+	abort ();
+	return 0;
+      }
+
+    case empty_event:
+    case dead_event:
+      return hash;
+
+    default:
+      abort ();
+    }
+
+  return 0; /* unreached */
+}
+
+static unsigned long
+key_data_hash (Lisp_Object obj, int depth)
+{
+  return HASH2 (LISP_HASH (XKEY_DATA_KEYSYM (obj)),
+                XKEY_DATA_MODIFIERS (obj));
+}
+
+static unsigned long
+button_data_hash (Lisp_Object obj, int depth)
+{
+  return HASH2 (XBUTTON_DATA_BUTTON (obj), XBUTTON_DATA_MODIFIERS (obj));
+}
+
+static unsigned long
+motion_data_hash (Lisp_Object obj, int depth)
+{
+  return HASH2 (XMOTION_DATA_X (obj), XMOTION_DATA_Y (obj));
+}
+
+static unsigned long
+process_data_hash (Lisp_Object obj, int depth)
+{
+  return LISP_HASH (XPROCESS_DATA_PROCESS (obj));
+}
+
+static unsigned long
+timeout_data_hash (Lisp_Object obj, int depth)
+{
+  return HASH2 (internal_hash (XTIMEOUT_DATA_FUNCTION (obj), depth + 1),
+                internal_hash (XTIMEOUT_DATA_OBJECT (obj), depth + 1));
+}
+
+static unsigned long
+eval_data_hash (Lisp_Object obj, int depth)
+{
+  return HASH2 (internal_hash (XEVAL_DATA_FUNCTION (obj), depth + 1),
+                internal_hash (XEVAL_DATA_OBJECT (obj), depth + 1));
+}
+
+static unsigned long
+misc_user_data_hash (Lisp_Object obj, int depth)
+{
+  return HASH4 (internal_hash (XMISC_USER_DATA_FUNCTION (obj), depth + 1),
+                internal_hash (XMISC_USER_DATA_OBJECT (obj), depth + 1),
+                XMISC_USER_DATA_BUTTON (obj), XMISC_USER_DATA_MODIFIERS (obj));
+}
+
+static unsigned long
+magic_eval_data_hash (Lisp_Object obj, int depth)
+{
+  return HASH2 ((unsigned long) XMAGIC_EVAL_DATA_INTERNAL_FUNCTION (obj),
+                internal_hash (XMAGIC_EVAL_DATA_OBJECT (obj), depth + 1));
+}
+
+static unsigned long
+magic_data_hash (Lisp_Object obj, int depth)
+{assert(0); return 1;}
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("key-data", key_data,
+				     0, /*dumpable-flag*/
+				     mark_key_data, 
+				     print_key_data, 0, 
+				     key_data_equal, key_data_hash,
+				     key_data_description, 
+				     Lisp_Key_Data);
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("button-data", button_data,
+				     0, /*dumpable-flag*/
+				     mark_button_data, print_button_data, 0, 
+				     button_data_equal, button_data_hash,
+				     button_data_description, 
+				     Lisp_Button_Data);
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("motion-data", motion_data,
+				     0, /*dumpable-flag*/
+				     mark_motion_data, print_motion_data, 0, 
+				     motion_data_equal, motion_data_hash,
+				     motion_data_description,
+				     Lisp_Motion_Data);
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("process-data", process_data,
+				     0, /*dumpable-flag*/
+				     mark_process_data, 
+				     print_process_data, 0,
+				     process_data_equal, process_data_hash,
+				     process_data_description,
+				     Lisp_Process_Data);
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("timeout-data", timeout_data,
+				     0, /*dumpable-flag*/
+				     mark_timeout_data,
+				     print_timeout_data, 0,
+				     timeout_data_equal, timeout_data_hash,
+				     timeout_data_description,
+				     Lisp_Timeout_Data);
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("eval-data", eval_data,
+				     0, /*dumpable-flag*/
+				     mark_eval_data, 
+				     print_eval_data, 0, 
+				     eval_data_equal, eval_data_hash,
+				     eval_data_description,
+				     Lisp_Eval_Data);
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("misc-user-data", misc_user_data,
+				     0, /*dumpable-flag*/
+				     mark_misc_user_data,
+				     print_misc_user_data,
+				     0, misc_user_data_equal, 
+				     misc_user_data_hash,
+				     misc_user_data_description, 
+				     Lisp_Misc_User_Data);
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("magic-eval-data", magic_eval_data,
+				     0, /*dumpable-flag*/
+				     mark_magic_eval_data, 
+				     print_magic_eval_data, 0, 
+				     magic_eval_data_equal,
+				     magic_eval_data_hash,
+				     magic_eval_data_description, 
+				     Lisp_Magic_Eval_Data);
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("magic-data", magic_data,
+				     0, /*dumpable-flag*/
+				     mark_magic_data, print_magic_data, 0,
+				     magic_data_equal, magic_data_hash,
+				     magic_data_description,
+				     Lisp_Magic_Data);
+
+
+
+#else /* not USE_KKCC */
 /* Make sure we lose quickly if we try to use this event */
 static void
 deinitialize_event (Lisp_Object ev)
@@ -323,10 +962,19 @@
 
   return 0; /* unreached */
 }
+#endif /* not USE_KKCC */
+
 
+#ifdef USE_KKCC
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("event", event,
+				     0, /*dumpable-flag*/
+				     mark_event, print_event, 0, event_equal,
+				     event_hash, 0/*event_description*/, Lisp_Event);
+#else /* not USE_KKCC */
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("event", event,
 				     mark_event, print_event, 0, event_equal,
 				     event_hash, 0, Lisp_Event);
+#endif /* not USE_KKCC */
 
 DEFUN ("make-event", Fmake_event, 0, 2, 0, /*
 Return a new event of type TYPE, with properties described by PLIST.
@@ -404,7 +1052,11 @@
          PLIST.  In fact, processing PLIST would be wrong, because the
          sanitizing process would fill in the properties
          (e.g. CHANNEL), which we don't want in empty events.  */
+#ifdef USE_KKCC
+      set_event_type (e, empty_event);
+#else /* not USE_KKCC */
       e->event_type = empty_event;
+#endif /* not USE_KKCC */
       if (!NILP (plist))
 	invalid_operation ("Cannot set properties of empty event", plist);
       UNGCPRO;
@@ -412,19 +1064,42 @@
     }
   else if (EQ (type, Qkey_press))
     {
+#ifdef USE_KKCC
+      set_event_type (e, key_press_event);
+      XSET_KEY_DATA_KEYSYM (EVENT_DATA (e), Qunbound);
+#else /* not USE_KKCC */
       e->event_type = key_press_event;
       e->event.key.keysym = Qunbound;
+#endif /* not USE_KKCC */
     }
   else if (EQ (type, Qbutton_press))
+#ifdef USE_KKCC
+    set_event_type (e, button_press_event);
+#else /* not USE_KKCC */
     e->event_type = button_press_event;
+#endif /* not USE_KKCC */
   else if (EQ (type, Qbutton_release))
+#ifdef USE_KKCC
+    set_event_type (e, button_release_event);
+#else /* not USE_KKCC */
     e->event_type = button_release_event;
+#endif /* not USE_KKCC */
   else if (EQ (type, Qmotion))
+#ifdef USE_KKCC
+    set_event_type (e, pointer_motion_event);
+#else /* not USE_KKCC */
     e->event_type = pointer_motion_event;
+#endif /* not USE_KKCC */
   else if (EQ (type, Qmisc_user))
     {
+#ifdef USE_KKCC
+      set_event_type (e, misc_user_event);
+      XSET_MISC_USER_DATA_FUNCTION (EVENT_DATA (e), Qnil); 
+      XSET_MISC_USER_DATA_OBJECT (EVENT_DATA (e), Qnil);
+#else /* not USE_KKCC */
       e->event_type = misc_user_event;
       e->event.eval.function = e->event.eval.object = Qnil;
+#endif /* not USE_KKCC */
     }
   else
     {
@@ -445,7 +1120,11 @@
       {
 	if (EQ (keyword, Qchannel))
 	  {
+#ifdef USE_KKCC
+	    if (EVENT_TYPE(e) == key_press_event)
+#else /* not USE_KKCC */
 	    if (e->event_type == key_press_event)
+#endif /* not USE_KKCC */
 	      {
 		if (!CONSOLEP (value))
 		  value = wrong_type_argument (Qconsolep, value);
@@ -459,12 +1138,20 @@
 	  }
 	else if (EQ (keyword, Qkey))
 	  {
+#ifdef USE_KKCC
+	    switch (EVENT_TYPE(e))
+#else /* not USE_KKCC */
 	    switch (e->event_type)
+#endif /* not USE_KKCC */
 	      {
 	      case key_press_event:
 		if (!SYMBOLP (value) && !CHARP (value))
 		  invalid_argument ("Invalid event key", value);
+#ifdef USE_KKCC
+		XSET_KEY_DATA_KEYSYM (EVENT_DATA(e), value);
+#else /* not USE_KKCC */
 		e->event.key.keysym = value;
+#endif /* not USE_KKCC */
 		break;
 	      default:
 		WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
@@ -476,14 +1163,26 @@
 	    CHECK_NATNUM (value);
 	    check_int_range (XINT (value), 0, 7);
 
+#ifdef USE_KKCC
+	    switch (EVENT_TYPE(e))
+#else /* not USE_KKCC */
 	    switch (e->event_type)
+#endif /* not USE_KKCC */
 	      {
 	      case button_press_event:
 	      case button_release_event:
+#ifdef USE_KKCC
+		XSET_BUTTON_DATA_BUTTON (EVENT_DATA (e), XINT (value));
+#else /* not USE_KKCC */
 		e->event.button.button = XINT (value);
+#endif /* not USE_KKCC */
 		break;
 	      case misc_user_event:
+#ifdef USE_KKCC
+		XSET_MISC_USER_DATA_BUTTON (EVENT_DATA (e), XINT (value));
+#else /* not USE_KKCC */
 		e->event.misc.button = XINT (value);
+#endif /* not USE_KKCC */
 		break;
 	      default:
 		WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
@@ -512,20 +1211,40 @@
 		  invalid_constant ("Invalid key modifier", sym);
 	      }
 
+#ifdef USE_KKCC
+	    switch (EVENT_TYPE(e))
+#else /* not USE_KKCC */
 	    switch (e->event_type)
+#endif /* not USE_KKCC */
 	      {
 	      case key_press_event:
+#ifdef USE_KKCC
+                XSET_KEY_DATA_MODIFIERS (EVENT_DATA (e), modifiers);
+#else /* not USE_KKCC */
 		e->event.key.modifiers = modifiers;
+#endif /* not USE_KKCC */
 		break;
 	      case button_press_event:
 	      case button_release_event:
+#ifdef USE_KKCC
+                XSET_BUTTON_DATA_MODIFIERS (EVENT_DATA (e), modifiers);
+#else /* not USE_KKCC */
 		e->event.button.modifiers = modifiers;
+#endif /* not USE_KKCC */
 		break;
 	      case pointer_motion_event:
+#ifdef USE_KKCC
+                XSET_MOTION_DATA_MODIFIERS (EVENT_DATA (e), modifiers);
+#else /* not USE_KKCC */
 		e->event.motion.modifiers = modifiers;
+#endif /* not USE_KKCC */
 		break;
 	      case misc_user_event:
+#ifdef USE_KKCC
+                XSET_MISC_USER_DATA_MODIFIERS (EVENT_DATA (e), modifiers);
+#else /* not USE_KKCC */
 		e->event.misc.modifiers = modifiers;
+#endif /* not USE_KKCC */
 		break;
 	      default:
 		WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
@@ -534,7 +1253,11 @@
 	  }
 	else if (EQ (keyword, Qx))
 	  {
+#ifdef USE_KKCC
+	    switch (EVENT_TYPE(e))
+#else /* not USE_KKCC */
 	    switch (e->event_type)
+#endif /* not USE_KKCC */
 	      {
 	      case pointer_motion_event:
 	      case button_press_event:
@@ -552,7 +1275,11 @@
 	  }
 	else if (EQ (keyword, Qy))
 	  {
+#ifdef USE_KKCC
+	    switch (EVENT_TYPE(e))
+#else /* not USE_KKCC */
 	    switch (e->event_type)
+#endif /* not USE_KKCC */
 	      {
 	      case pointer_motion_event:
 	      case button_press_event:
@@ -570,14 +1297,26 @@
 	else if (EQ (keyword, Qtimestamp))
 	  {
 	    CHECK_NATNUM (value);
+#ifdef USE_KKCC
+	    SET_EVENT_TIMESTAMP (e, XINT (value));
+#else /* not USE_KKCC */
 	    e->timestamp = XINT (value);
+#endif /* not USE_KKCC */
 	  }
 	else if (EQ (keyword, Qfunction))
 	  {
+#ifdef USE_KKCC
+	    switch (EVENT_TYPE(e))
+#else /* not USE_KKCC */
 	    switch (e->event_type)
+#endif /* not USE_KKCC */
 	      {
 	      case misc_user_event:
+#ifdef USE_KKCC
+                XSET_MISC_USER_DATA_FUNCTION (EVENT_DATA (e), value);
+#else /* not USE_KKCC */
 		e->event.eval.function = value;
+#endif /* not USE_KKCC */
 		break;
 	      default:
 		WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
@@ -586,10 +1325,18 @@
 	  }
 	else if (EQ (keyword, Qobject))
 	  {
+#ifdef USE_KKCC
+	    switch (EVENT_TYPE(e))
+#else /* not USE_KKCC */
 	    switch (e->event_type)
+#endif /* not USE_KKCC */
 	      {
 	      case misc_user_event:
+#ifdef USE_KKCC
+                XSET_MISC_USER_DATA_OBJECT (EVENT_DATA (e), value);
+#else /* not USE_KKCC */
 		e->event.eval.object = value;
+#endif /* not USE_KKCC */
 		break;
 	      default:
 		WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
@@ -604,7 +1351,11 @@
   /* Insert the channel, if missing. */
   if (NILP (EVENT_CHANNEL (e)))
     {
+#ifdef USE_KKCC
+      if (EVENT_TYPE (e) == key_press_event)
+#else /* not USE_KKCC */
       if (e->event_type == key_press_event)
+#endif /* not USE_KKCC */
 	EVENT_CHANNEL (e) = Vselected_console;
       else
 	EVENT_CHANNEL (e) = Fselected_frame (Qnil);
@@ -620,17 +1371,32 @@
       switch (e->event_type)
 	{
 	case pointer_motion_event:
+#ifdef USE_KKCC
+	  XSET_MOTION_DATA_X (EVENT_DATA (e), coord_x);
+	  XSET_MOTION_DATA_Y (EVENT_DATA (e), coord_y);
+#else /* not USE_KKCC */
 	  e->event.motion.x = coord_x;
 	  e->event.motion.y = coord_y;
+#endif /* not USE_KKCC */
 	  break;
 	case button_press_event:
 	case button_release_event:
+#ifdef USE_KKCC
+	  XSET_BUTTON_DATA_X (EVENT_DATA (e), coord_x);
+	  XSET_BUTTON_DATA_Y (EVENT_DATA (e), coord_y);
+#else /* not USE_KKCC */
 	  e->event.button.x = coord_x;
 	  e->event.button.y = coord_y;
+#endif /* not USE_KKCC */
 	  break;
 	case misc_user_event:
+#ifdef USE_KKCC
+	  XSET_MISC_USER_DATA_X (EVENT_DATA (e), coord_x);
+	  XSET_MISC_USER_DATA_Y (EVENT_DATA (e), coord_y);
+#else /* not USE_KKCC */
 	  e->event.misc.x = coord_x;
 	  e->event.misc.y = coord_y;
+#endif /* not USE_KKCC */
 	  break;
 	default:
 	  abort();
@@ -638,27 +1404,47 @@
     }
 
   /* Finally, do some more validation.  */
+#ifdef USE_KKCC
+  switch (EVENT_TYPE(e))
+#else /* not USE_KKCC */
   switch (e->event_type)
+#endif /* not USE_KKCC */
     {
     case key_press_event:
+#ifdef USE_KKCC
+      if (UNBOUNDP (XKEY_DATA_KEYSYM (EVENT_DATA (e))))
+#else /* not USE_KKCC */
       if (UNBOUNDP (e->event.key.keysym))
+#endif /* not USE_KKCC */
 	sferror ("A key must be specified to make a keypress event",
 		      plist);
       break;
     case button_press_event:
+#ifdef USE_KKCC
+      if (!XBUTTON_DATA_BUTTON (EVENT_DATA (e)))
+#else /* not USE_KKCC */
       if (!e->event.button.button)
+#endif /* not USE_KKCC */
 	sferror
 	  ("A button must be specified to make a button-press event",
 	   plist);
       break;
     case button_release_event:
+#ifdef USE_KKCC
+      if (!XBUTTON_DATA_BUTTON (EVENT_DATA (e)))
+#else /* not USE_KKCC */
       if (!e->event.button.button)
+#endif /* not USE_KKCC */
 	sferror
 	  ("A button must be specified to make a button-release event",
 	   plist);
       break;
     case misc_user_event:
+#ifdef USE_KKCC
+      if (NILP (XMISC_USER_DATA_FUNCTION (EVENT_DATA (e))))
+#else /* not USE_KKCC */
       if (NILP (e->event.misc.function))
+#endif /* not USE_KKCC */
 	sferror ("A function must be specified to make a misc-user event",
 		      plist);
       break;
@@ -670,6 +1456,114 @@
   return event;
 }
 
+
+#ifdef USE_KKCC
+
+Lisp_Object 
+make_key_data (void)
+{
+  Lisp_Object data = allocate_key_data ();
+
+  XSET_KEY_DATA_KEYSYM (data, Qnil);
+  XSET_KEY_DATA_MODIFIERS (data, 0);  
+  
+  return data;
+}
+
+Lisp_Object
+make_button_data (void)
+{
+  Lisp_Object data = allocate_button_data ();
+
+  XSET_BUTTON_DATA_BUTTON (data, 0);
+  XSET_BUTTON_DATA_MODIFIERS (data, 0);
+  XSET_BUTTON_DATA_X (data, 0);
+  XSET_BUTTON_DATA_Y (data, 0);
+  
+  return data;
+}
+
+Lisp_Object
+make_motion_data (void)
+{
+  Lisp_Object data = allocate_motion_data ();
+
+  XSET_MOTION_DATA_X (data, 0);
+  XSET_MOTION_DATA_Y (data, 0);
+  XSET_MOTION_DATA_MODIFIERS (data, 0);
+  
+  return data;
+}
+
+Lisp_Object
+make_process_data (void)
+{
+  Lisp_Object data = allocate_process_data ();
+
+  XSET_PROCESS_DATA_PROCESS (data, Qnil);
+  
+  return data;
+}
+
+Lisp_Object
+make_timeout_data (void)
+{
+  Lisp_Object data = allocate_timeout_data ();
+
+  XSET_TIMEOUT_DATA_INTERVAL_ID (data, 0);
+  XSET_TIMEOUT_DATA_ID_NUMBER(data, 0);
+  XSET_TIMEOUT_DATA_FUNCTION(data, Qnil);
+  XSET_TIMEOUT_DATA_OBJECT (data, Qnil);
+  
+  return data;
+}
+
+Lisp_Object
+make_magic_eval_data (void)
+{
+  Lisp_Object data = allocate_magic_eval_data ();
+
+  XSET_MAGIC_EVAL_DATA_OBJECT (data, Qnil);
+  XSET_MAGIC_EVAL_DATA_INTERNAL_FUNOBJ (data, 0);
+  
+  return data;
+}
+
+Lisp_Object
+make_eval_data (void)
+{
+  Lisp_Object data = allocate_eval_data ();
+
+  XSET_EVAL_DATA_FUNCTION (data, Qnil);
+  XSET_EVAL_DATA_OBJECT (data, Qnil);  
+
+  return data;
+}
+
+Lisp_Object
+make_magic_data (void)
+{
+  return allocate_magic_data ();
+}
+
+Lisp_Object
+make_misc_user_data (void)
+{
+  Lisp_Object data = allocate_misc_user_data ();
+
+  XSET_MISC_USER_DATA_FUNCTION (data, Qnil);
+  XSET_MISC_USER_DATA_OBJECT (data, Qnil);
+  XSET_MISC_USER_DATA_BUTTON (data, 0);
+  XSET_MISC_USER_DATA_MODIFIERS (data, 0);
+  XSET_MISC_USER_DATA_X (data, 0);
+  XSET_MISC_USER_DATA_Y (data, 0);
+
+  return data;
+}
+#endif /* USE_KKCC */
+
+
+
 DEFUN ("deallocate-event", Fdeallocate_event, 1, 1, 0, /*
 Allow the given event structure to be reused.
 You MUST NOT use this event object after calling this function with it.
@@ -719,6 +1613,60 @@
   return Qnil;
 }
 
+#ifdef USE_KKCC
+void
+copy_event_data (Lisp_Object dest, Lisp_Object src)
+{
+  switch (XRECORD_LHEADER (dest)->type) {
+  case lrecord_type_key_data:
+    XSET_KEY_DATA_KEYSYM (dest, XKEY_DATA_KEYSYM (src));
+    XSET_KEY_DATA_MODIFIERS (dest, XKEY_DATA_MODIFIERS (src));
+    break;
+  case lrecord_type_button_data:
+    XSET_BUTTON_DATA_BUTTON (dest, XBUTTON_DATA_BUTTON (src));
+    XSET_BUTTON_DATA_MODIFIERS (dest, XBUTTON_DATA_MODIFIERS (src));
+    XSET_BUTTON_DATA_X (dest, XBUTTON_DATA_X (src));
+    XSET_BUTTON_DATA_Y (dest, XBUTTON_DATA_Y (src));
+    break;
+  case lrecord_type_motion_data:
+    XSET_MOTION_DATA_X (dest, XMOTION_DATA_X (src));
+    XSET_MOTION_DATA_Y (dest, XMOTION_DATA_Y (src));
+    XSET_MOTION_DATA_MODIFIERS (dest, XMOTION_DATA_MODIFIERS (src));
+    break;
+  case lrecord_type_process_data:
+    XSET_PROCESS_DATA_PROCESS (dest, XPROCESS_DATA_PROCESS (src));
+    break;
+  case lrecord_type_timeout_data:
+    XSET_TIMEOUT_DATA_INTERVAL_ID (dest, XTIMEOUT_DATA_INTERVAL_ID (src));
+    XSET_TIMEOUT_DATA_ID_NUMBER (dest, XTIMEOUT_DATA_ID_NUMBER (src));
+    XSET_TIMEOUT_DATA_FUNCTION (dest, XTIMEOUT_DATA_FUNCTION (src));
+    XSET_TIMEOUT_DATA_OBJECT (dest, XTIMEOUT_DATA_OBJECT (src));
+    break;
+  case lrecord_type_eval_data:
+    XSET_EVAL_DATA_FUNCTION (dest, XEVAL_DATA_FUNCTION (src));
+    XSET_EVAL_DATA_OBJECT (dest, XEVAL_DATA_OBJECT (src));
+    break;    
+  case lrecord_type_misc_user_data:
+    XSET_MISC_USER_DATA_FUNCTION (dest, XMISC_USER_DATA_FUNCTION (src));
+    XSET_MISC_USER_DATA_OBJECT (dest, XMISC_USER_DATA_OBJECT (src));
+    XSET_MISC_USER_DATA_BUTTON (dest, XMISC_USER_DATA_BUTTON (src));
+    XSET_MISC_USER_DATA_MODIFIERS (dest, XMISC_USER_DATA_MODIFIERS (src));
+    XSET_MISC_USER_DATA_X (dest, XMISC_USER_DATA_X (src));
+    XSET_MISC_USER_DATA_Y (dest, XMISC_USER_DATA_Y (src));
+    break;
+  case lrecord_type_magic_eval_data:
+    XSET_MAGIC_EVAL_DATA_INTERNAL_FUNCTION (dest, XMAGIC_EVAL_DATA_INTERNAL_FUNCTION (src));
+    XSET_MAGIC_EVAL_DATA_OBJECT (dest, XMAGIC_EVAL_DATA_OBJECT (src));
+    break;
+  case lrecord_type_magic_data:
+    XSET_MAGIC_DATA_UNDERLYING (dest, XMAGIC_DATA_UNDERLYING (src));
+    break;
+  default:
+    break;
+  }
+}
+#endif /* USE_KKCC */
+
 DEFUN ("copy-event", Fcopy_event, 1, 2, 0, /*
 Make a copy of the event object EVENT1.
 If a second event argument EVENT2 is given, EVENT1 is copied into
@@ -743,6 +1691,14 @@
   assert (XEVENT_TYPE (event1) <= last_event_type);
   assert (XEVENT_TYPE (event2) <= last_event_type);
 
+#ifdef USE_KKCC
+  XSET_EVENT_TYPE (event2, XEVENT_TYPE (event1));
+  XSET_EVENT_CHANNEL (event2, XEVENT_CHANNEL (event1));
+  XSET_EVENT_TIMESTAMP (event2, XEVENT_TIMESTAMP (event1));
+  copy_event_data (XEVENT_DATA (event2), XEVENT_DATA (event1));
+
+  return event2;
+#else /* not USE_KKCC */
   {
     Lisp_Event *ev2 = XEVENT (event2);
     Lisp_Event *ev1 = XEVENT (event1);
@@ -754,6 +1710,7 @@
 
     return event2;
   }
+#endif /* not USE_KKCC */
 }
 
 
@@ -964,7 +1921,11 @@
 {
   Lisp_Object k = Qnil;
   int m = 0;
+#ifdef USE_KKCC
+  if (EVENT_TYPE (event) == dead_event)
+#else /* not USE_KKCC */
   if (event->event_type == dead_event)
+#endif /* not USE_KKCC */
     invalid_argument ("character-to-event called with a deallocated event!", Qunbound);
 
 #ifndef MULE
@@ -1021,11 +1982,19 @@
   else if (c == ' ')
     k = QKspace;
 
+#ifdef USE_KKCC
+  set_event_type (event, key_press_event);
+  SET_EVENT_TIMESTAMP_ZERO (event); /* #### */
+  SET_EVENT_CHANNEL (event, wrap_console (con));
+  XSET_KEY_DATA_KEYSYM (EVENT_DATA (event), (!NILP (k) ? k : make_char (c)));
+  XSET_KEY_DATA_MODIFIERS (EVENT_DATA (event), m);
+#else /* not USE_KKCC */
   event->event_type	     = key_press_event;
   event->timestamp	     = 0; /* #### */
   event->channel	     = wrap_console (con);
   event->event.key.keysym    = (!NILP (k) ? k : make_char (c));
   event->event.key.modifiers = m;
+#endif /* not USE_KKCC */
 }
 
 /* This variable controls what character name -> character code mapping
@@ -1047,32 +2016,65 @@
   Ichar c = 0;
   Lisp_Object code;
 
+#ifdef USE_KKCC
+  if (EVENT_TYPE (event) != key_press_event)
+#else /* not USE_KKCC */
   if (event->event_type != key_press_event)
+#endif /* not USE_KKCC */
     {
+#ifdef USE_KKCC
+      assert (EVENT_TYPE (event) != dead_event);
+#else /* not USE_KKCC */
       assert (event->event_type != dead_event);
+#endif /* not USE_KKCC */
       return -1;
     }
   if (!allow_extra_modifiers &&
+#ifdef USE_KKCC
+      XKEY_DATA_MODIFIERS (EVENT_DATA (event)) & (XEMACS_MOD_SUPER|XEMACS_MOD_HYPER|XEMACS_MOD_ALT))
+#else /* not USE_KKCC */
       event->event.key.modifiers & (XEMACS_MOD_SUPER|XEMACS_MOD_HYPER|XEMACS_MOD_ALT))
+#endif /* not USE_KKCC */
     return -1;
+#ifdef USE_KKCC
+  if (CHAR_OR_CHAR_INTP (XKEY_DATA_KEYSYM (EVENT_DATA (event))))
+    c = XCHAR_OR_CHAR_INT (XKEY_DATA_KEYSYM (EVENT_DATA (event)));
+  else if (!SYMBOLP (XKEY_DATA_KEYSYM (EVENT_DATA (event))))
+#else /* not USE_KKCC */
   if (CHAR_OR_CHAR_INTP (event->event.key.keysym))
     c = XCHAR_OR_CHAR_INT (event->event.key.keysym);
   else if (!SYMBOLP (event->event.key.keysym))
+#endif /* not USE_KKCC */
     abort ();
   else if (allow_non_ascii && !NILP (Vcharacter_set_property)
 	   /* Allow window-system-specific extensibility of
 	      keysym->code mapping */
+#ifdef USE_KKCC
+	   && CHAR_OR_CHAR_INTP (code = Fget (XKEY_DATA_KEYSYM (EVENT_DATA (event)),
+					      Vcharacter_set_property,
+					      Qnil)))
+#else /* not USE_KKCC */
 	   && CHAR_OR_CHAR_INTP (code = Fget (event->event.key.keysym,
 					      Vcharacter_set_property,
 					      Qnil)))
+#endif /* not USE_KKCC */
     c = XCHAR_OR_CHAR_INT (code);
+#ifdef USE_KKCC
+  else if (CHAR_OR_CHAR_INTP (code = Fget (XKEY_DATA_KEYSYM (EVENT_DATA (event)),
+					   Qascii_character, Qnil)))
+#else /* not USE_KKCC */
   else if (CHAR_OR_CHAR_INTP (code = Fget (event->event.key.keysym,
 					   Qascii_character, Qnil)))
+#endif /* not USE_KKCC */
     c = XCHAR_OR_CHAR_INT (code);
   else
     return -1;
 
+#ifdef USE_KKCC
+  if (XKEY_DATA_MODIFIERS (EVENT_DATA (event)) & XEMACS_MOD_CONTROL)
+#else /* not USE_KKCC */
   if (event->event.key.modifiers & XEMACS_MOD_CONTROL)
+#endif /* not USE_KKCC */
     {
       if (c >= 'a' && c <= 'z')
 	c -= ('a' - 'A');
@@ -1090,7 +2092,11 @@
 	if (! allow_extra_modifiers) return -1;
     }
 
+#ifdef USE_KKCC
+  if (XKEY_DATA_MODIFIERS (EVENT_DATA (event)) & XEMACS_MOD_META)
+#else /* not USE_KKCC */
   if (event->event.key.modifiers & XEMACS_MOD_META)
+#endif /* not USE_KKCC */
     {
       if (! allow_meta) return -1;
       if (c & 0200) return -1;		/* don't allow M-oslash (overlap) */
@@ -1217,22 +2223,37 @@
   return head;
 }
 
+
 /* Concatenate a string description of EVENT onto the end of BUF.  If
    BRIEF, use short forms for keys, e.g. C- instead of control-. */
 
+#ifdef USE_KKCC
+void
+format_event_object (Eistring *buf, Lisp_Object event, int brief)
+#else /* not USE_KKCC */
 void
 format_event_object (Eistring *buf, Lisp_Event *event, int brief)
+#endif /* not USE_KKCC */
 {
   int mouse_p = 0;
   int mod = 0;
   Lisp_Object key;
 
+#ifdef USE_KKCC
+  switch (EVENT_TYPE (XEVENT(event)))
+#else /* not USE_KKCC */
   switch (event->event_type)
+#endif /* not USE_KKCC */
     {
     case key_press_event:
       {
+#ifdef USE_KKCC
+	mod = XKEY_DATA_MODIFIERS (XEVENT_DATA(event));
+	key = XKEY_DATA_KEYSYM (XEVENT_DATA(event));
+#else /* not USE_KKCC */
         mod = event->event.key.modifiers;
         key = event->event.key.keysym;
+#endif /* not USE_KKCC */
         /* Hack. */
         if (! brief && CHARP (key) &&
             mod & (XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER |
@@ -1252,8 +2273,13 @@
     case button_press_event:
       {
         mouse_p++;
+#ifdef USE_KKCC
+	mod = XBUTTON_DATA_MODIFIERS (XEVENT_DATA(event));
+	key = make_char (XBUTTON_DATA_BUTTON (XEVENT_DATA(event)) + '0');
+#else /* not USE_KKCC */
         mod = event->event.button.modifiers;
         key = make_char (event->event.button.button + '0');
+#endif /* not USE_KKCC */
         break;
       }
     case magic_event:
@@ -1263,7 +2289,11 @@
 	GCPRO1 (stream);
 
 	stream = make_resizing_buffer_output_stream ();
+#ifdef USE_KKCC
+	event_stream_format_magic_event (XEVENT(event), stream);
+#else /* not USE_KKCC */
 	event_stream_format_magic_event (event, stream);
+#endif /* not USE_KKCC */
 	Lstream_flush (XLSTREAM (stream));
 	eicat_raw (buf, resizing_buffer_stream_ptr (XLSTREAM (stream)),
 		   Lstream_byte_count (XLSTREAM (stream)));
@@ -1325,6 +2355,7 @@
     eicat_c (buf, "up");
 }
 
+
 DEFUN ("eventp", Feventp, 1, 1, 0, /*
 True if OBJECT is an event object.
 */
@@ -1338,8 +2369,13 @@
 */
        (object))
 {
+#ifdef USE_KKCC
+  return EVENTP (object) && XEVENT_TYPE (object) != dead_event ?
+    Qt : Qnil;
+#else /* not USE_KKCC */
   return EVENTP (object) && XEVENT (object)->event_type != dead_event ?
     Qt : Qnil;
+#endif /* not USE_KKCC */
 }
 
 #if 0 /* debugging functions */
@@ -1405,7 +2441,11 @@
        (event))
 {
   CHECK_LIVE_EVENT (event);
+#ifdef USE_KKCC
+  switch (XEVENT_TYPE (event))
+#else /* not USE_KKCC */
   switch (XEVENT (event)->event_type)
+#endif /* not USE_KKCC */
     {
     case key_press_event:	return Qkey_press;
     case button_press_event:	return Qbutton_press;
@@ -1441,8 +2481,13 @@
   /* This junk is so that timestamps don't get to be negative, but contain
      as many bits as this particular emacs will allow.
    */
+#ifdef USE_KKCC
+  return make_int (((1L << (VALBITS - 1)) - 1) &
+		      XEVENT_TIMESTAMP (event));
+#else /* not USE_KKCC */
   return make_int (((1L << (VALBITS - 1)) - 1) &
 		      XEVENT (event)->timestamp);
+#endif /* not USE_KKCC */
 }
 
 #define TIMESTAMP_HALFSPACE (1L << (VALBITS - 2))
@@ -1467,12 +2512,31 @@
     return t1 - t2 < TIMESTAMP_HALFSPACE ? Qnil : Qt;
 }
 
+#ifdef USE_KKCC
 #define CHECK_EVENT_TYPE(e,t1,sym) do {		\
   CHECK_LIVE_EVENT (e);				\
+  if (XEVENT_TYPE (e) != (t1))	        	\
+    e = wrong_type_argument (sym,e);		\
+} while (0)
+#else /* not USE_KKCC */
+#define CHECK_EVENT_TYPE(e,t1,sym) do {		\
+  CHECK_LIVE_EVENT (e);				\
   if (XEVENT(e)->event_type != (t1))		\
     e = wrong_type_argument (sym,e);		\
 } while (0)
+#endif /* not USE_KKCC */
 
+#ifdef USE_KKCC
+#define CHECK_EVENT_TYPE2(e,t1,t2,sym) do {		\
+  CHECK_LIVE_EVENT (e);					\
+  {							\
+    emacs_event_type CET_type = XEVENT_TYPE (e);	\
+    if (CET_type != (t1) &&				\
+	CET_type != (t2))				\
+      e = wrong_type_argument (sym,e);			\
+  }							\
+} while (0)
+#else /* not USE_KKCC */
 #define CHECK_EVENT_TYPE2(e,t1,t2,sym) do {		\
   CHECK_LIVE_EVENT (e);					\
   {							\
@@ -1482,7 +2546,20 @@
       e = wrong_type_argument (sym,e);			\
   }							\
 } while (0)
+#endif /* not USE_KKCC */
 
+#ifdef USE_KKCC
+#define CHECK_EVENT_TYPE3(e,t1,t2,t3,sym) do {		\
+  CHECK_LIVE_EVENT (e);					\
+  {							\
+    emacs_event_type CET_type = XEVENT_TYPE (e);	\
+    if (CET_type != (t1) &&				\
+	CET_type != (t2) &&				\
+	CET_type != (t3))				\
+      e = wrong_type_argument (sym,e);			\
+  }							\
+} while (0)
+#else /* not USE_KKCC */
 #define CHECK_EVENT_TYPE3(e,t1,t2,t3,sym) do {		\
   CHECK_LIVE_EVENT (e);					\
   {							\
@@ -1493,6 +2570,7 @@
       e = wrong_type_argument (sym,e);			\
   }							\
 } while (0)
+#endif /* not USE_KKCC */
 
 DEFUN ("event-key", Fevent_key, 1, 1, 0, /*
 Return the Keysym of the key-press event EVENT.
@@ -1501,7 +2579,11 @@
        (event))
 {
   CHECK_EVENT_TYPE (event, key_press_event, Qkey_press_event_p);
+#ifdef USE_KKCC
+  return XKEY_DATA_KEYSYM (XEVENT_DATA (event));
+#else /* not USE_KKCC */
   return XEVENT (event)->event.key.keysym;
+#endif /* not USE_KKCC */
 }
 
 DEFUN ("event-button", Fevent_button, 1, 1, 0, /*
@@ -1513,10 +2595,17 @@
   CHECK_EVENT_TYPE3 (event, button_press_event, button_release_event,
 		     misc_user_event, Qbutton_event_p);
 #ifdef HAVE_WINDOW_SYSTEM
+#ifdef USE_KKCC
+  if ( XEVENT_TYPE (event) == misc_user_event)
+    return make_int (XMISC_USER_DATA_BUTTON (XEVENT_DATA (event)));
+  else
+    return make_int (XBUTTON_DATA_BUTTON (XEVENT_DATA (event)));
+#else /* not USE_KKCC */
   if ( XEVENT (event)->event_type == misc_user_event)
     return make_int (XEVENT (event)->event.misc.button);
   else
     return make_int (XEVENT (event)->event.button.button);
+#endif /* not USE_KKCC */
 #else /* !HAVE_WINDOW_SYSTEM */
   return Qzero;
 #endif /* !HAVE_WINDOW_SYSTEM */
@@ -1532,6 +2621,23 @@
 {
  again:
   CHECK_LIVE_EVENT (event);
+#ifdef USE_KKCC
+  switch (XEVENT_TYPE (event))
+    {
+    case key_press_event:
+      return make_int (XKEY_DATA_MODIFIERS (XEVENT_DATA (event)));
+    case button_press_event:
+    case button_release_event:
+      return make_int (XBUTTON_DATA_MODIFIERS (XEVENT_DATA (event)));
+    case pointer_motion_event:
+      return make_int (XMOTION_DATA_MODIFIERS (XEVENT_DATA (event)));
+    case misc_user_event:
+      return make_int (XMISC_USER_DATA_MODIFIERS (XEVENT_DATA (event)));
+    default:
+      event = wrong_type_argument (intern ("key-or-mouse-event-p"), event);
+      goto again;
+    }
+#else /* not USE_KKCC */
   switch (XEVENT (event)->event_type)
     {
     case key_press_event:
@@ -1547,6 +2653,7 @@
       event = wrong_type_argument (intern ("key-or-mouse-event-p"), event);
       goto again;
     }
+#endif /* not USE_KKCC */
 }
 
 DEFUN ("event-modifiers", Fevent_modifiers, 1, 1, 0, /*
@@ -1619,6 +2726,26 @@
   struct window *w;
   struct frame *f;
 
+#ifdef USE_KKCC
+  if (XEVENT_TYPE (event) == pointer_motion_event)
+    {
+      *x = XMOTION_DATA_X (XEVENT_DATA (event));
+      *y = XMOTION_DATA_Y (XEVENT_DATA (event));
+    }
+  else if (XEVENT_TYPE (event) == button_press_event ||
+	   XEVENT_TYPE (event) == button_release_event)
+    {
+      *x = XBUTTON_DATA_X (XEVENT_DATA (event));
+      *y = XBUTTON_DATA_Y (XEVENT_DATA (event));
+    }
+  else if (XEVENT_TYPE (event) == misc_user_event)
+    {
+      *x = XMISC_USER_DATA_X (XEVENT_DATA (event));
+      *y = XMISC_USER_DATA_Y (XEVENT_DATA (event));
+    }
+  else
+    return 0;
+#else /* not USE_KKCC */
   if (XEVENT (event)->event_type == pointer_motion_event)
     {
       *x = XEVENT (event)->event.motion.x;
@@ -1637,7 +2764,7 @@
     }
   else
     return 0;
-
+#endif /* not USE_KKCC */
   f = XFRAME (EVENT_CHANNEL (XEVENT (event)));
 
   if (relative)
@@ -1774,6 +2901,27 @@
   Lisp_Object ret_obj1, ret_obj2;
 
   CHECK_LIVE_EVENT (event);
+#ifdef USE_KKCC
+  frame = XEVENT_CHANNEL (event);
+  switch (XEVENT_TYPE (event))
+    {
+    case pointer_motion_event :
+      pix_x = XMOTION_DATA_X (XEVENT_DATA (event));
+      pix_y = XMOTION_DATA_Y (XEVENT_DATA (event));
+      break;
+    case button_press_event :
+    case button_release_event :
+      pix_x = XBUTTON_DATA_X (XEVENT_DATA (event));
+      pix_y = XBUTTON_DATA_Y (XEVENT_DATA (event));
+      break;
+    case misc_user_event :
+      pix_x = XMISC_USER_DATA_X (XEVENT_DATA (event));
+      pix_y = XMISC_USER_DATA_Y (XEVENT_DATA (event));
+      break;
+    default:
+      dead_wrong_type_argument (Qmouse_event_p, event);
+    }
+#else /* not USE_KKCC */
   frame = XEVENT (event)->channel;
   switch (XEVENT (event)->event_type)
     {
@@ -1793,6 +2941,7 @@
     default:
       dead_wrong_type_argument (Qmouse_event_p, event);
     }
+#endif /* not USE_KKCC */
 
   result = pixel_to_glyph_translation (XFRAME (frame), pix_x, pix_y,
 				       &ret_x, &ret_y, &ret_obj_x, &ret_obj_y,
@@ -2101,8 +3250,13 @@
 */
        (event))
 {
+#ifdef USE_KKCC
   CHECK_EVENT_TYPE (event, process_event, Qprocess_event_p);
+  return XPROCESS_DATA_PROCESS (XEVENT_DATA (event));
+#else /* not USE_KKCC */
+  CHECK_EVENT_TYPE (event, process_event, Qprocess_event_p);
   return XEVENT (event)->event.process.process;
+#endif /* not USE_KKCC */
 }
 
 DEFUN ("event-function", Fevent_function, 1, 1, 0, /*
@@ -2113,6 +3267,20 @@
 {
  again:
   CHECK_LIVE_EVENT (event);
+#ifdef USE_KKCC
+  switch (XEVENT_TYPE (event))
+    {
+    case timeout_event:
+      return XTIMEOUT_DATA_FUNCTION (XEVENT_DATA (event));
+    case misc_user_event:
+      return XMISC_USER_DATA_FUNCTION (XEVENT_DATA (event));
+    case eval_event:
+      return XEVAL_DATA_FUNCTION (XEVENT_DATA (event));
+    default:
+      event = wrong_type_argument (intern ("timeout-or-eval-event-p"), event);
+      goto again;
+    }
+#else /* not USE_KKCC */
   switch (XEVENT (event)->event_type)
     {
     case timeout_event:
@@ -2125,6 +3293,7 @@
       event = wrong_type_argument (intern ("timeout-or-eval-event-p"), event);
       goto again;
     }
+#endif /* not USE_KKCC */
 }
 
 DEFUN ("event-object", Fevent_object, 1, 1, 0, /*
@@ -2135,6 +3304,20 @@
 {
  again:
   CHECK_LIVE_EVENT (event);
+#ifdef USE_KKCC
+  switch (XEVENT_TYPE (event))
+    {
+    case timeout_event:
+      return XTIMEOUT_DATA_OBJECT (XEVENT_DATA (event));
+    case misc_user_event:
+      return XMISC_USER_DATA_OBJECT (XEVENT_DATA (event));
+    case eval_event:
+      return XEVAL_DATA_OBJECT (XEVENT_DATA (event));
+    default:
+      event = wrong_type_argument (intern ("timeout-or-eval-event-p"), event);
+      goto again;
+    }
+#else /* not USE_KKCC */
   switch (XEVENT (event)->event_type)
     {
     case timeout_event:
@@ -2147,6 +3330,7 @@
       event = wrong_type_argument (intern ("timeout-or-eval-event-p"), event);
       goto again;
     }
+#endif /* not USE_KKCC */
 }
 
 DEFUN ("event-properties", Fevent_properties, 1, 1, 0, /*
@@ -2165,18 +3349,30 @@
 
   props = cons3 (Qtimestamp, Fevent_timestamp (event), props);
 
+#ifdef USE_KKCC
+  switch (EVENT_TYPE (e))
+#else /* not USE_KKCC */
   switch (e->event_type)
+#endif /* not USE_KKCC */
     {
     default: abort ();
 
     case process_event:
+#ifdef USE_KKCC
+      props = cons3 (Qprocess, XPROCESS_DATA_PROCESS (EVENT_DATA (e)), props);
+#else /* not USE_KKCC */
       props = cons3 (Qprocess, e->event.process.process, props);
+#endif /* not USE_KKCC */
       break;
 
     case timeout_event:
       props = cons3 (Qobject,	Fevent_object	(event), props);
       props = cons3 (Qfunction, Fevent_function (event), props);
+#ifdef USE_KKCC
+      props = cons3 (Qid, make_int (XTIMEOUT_DATA_ID_NUMBER (EVENT_DATA (e))), props);
+#else /* not USE_KKCC */
       props = cons3 (Qid, make_int (e->event.timeout.id_number), props);
+#endif /* not USE_KKCC */
       break;
 
     case key_press_event:
@@ -2236,6 +3432,17 @@
 syms_of_events (void)
 {
   INIT_LRECORD_IMPLEMENTATION (event);
+#ifdef USE_KKCC
+  INIT_LRECORD_IMPLEMENTATION (key_data);
+  INIT_LRECORD_IMPLEMENTATION (button_data);
+  INIT_LRECORD_IMPLEMENTATION (motion_data);
+  INIT_LRECORD_IMPLEMENTATION (process_data);
+  INIT_LRECORD_IMPLEMENTATION (timeout_data);
+  INIT_LRECORD_IMPLEMENTATION (eval_data);
+  INIT_LRECORD_IMPLEMENTATION (misc_user_data);
+  INIT_LRECORD_IMPLEMENTATION (magic_eval_data);
+  INIT_LRECORD_IMPLEMENTATION (magic_data);
+#endif /* USE_KKCC */  
 
   DEFSUBR (Fcharacter_to_event);
   DEFSUBR (Fevent_to_character);
Index: src/events.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/events.h,v
retrieving revision 1.32
retrieving revision 1.35
diff -u -r1.32 -r1.35
--- src/events.h	2002/06/05 09:55:29	1.32
+++ src/events.h	2002/08/01 08:28:38	1.35
@@ -27,6 +27,10 @@
 
 #include "systime.h"
 
+#ifdef USE_KKCC
+#include "opaque.h"
+#endif /* USE_KKCC */
+
 /* There is one object called an event_stream.  This object contains
    callback functions for doing the window-system-dependent operations
    that XEmacs requires.
@@ -227,6 +231,18 @@
 
 extern struct event_stream *event_stream;
 
+#ifdef USE_KKCC
+Lisp_Object make_key_data (void);
+Lisp_Object make_button_data (void);
+Lisp_Object make_motion_data (void);
+Lisp_Object make_process_data (void);
+Lisp_Object make_timeout_data (void);
+Lisp_Object make_magic_data (void);
+Lisp_Object make_magic_eval_data (void);
+Lisp_Object make_eval_data (void);
+Lisp_Object make_misc_user_data (void);
+#endif /* USE_KKCC */
+
 typedef enum emacs_event_type
 {
   empty_event,
@@ -262,8 +278,15 @@
 
 #endif /* MULE */
 
+#ifdef USE_KKCC
+struct Lisp_Key_Data
+#else /* not USE_KKCC */
 struct key_data
+#endif /* not USE_KKCC */
 {
+#ifdef USE_KKCC
+  struct lrecord_header lheader;
+#endif /* USE_KKCC */
   /* What keysym this is; a character or a symbol. */
   Lisp_Object keysym;
   /* Modifiers held down when key was pressed: control, meta, etc.
@@ -292,8 +315,36 @@
 #endif /* MULE */
 };
 
+#ifdef USE_KKCC
+typedef struct Lisp_Key_Data Lisp_Key_Data;
+
+DECLARE_LRECORD (key_data, Lisp_Key_Data);
+#define XKEY_DATA(x) XRECORD (x, key_data, Lisp_Key_Data)
+#define wrap_key_data(p) wrap_record (p, key_data)
+#define KEY_DATAP(x) RECORDP (x, key_data)
+#define CHECK_KEY_DATA(x) CHECK_RECORD (x, key_data)
+#define CONCHECK_KEY_DATA(x) CONCHECK_RECORD (x, key_data)
+
+#define XKEY_DATA_KEYSYM(d) (XKEY_DATA (d)->keysym)
+#define KEY_DATA_KEYSYM(d) ((d)->keysym)
+#define XKEY_DATA_MODIFIERS(d) (XKEY_DATA (d)->modifiers)
+#define KEY_DATA_MODIFIERS(d) ((d)->modifiers)
+
+#define XSET_KEY_DATA_KEYSYM(d, k) (XKEY_DATA (d)->keysym = (k))
+#define SET_KEY_DATA_KEYSYM(d, k) ((d)->keysym = k)
+#define XSET_KEY_DATA_MODIFIERS(d, m) (XKEY_DATA (d)->modifiers = m)
+#define SET_KEY_DATA_MODIFIERS(d, m) ((d)->modifiers = m)
+#endif /* USE_KKCC */
+
+#ifdef USE_KKCC
+struct Lisp_Button_Data
+#else /* not USE_KKCC */
 struct button_data
+#endif /* not USE_KKCC */
 {
+#ifdef USE_KKCC
+  struct lrecord_header lheader;
+#endif /* USE_KKCC */
   /* What button went down or up. */
   int button;
   /* Bucky-bits on that button: shift, control, meta, etc.  Also
@@ -302,22 +353,91 @@
   /*  Where it was at the button-state-change (in pixels). */
   int x, y;
 };
+#ifdef USE_KKCC
+typedef struct Lisp_Button_Data Lisp_Button_Data;
 
+DECLARE_LRECORD (button_data, Lisp_Button_Data);
+#define XBUTTON_DATA(x) XRECORD (x, button_data, Lisp_Button_Data)
+#define wrap_button_data(p) wrap_record (p, button_data)
+#define BUTTON_DATAP(x) RECORDP (x, button_data)
+#define CHECK_BUTTON_DATA(x) CHECK_RECORD (x, button_data)
+#define CONCHECK_BUTTON_DATA(x) CONCHECK_RECORD (x, button_data)
+
+#define XBUTTON_DATA_BUTTON(d) (XBUTTON_DATA (d)->button)
+#define XBUTTON_DATA_MODIFIERS(d) (XBUTTON_DATA (d)->modifiers)
+#define XBUTTON_DATA_X(d) (XBUTTON_DATA (d)->x)
+#define XBUTTON_DATA_Y(d) (XBUTTON_DATA (d)->y)
+
+#define XSET_BUTTON_DATA_BUTTON(d, b) (XBUTTON_DATA (d)->button = (b))
+#define XSET_BUTTON_DATA_MODIFIERS(d, m) (XBUTTON_DATA (d)->modifiers = (m))
+#define XSET_BUTTON_DATA_X(d, new_x) (XBUTTON_DATA (d)->x = (new_x))
+#define XSET_BUTTON_DATA_Y(d, new_y) (XBUTTON_DATA (d)->y = (new_y))
+#endif /* USE_KKCC */
+
+#ifdef USE_KKCC
+struct Lisp_Motion_Data
+#else /* not USE_KKCC */
 struct motion_data
+#endif /* not USE_KKCC */
 {
+#ifdef USE_KKCC
+  struct lrecord_header lheader;
+#endif /* USE_KKCC */
   /* Where it was after it moved (in pixels). */
   int x, y;
   /* Bucky-bits down when the motion was detected. */
   int modifiers;
 };
+#ifdef USE_KKCC
+typedef struct Lisp_Motion_Data Lisp_Motion_Data;
 
+DECLARE_LRECORD (motion_data, Lisp_Motion_Data);
+#define XMOTION_DATA(x) XRECORD (x, motion_data, Lisp_Motion_Data)
+#define wrap_motion_data(p) wrap_record (p, motion_data)
+#define MOTION_DATAP(x) RECORDP (x, motion_data)
+#define CHECK_MOTION_DATA(x) CHECK_RECORD (x, motion_data)
+#define CONCHECK_MOTION_DATA(x) CONCHECK_RECORD (x, motion_data)
+
+#define XMOTION_DATA_X(d) (XMOTION_DATA (d)->x)
+#define XMOTION_DATA_Y(d) (XMOTION_DATA (d)->y)
+#define XMOTION_DATA_MODIFIERS(d) (XMOTION_DATA (d)->modifiers)
+
+#define XSET_MOTION_DATA_X(d, new_x) (XMOTION_DATA (d)->x = (new_x))
+#define XSET_MOTION_DATA_Y(d, new_y) (XMOTION_DATA (d)->y = (new_y))
+#define XSET_MOTION_DATA_MODIFIERS(d, m) (XMOTION_DATA (d)->modifiers = (m))
+#endif /* USE_KKCC */
+
+#ifdef USE_KKCC
+struct Lisp_Process_Data
+#else /* not USE_KKCC */
 struct process_data
+#endif /* not USE_KKCC */
 {
+#ifdef USE_KKCC
+  struct lrecord_header lheader;
+#endif /* USE_KKCC */
   /* the XEmacs "process" object in question */
   Lisp_Object process;
 };
+#ifdef USE_KKCC
+typedef struct Lisp_Process_Data Lisp_Process_Data;
 
+DECLARE_LRECORD (process_data, Lisp_Process_Data);
+#define XPROCESS_DATA(x) XRECORD (x, process_data, Lisp_Process_Data)
+#define wrap_process_data(p) wrap_record (p, process_data)
+#define PROCESS_DATAP(x) RECORDP (x, process_data)
+#define CHECK_PROCESS_DATA(x) CHECK_RECORD (x, process_data)
+#define CONCHECK_PROCESS_DATA(x) CONCHECK_RECORD (x, process_data)
+
+#define XPROCESS_DATA_PROCESS(d) (XPROCESS_DATA (d)->process)
+#define XSET_PROCESS_DATA_PROCESS(d, p) (XPROCESS_DATA (d)->process = (p))
+#endif /* USE_KKCC */
+
+#ifdef USE_KKCC
+struct Lisp_Timeout_Data
+#else /* not USE_KKCC */
 struct timeout_data
+#endif /* not USE_KKCC */
 {
 /*
     interval_id		The ID returned when the associated call to
@@ -332,13 +452,40 @@
 			processed.
     object		The object passed to that function.
 */
+#ifdef USE_KKCC
+  struct lrecord_header lheader;
+#endif /* USE_KKCC */
   int interval_id;
   int id_number;
   Lisp_Object function;
   Lisp_Object object;
 };
+#ifdef USE_KKCC
+typedef struct Lisp_Timeout_Data Lisp_Timeout_Data;
 
+DECLARE_LRECORD (timeout_data, Lisp_Timeout_Data);
+#define XTIMEOUT_DATA(x) XRECORD (x, timeout_data, Lisp_Timeout_Data)
+#define wrap_timeout_data(p) wrap_record(p, timeout_data)
+#define TIMEOUT_DATAP(x) RECORDP (x, timeout_data)
+#define CHECK_TIMEOUT_DATA(x) CHECK_RECORD (x, timeout_data)
+#define CONCHECK_TIMEOUT_DATA(x) CONCHECK_RECORD (x, timeout_data)
+
+#define XTIMEOUT_DATA_INTERVAL_ID(d) XTIMEOUT_DATA (d)->interval_id
+#define XTIMEOUT_DATA_ID_NUMBER(d) XTIMEOUT_DATA (d)->id_number
+#define XTIMEOUT_DATA_FUNCTION(d) XTIMEOUT_DATA (d)->function
+#define XTIMEOUT_DATA_OBJECT(d) XTIMEOUT_DATA (d)->object
+
+#define XSET_TIMEOUT_DATA_INTERVAL_ID(d, i) XTIMEOUT_DATA (d)->interval_id = (i)
+#define XSET_TIMEOUT_DATA_ID_NUMBER(d, n) XTIMEOUT_DATA (d)->id_number = (n)
+#define XSET_TIMEOUT_DATA_FUNCTION(d, f) XTIMEOUT_DATA (d)->function = f
+#define XSET_TIMEOUT_DATA_OBJECT(d, o) XTIMEOUT_DATA (d)->object = o
+#endif /* USE_KKCC */
+
+#ifdef USE_KKCC
+struct Lisp_Eval_Data
+#else /* not USE_KKCC */
 struct eval_data
+#endif /* not USE_KKCC */
 {
 /* This kind of event is used internally; sometimes the window system
    interface would like to inform XEmacs of some user action (such as
@@ -350,11 +497,34 @@
     function		An elisp function to call with this event object.
     object		Argument of function.
 */
+#ifdef USE_KKCC
+  struct lrecord_header lheader;
+#endif /* USE_KKCC */
   Lisp_Object function;
   Lisp_Object object;
 };
+#ifdef USE_KKCC
+typedef struct Lisp_Eval_Data Lisp_Eval_Data;
 
+DECLARE_LRECORD (eval_data, Lisp_Eval_Data);
+#define XEVAL_DATA(x) XRECORD (x, eval_data, Lisp_Eval_Data)
+#define wrap_eval_data(p) wrap_record(p, eval_data)
+#define EVAL_DATAP(x) RECORDP (x, eval_data)
+#define CHECK_EVAL_DATA(x) CHECK_RECORD (x, eval_data)
+#define CONCHECK_EVAL_DATA(x) CONCHECK_RECORD (x, eval_data)
+
+#define XEVAL_DATA_FUNCTION(d) (XEVAL_DATA (d)->function)
+#define XEVAL_DATA_OBJECT(d) (XEVAL_DATA (d)->object)
+
+#define XSET_EVAL_DATA_FUNCTION(d, f) (XEVAL_DATA (d)->function = f)
+#define XSET_EVAL_DATA_OBJECT(d, o) (XEVAL_DATA (d)->object = o)
+#endif /* USE_KKCC */
+
+#ifdef USE_KKCC
+struct Lisp_Misc_User_Data
+#else /* not USE_KKCC */
 struct misc_user_data
+#endif /* not USE_KKCC */
 {
 /* #### The misc-user type is serious junk.  It should be separated
    out into different events.  There's no reason to create
@@ -376,14 +546,48 @@
 			by the XEmacs Drag'n'Drop system. Don't depend on their
 			values for other types of misc_user_events.
 */
+#ifdef USE_KKCC
+  struct lrecord_header lheader;
+#endif /* USE_KKCC */
   Lisp_Object function;
   Lisp_Object object;
   int button;
   int modifiers;
   int x, y;
 };
+#ifdef USE_KKCC
+typedef struct Lisp_Misc_User_Data Lisp_Misc_User_Data;
+
+DECLARE_LRECORD (misc_user_data, Lisp_Misc_User_Data);
+#define XMISC_USER_DATA(x) XRECORD (x, misc_user_data, Lisp_Misc_User_Data)
+#define wrap_misc_user_data(p) wrap_record(p, misc_user_data)
+#define MISC_USER_DATAP(x) RECORDP (x, misc_user_data)
+#define CHECK_MISC_USER_DATA(x) CHECK_RECORD (x, misc_user_data)
+#define CONCHECK_MISC_USER_DATA(x) CONCHECK_RECORD (x, misc_user_data)
+
+#define XMISC_USER_DATA_FUNCTION(d) (XMISC_USER_DATA (d)->function)
+#define XMISC_USER_DATA_OBJECT(d) (XMISC_USER_DATA (d)->object)
+#define XMISC_USER_DATA_BUTTON(d) (XMISC_USER_DATA (d)->button)
+#define XMISC_USER_DATA_MODIFIERS(d) (XMISC_USER_DATA (d)->modifiers)
+#define XMISC_USER_DATA_X(d) (XMISC_USER_DATA (d)->x)
+#define XMISC_USER_DATA_Y(d) (XMISC_USER_DATA (d)->y)
+
+#define XSET_MISC_USER_DATA_FUNCTION(d, f) (XMISC_USER_DATA (d)->function = (f))
+#define XSET_MISC_USER_DATA_OBJECT(d, o) (XMISC_USER_DATA (d)->object = (o))
+#define XSET_MISC_USER_DATA_BUTTON(d, b) (XMISC_USER_DATA (d)->button = (b))
+#define XSET_MISC_USER_DATA_MODIFIERS(d, m) (XMISC_USER_DATA (d)->modifiers = (m))
+#define XSET_MISC_USER_DATA_X(d, new_x) (XMISC_USER_DATA (d)->x = (new_x))
+#define XSET_MISC_USER_DATA_Y(d, new_y) (XMISC_USER_DATA (d)->y = (new_y))
+#endif /* USE_KKCC */
 
+#ifdef USE_KKCC
+typedef void (*lisp_obj_arg_fun) (Lisp_Object);
+
+
+struct Lisp_Magic_Eval_Data
+#else /* not USE_KKCC */
 struct magic_eval_data
+#endif /* not USE_KKCC */
 {
 /* This is like an eval event but its contents are not
    Lisp-accessible.  This allows for "internal eval events" that call
@@ -398,10 +602,33 @@
     object		Argument of function.
 
 */
+#ifdef USE_KKCC
+  struct lrecord_header lheader;
+#endif /* USE_KKCC */
   void (*internal_function) (Lisp_Object);
   Lisp_Object object;
 };
+#ifdef USE_KKCC
+typedef struct Lisp_Magic_Eval_Data Lisp_Magic_Eval_Data;
 
+DECLARE_LRECORD (magic_eval_data, Lisp_Magic_Eval_Data);
+#define XMAGIC_EVAL_DATA(x) XRECORD (x, magic_eval_data, Lisp_Magic_Eval_Data)
+#define wrap_magic_eval_data(p) wrap_record(p, magic_eval_data)
+#define MAGIC_EVAL_DATAP(x) RECORDP (x, magic_eval_data)
+#define CHECK_MAGIC_EVAL_DATA(x) CHECK_RECORD (x, magic_eval_data)
+#define CONCHECK_MAGIC_EVAL_DATA(x) CONCHECK_RECORD (x, magic_eval_data)
+
+#define XMAGIC_EVAL_DATA_INTERNAL_FUNCTION(d) \
+  XMAGIC_EVAL_DATA (d)->internal_function
+#define XMAGIC_EVAL_DATA_INTERNAL_FUNOBJ(d) (XMAGIC_EVAL_DATA (d)->internal_function)
+#define XMAGIC_EVAL_DATA_OBJECT(d) (XMAGIC_EVAL_DATA (d)->object)
+
+#define XSET_MAGIC_EVAL_DATA_INTERNAL_FUNCTION(d, f) \
+  (XMAGIC_EVAL_DATA (d)->internal_function = f)
+#define XSET_MAGIC_EVAL_DATA_INTERNAL_FUNOBJ(d, f) (XMAGIC_EVAL_DATA (d)->internal_function = (f))
+#define XSET_MAGIC_EVAL_DATA_OBJECT(d, o) (XMAGIC_EVAL_DATA (d)->object = (o))
+#endif /* USE_KKCC */
+
 #if defined (HAVE_X_WINDOWS) && defined(emacs)
 # include <X11/Xlib.h>
 #endif
@@ -410,6 +637,53 @@
 #include <gdk/gdk.h>
 #endif
 
+
+#ifdef USE_KKCC
+struct Lisp_Magic_Data
+{
+  struct lrecord_header lheader;
+
+  union {
+#ifdef HAVE_GTK
+    GdkEvent          gdk_event;
+#endif
+#ifdef HAVE_X_WINDOWS
+    XEvent            x_event;
+#endif
+#ifdef HAVE_MS_WINDOWS
+    int               mswindows_event;
+#endif
+  } underlying;
+};
+
+typedef struct Lisp_Magic_Data Lisp_Magic_Data;
+
+DECLARE_LRECORD (magic_data, Lisp_Magic_Data);
+#define XMAGIC_DATA(x) XRECORD (x, magic_data, Lisp_Magic_Data)
+#define wrap_magic_data(p) wrap_record(p, magic_data)
+#define MAGIC_DATAP(x) RECORDP (x, magic_data)
+#define CHECK_MAGIC_DATA(x) CHECK_RECORD (x, magic_data)
+#define CONCHECK_MAGIC_DATA(x) CONCHECK_RECORD (x, magic_data)
+
+#define XMAGIC_DATA_UNDERLYING(d) (XMAGIC_DATA (d)->underlying)
+#define XSET_MAGIC_DATA_UNDERLYING(d, u) (XMAGIC_DATA (d)->underlying = (u))
+
+#ifdef HAVE_GTK
+#define XMAGIC_DATA_GDK_EVENT(d) (XMAGIC_DATA (d)->underlying.gdk_event)
+#define XSET_MAGIC_DATA_GDK_EVENT(d, e) (XMAGIC_DATA (d)->underlying.gdk_event = (e))
+#endif /*HAVE_GTK*/
+
+#ifdef HAVE_X_WINDOWS
+#define XMAGIC_DATA_X_EVENT(d) (XMAGIC_DATA (d)->underlying.x_event)
+#define XSET_MAGIC_DATA_X_EVENT(d, e) (XMAGIC_DATA (d)->underlying.x_event = (e))
+#endif
+
+#ifdef HAVE_MS_WINDOWS
+#define XMAGIC_DATA_MSWINDOWS_EVENT(d) (XMAGIC_DATA (d)->underlying.mswindows_event)
+#define XSET_MAGIC_DATA_MSWINDOWS_EVENT(d, e) (XMAGIC_DATA (d)->underlying.mswindows_event = (e))
+#endif
+
+#else /* not USE_KKCC */
 union magic_data
 {
 /* No user-serviceable parts within.  This is for things like
@@ -436,6 +710,8 @@
   int               underlying_mswindows_event;
 #endif
 };
+#endif /* not USE_KKCC */
+
 
 struct Lisp_Timeout
 {
@@ -506,8 +782,11 @@
      started.  Currently they are raw server timestamps. (The X
      protocol doesn't provide any easy way of translating between
      server time and real process time; yuck.) */
-
   unsigned int          timestamp;
+
+#ifdef USE_KKCC
+  Lisp_Object event_data;
+#else /* not USE_KKCC */
   union
     {
       struct key_data           key;
@@ -520,6 +799,7 @@
       union magic_data          magic;
       struct magic_eval_data    magic_eval;
     } event;
+#endif /* not USE_KKCC */
 };
 
 DECLARE_LRECORD (event, Lisp_Event);
@@ -536,7 +816,89 @@
 #define XEVENT_TYPE(a) (XEVENT (a)->event_type)
 #define EVENT_NEXT(a) ((a)->next)
 #define XEVENT_NEXT(e) (XEVENT (e)->next)
+
+#ifdef USE_KKCC
+#define XEVENT_DATA(ev) (XEVENT (ev)->event_data)
+#define EVENT_DATA(ev) ((ev)->event_data)
+#define XEVENT_CHANNEL(ev) (XEVENT (ev)->channel)
+#define EVENT_TIMESTAMP(ev)                                     \
+  ((ev)->timestamp)
+#define XEVENT_TIMESTAMP(ev) EVENT_TIMESTAMP (XEVENT (ev))
+
+#define SET_EVENT_TIMESTAMP_ZERO(ev) \
+  ((ev)->timestamp = 0)
+#define SET_EVENT_TIMESTAMP(ev, t)                      \
+  (ev)->timestamp = (t)
+#define XSET_EVENT_TIMESTAMP(ev, t) SET_EVENT_TIMESTAMP (XEVENT (ev), t)
+
+
+#define SET_EVENT_CHANNEL(ev, c)                        \
+do {                                                    \
+  Lisp_Event *mac_event = (ev);                         \
+  mac_event->channel = (c);                             \
+} while (0)
+#define XSET_EVENT_CHANNEL(ev, c) SET_EVENT_CHANNEL (XEVENT (ev), c) 
+
+#define SET_EVENT_DATA(ev, d)                           \
+do {                                                    \
+  Lisp_Event *mac_event = (ev);                         \
+  mac_event->event_data = (d);                          \
+} while (0)
+#define XSET_EVENT_DATA(ev, d) SET_EVENT_DATA (XEVENT (ev), d)
+
+INLINE_HEADER  void set_event_type(struct Lisp_Event *event, emacs_event_type t);
+INLINE_HEADER  void
+set_event_type(struct Lisp_Event *event, emacs_event_type t) 
+{
+  event->event_type = t;
+
+  switch (t) {
+  case key_press_event:
+    event->event_data = make_key_data ();
+    break;
+  case button_press_event:
+  case button_release_event:
+    event->event_data = make_button_data ();
+    break;
+  case pointer_motion_event:
+    event->event_data = make_motion_data ();
+    break;
+  case process_event:
+    event->event_data = make_process_data ();
+    break;
+  case timeout_event:
+    event->event_data = make_timeout_data ();
+    break;
+  case magic_event:
+    event->event_data = make_magic_data ();
+    break;
+  case magic_eval_event:
+    event->event_data = make_magic_eval_data ();
+    break;
+  case eval_event:
+    event->event_data = make_eval_data ();
+    break;
+  case misc_user_event:
+    event->event_data = make_misc_user_data ();
+    break;
+  default:
+    break;
+  }
+}
+#define XSET_EVENT_TYPE(ev, t) set_event_type (XEVENT (ev), t)
+#define SET_EVENT_TYPE(ev, t) set_event_type (ev, t)
+
+
+#define SET_EVENT_NEXT(ev, n)                           \
+do {                                                    \
+  Lisp_Event *mac_event = (ev);                         \
+  mac_event->next = (n);                                \
+} while (0)
+#define XSET_EVENT_NEXT(ev, n) SET_EVENT_NEXT (XEVENT (ev), n)
+
+#else /* NOT USE_KKCC */
 #define XSET_EVENT_NEXT(e, n) do { (XEVENT (e)->next = (n)); } while (0)
+#endif
 
 #define EVENT_CHAIN_LOOP(event, chain) \
   for (event = chain; !NILP (event); event = XEVENT_NEXT (event))
@@ -594,7 +956,15 @@
 #define KEYSYM(x) (intern (x))
 
 /* from events.c */
+#ifdef USE_KKCC
+void format_event_object (Eistring *buf, Lisp_Object event, int brief);
+#else /* not USE_KKCC */
 void format_event_object (Eistring *buf, Lisp_Event *event, int brief);
+#endif /* not USE_KKCC */
+#ifdef USE_KKCC
+//void format_event_data_object (Eistring *buf, Lisp_Object data, int brief);
+void copy_event_data (Lisp_Object dest, Lisp_Object src);
+#endif /* USE_KKCC */
 void character_to_event (Ichar c, Lisp_Event *event,
                          struct console *con,
                          int use_console_meta_flag,
@@ -783,8 +1153,8 @@
        the first that can begin a function key sequence. */
     Lisp_Object first_mungeable_event;
   } munge_me[2];
-
   Ibyte *echo_buf;
+
   Bytecount echo_buf_length;          /* size of echo_buf */
   Bytecount echo_buf_index;           /* index into echo_buf
                                        * -1 before doing echoing for new cmd */
Index: src/extents.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/extents.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- src/extents.c	2002/06/20 21:18:30	1.45
+++ src/extents.c	2002/07/29 09:21:18	1.46
@@ -909,6 +909,21 @@
 /*                       Auxiliary extent structure                     */
 /************************************************************************/
 
+#ifdef USE_KKCC
+static const struct lrecord_description extent_auxiliary_description[] ={
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, begin_glyph) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, end_glyph) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, parent) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, children) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, invisible) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, read_only) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, mouse_face) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, initial_redisplay_function) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, before_change_functions) },
+  { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, after_change_functions) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
 static Lisp_Object
 mark_extent_auxiliary (Lisp_Object obj)
 {
@@ -925,10 +940,16 @@
   return data->parent;
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("extent-auxiliary", extent_auxiliary,
+			       0, /*dumpable-flag*/
+                               mark_extent_auxiliary, internal_object_printer,
+			       0, 0, 0, extent_auxiliary_description, struct extent_auxiliary);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("extent-auxiliary", extent_auxiliary,
                                mark_extent_auxiliary, internal_object_printer,
 			       0, 0, 0, 0, struct extent_auxiliary);
-
+#endif /* not USE_KKCC */
 void
 allocate_extent_auxiliary (EXTENT ext)
 {
@@ -972,6 +993,17 @@
 static void free_soe (struct stack_of_extents *soe);
 static void soe_invalidate (Lisp_Object obj);
 
+#ifdef USE_KKCC
+static const struct struct_description extent_list_description = {
+};
+
+static const struct lrecord_description extent_info_description [] = {
+  { XD_STRUCT_PTR, offsetof (struct extent_info, extents), 
+    XD_INDIRECT (0, 0), &extent_list_description },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_extent_info (Lisp_Object obj)
 {
@@ -1022,10 +1054,19 @@
     }
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("extent-info", extent_info,
+			       0, /*dumpable-flag*/
                                mark_extent_info, internal_object_printer,
+			       finalize_extent_info, 0, 0, 
+			       0 /*extent_info_description*/,
+			       struct extent_info);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("extent-info", extent_info,
+                               mark_extent_info, internal_object_printer,
 			       finalize_extent_info, 0, 0, 0,
 			       struct extent_info);
+#endif /* not USE_KKCC */
 
 static Lisp_Object
 allocate_extent_info (void)
@@ -3175,7 +3216,9 @@
   return Fextent_properties (obj);
 }
 
+#ifdef USE_KKCC
 DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("extent", extent,
+						1, /*dumpable-flag*/
 						mark_extent,
 						print_extent,
 						/* NOTE: If you declare a
@@ -3188,7 +3231,21 @@
 						extent_getprop, extent_putprop,
 						extent_remprop, extent_plist,
 						struct extent);
-
+#else /* not USE_KKCC */
+DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("extent", extent,
+						mark_extent,
+						print_extent,
+						/* NOTE: If you declare a
+						   finalization method here,
+						   it will NOT be called.
+						   Shaft city. */
+						0,
+						extent_equal, extent_hash,
+						extent_description,
+						extent_getprop, extent_putprop,
+						extent_remprop, extent_plist,
+						struct extent);
+#endif /* not USE_KKCC */
 
 /************************************************************************/
 /*			basic extent accessors				*/
Index: src/faces.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/faces.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- src/faces.c	2002/06/22 17:14:45	1.38
+++ src/faces.c	2002/07/29 09:21:19	1.39
@@ -276,11 +276,20 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("face", face,
+					  1, /*dumpable-flag*/
 					  mark_face, print_face, 0, face_equal,
 					  face_hash, face_description, face_getprop,
 					  face_putprop, face_remprop,
 					  face_plist, Lisp_Face);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("face", face,
+					  mark_face, print_face, 0, face_equal,
+					  face_hash, face_description, face_getprop,
+					  face_putprop, face_remprop,
+					  face_plist, Lisp_Face);
+#endif /* not USE_KKCC */
 
 /************************************************************************/
 /*                             face read syntax                         */
Index: src/file-coding.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/file-coding.c,v
retrieving revision 1.28
retrieving revision 1.30
diff -u -r1.28 -r1.30
--- src/file-coding.c	2002/06/05 09:55:30	1.28
+++ src/file-coding.c	2002/08/01 08:38:48	1.30
@@ -621,14 +621,24 @@
   { XD_CODING_SYSTEM_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("coding-system", coding_system,
+					1, /*dumpable-flag*/
 					mark_coding_system,
 					print_coding_system,
 					finalize_coding_system,
 					0, 0, coding_system_description,
 					sizeof_coding_system,
 					Lisp_Coding_System);
-
+#else /* not USE_KKCC */
+DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("coding-system", coding_system,
+					mark_coding_system,
+					print_coding_system,
+					finalize_coding_system,
+					0, 0, coding_system_description,
+					sizeof_coding_system,
+					Lisp_Coding_System);
+#endif /* not USE_KKCC */
 
 /************************************************************************/
 /*                       Creating coding systems                        */
@@ -1166,6 +1176,7 @@
 
       newname = emacs_sprintf_malloc (NULL, "Int%d", coding_system_tick);
       defmnem = build_intstring (newname);
+      xfree (newname);
     }
   else
     CHECK_SYMBOL (name_or_existing);
Index: src/floatfns.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/floatfns.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- src/floatfns.c	2002/03/13 08:52:42	1.13
+++ src/floatfns.c	2002/07/29 09:21:20	1.14
@@ -185,10 +185,18 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("float", float,
+				     1, /*dumpable-flag*/
 				     mark_float, print_float, 0, float_equal,
 				     float_hash, float_description,
 				     Lisp_Float);
+#else /* not USE_KKCC */
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("float", float,
+				     mark_float, print_float, 0, float_equal,
+				     float_hash, float_description,
+				     Lisp_Float);
+#endif /* not USE_KKCC */
 
 /* Extract a Lisp number as a `double', or signal an error.  */
 
Index: src/fns.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/fns.c,v
retrieving revision 1.49
retrieving revision 1.51
diff -u -r1.49 -r1.51
--- src/fns.c	2002/06/20 21:18:31	1.49
+++ src/fns.c	2002/08/02 15:15:47	1.51
@@ -131,11 +131,21 @@
 };
 
 
+#ifdef USE_KKCC
 DEFINE_BASIC_LRECORD_SEQUENCE_IMPLEMENTATION ("bit-vector", bit_vector,
+					      1, /*dumpable-flag*/
 					      mark_bit_vector, print_bit_vector, 0,
 					      bit_vector_equal, bit_vector_hash,
 					      bit_vector_description, size_bit_vector,
 					      Lisp_Bit_Vector);
+#else /* not USE_KKCC */
+DEFINE_BASIC_LRECORD_SEQUENCE_IMPLEMENTATION ("bit-vector", bit_vector,
+					      mark_bit_vector, print_bit_vector, 0,
+					      bit_vector_equal, bit_vector_hash,
+					      bit_vector_description, size_bit_vector,
+					      Lisp_Bit_Vector);
+#endif /* not USE_KKCC */
+
 
 DEFUN ("identity", Fidentity, 1, 1, 0, /*
 Return the argument unchanged.
@@ -1096,7 +1106,7 @@
 /* Ben thinks this function should not exist or be exported to Lisp.
    We use it to define split-path-string in subr.el (not!).  */
 
-DEFUN ("split-string-by-char", Fsplit_string_by_char, 1, 2, 0, /*
+DEFUN ("split-string-by-char", Fsplit_string_by_char, 2, 2, 0, /*
 Split STRING into a list of substrings originally separated by SEPCHAR.
 */
        (string, sepchar))
Index: src/frame.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- src/frame.c	2002/06/20 21:18:32	1.54
+++ src/frame.c	2002/07/29 09:21:20	1.55
@@ -166,9 +166,16 @@
   write_fmt_string (printcharfun, " 0x%x>", frm->header.uid);
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("frame", frame,
+			       0, /*dumpable-flag*/
                                mark_frame, print_frame, 0, 0, 0, 0,
 			       struct frame);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("frame", frame,
+                               mark_frame, print_frame, 0, 0, 0, 0,
+			       struct frame);
+#endif /* not USE_KKCC */
 
 static void
 nuke_all_frame_slots (struct frame *f)
@@ -1896,10 +1903,17 @@
   if (mouse_pixel_position_1 (d, &frame, &intx, &inty))
     {
       Lisp_Object event = Fmake_event (Qnil, Qnil);
+#ifdef USE_KKCC
+      XSET_EVENT_TYPE (event, pointer_motion_event);
+      XSET_EVENT_CHANNEL (event, frame);
+      XSET_MOTION_DATA_X (XEVENT_DATA (event), intx);
+      XSET_MOTION_DATA_Y (XEVENT_DATA (event), inty);
+#else /* not USE_KKCC */
       XEVENT (event)->event_type = pointer_motion_event;
       XEVENT (event)->channel = frame;
       XEVENT (event)->event.motion.x = intx;
       XEVENT (event)->event.motion.y = inty;
+#endif /* not USE_KKCC */
       return event;
     }
   else
Index: src/getloadavg.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/getloadavg.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- src/getloadavg.c	2002/03/13 08:52:44	1.16
+++ src/getloadavg.c	2002/08/29 19:45:30	1.17
@@ -408,7 +408,7 @@
 
 #ifdef UMAX
 #include <stdio.h>
-#include <signal.h>
+#include "syssignal.h"
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <sys/syscall.h>
Index: src/glyphs-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-x.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- src/glyphs-x.c	2002/07/10 03:54:45	1.69
+++ src/glyphs-x.c	2002/07/31 10:23:39	1.70
@@ -588,20 +588,23 @@
 #ifdef USE_XBMLANGPATH
   {
     Ibyte *path = egetenv ("XBMLANGPATH");
-    Extbyte *pathext;
-    SubstitutionRec subs[1];
-    subs[0].match = 'B';
-    LISP_STRING_TO_EXTERNAL (name, subs[0].substitution, Qfile_name);
-    C_STRING_TO_EXTERNAL (path, pathext, Qfile_name);
-    /* #### Motif uses a big hairy default if $XBMLANGPATH isn't set.
-       We don't.  If you want it used, set it. */
-    if (pathext &&
-	(pathext = XtResolvePathname (display, "bitmaps", 0, 0, pathext,
-				      subs, XtNumber (subs), 0)))
+    if (path)
       {
-	name = build_ext_string (pathext, Qfile_name);
-	XtFree (pathext);
-        return (name);
+        Extbyte *pathext;
+	SubstitutionRec subs[1];
+	subs[0].match = 'B';
+	LISP_STRING_TO_EXTERNAL (name, subs[0].substitution, Qfile_name);
+	C_STRING_TO_EXTERNAL (path, pathext, Qfile_name);
+	/* #### Motif uses a big hairy default if $XBMLANGPATH isn't set.
+           We don't.  If you want it used, set it. */
+	if (pathext &&
+	    (pathext = XtResolvePathname (display, "bitmaps", 0, 0, pathext,
+					  subs, XtNumber (subs), 0)))
+          {
+            name = build_ext_string (pathext, Qfile_name);
+	    XtFree (pathext);
+	    return (name);
+	  }
       }
   }
 #endif
Index: src/glyphs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- src/glyphs.c	2002/07/06 05:48:22	1.41
+++ src/glyphs.c	2002/07/29 09:21:20	1.42
@@ -1229,11 +1229,20 @@
 		 0));
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("image-instance", image_instance,
+			       0, /*dumpable-flag*/
 			       mark_image_instance, print_image_instance,
 			       finalize_image_instance, image_instance_equal,
 			       image_instance_hash, 0,
 			       Lisp_Image_Instance);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("image-instance", image_instance,
+			       mark_image_instance, print_image_instance,
+			       finalize_image_instance, image_instance_equal,
+			       image_instance_hash, 0,
+			       Lisp_Image_Instance);
+#endif /* not USE_KKCC */
 
 static Lisp_Object
 allocate_image_instance (Lisp_Object governing_domain, Lisp_Object parent,
@@ -3683,12 +3692,22 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC 
+DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("glyph", glyph,
+					  1, /*dumpable-flag*/
+					  mark_glyph, print_glyph, 0,
+					  glyph_equal, glyph_hash, glyph_description,
+					  glyph_getprop, glyph_putprop,
+					  glyph_remprop, glyph_plist,
+					  Lisp_Glyph);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("glyph", glyph,
 					  mark_glyph, print_glyph, 0,
 					  glyph_equal, glyph_hash, glyph_description,
 					  glyph_getprop, glyph_putprop,
 					  glyph_remprop, glyph_plist,
 					  Lisp_Glyph);
+#endif /* not USE_KKCC */
 
 Lisp_Object
 allocate_glyph (enum glyph_type type,
@@ -4670,7 +4689,7 @@
   register_ignored_expose (f, IMAGE_INSTANCE_DISPLAY_X (ii),
 			   IMAGE_INSTANCE_DISPLAY_Y (ii),
 			   IMAGE_INSTANCE_DISPLAY_WIDTH (ii),
-			   IMAGE_INSTANCE_DISPLAY_HEIGHT (ii));
+			   IMAGE_INSTANCE_DISPLAY_HEIGHT (ii));  
   IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0;
 
   MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)),
@@ -4944,7 +4963,7 @@
 	    {
 	      /* Increment the index of the image slice we are currently
 		 viewing. */
-	      IMAGE_INSTANCE_PIXMAP_SLICE (ii) =
+	      IMAGE_INSTANCE_PIXMAP_SLICE (ii) = 
 		(IMAGE_INSTANCE_PIXMAP_SLICE (ii) + 1)
 		% IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii);
 	      /* We might need to kick redisplay at this point - but we
Index: src/gpmevent.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gpmevent.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- src/gpmevent.c	2002/06/23 09:25:12	1.15
+++ src/gpmevent.c	2002/07/29 09:21:21	1.16
@@ -158,19 +158,35 @@
     {
     case GPM_DOWN:
     case GPM_UP:
+#ifdef USE_KKCC
+      SET_EVENT_TYPE (event,
+	(ev.type & GPM_DOWN) ? button_press_event : button_release_event);
+      XSET_BUTTON_DATA_X (EVENT_DATA (event), ev.x);
+      XSET_BUTTON_DATA_Y (EVENT_DATA (event), ev.y);
+      XSET_BUTTON_DATA_BUTTON (EVENT_DATA (event), button);
+      XSET_BUTTON_DATA_MODIFIERS (EVENT_DATA (event), modifiers);
+#else /* not USE_KKCC */
       event->event_type =
 	(ev.type & GPM_DOWN) ? button_press_event : button_release_event;
       event->event.button.x         = ev.x;
       event->event.button.y         = ev.y;
       event->event.button.button    = button;
       event->event.button.modifiers = modifiers;
+#endif /* not USE_KKCC */
       break;
     case GPM_MOVE:
     case GPM_DRAG:
+#ifdef USE_KKCC
+      SET_EVENT_TYPE (event, pointer_motion_event);
+      XSET_MOTION_DATA_X (EVENT_DATA (event), ev.x);
+      XSET_MOTION_DATA_Y (EVENT_DATA (event), ev.y);
+      XSET_MOTION_DATA_MODIFIERS (EVENT_DATA (event), modifiers);
+#else /* not USE_KKCC */
       event->event_type             = pointer_motion_event;
       event->event.motion.x         = ev.x;
       event->event.motion.y         = ev.y;
       event->event.motion.modifiers = modifiers;
+#endif /* not USE_KKCC */
     default:
       /* This will never happen */
       break;
@@ -435,7 +451,11 @@
 	   ** William M. Perry - Nov 9, 1999
 	   */
 
+#ifdef USE_KKCC
+	  Gpm_DrawPointer (XMOTION_DATA_X (EVENT_DATA (event)),XMOTION_DATA_Y (EVENT_DATA (event)), fd);
+#else /* not USE_KKCC */
 	  Gpm_DrawPointer (event->event.motion.x,event->event.motion.y, fd);
+#endif /* not USE_KKCC */
 	}
 
       return;
Index: src/gui-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gui-msw.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- src/gui-msw.c	2002/06/20 21:18:35	1.6
+++ src/gui-msw.c	2002/08/16 08:15:41	1.7
@@ -64,12 +64,21 @@
     {
       event = Fmake_event (Qnil, Qnil);
 
+#ifdef USE_KKCC
+      XSET_EVENT_TYPE (event, misc_user_event);
+      XSET_EVENT_CHANNEL (event, frame);
+      XSET_EVENT_TIMESTAMP (event, GetTickCount());
+      XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), Qeval);
+      XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event),
+			     list4 (Qfuncall, callback_ex, image_instance, event));
+#else /* not USE_KKCC */
       XEVENT (event)->event_type = misc_user_event;
       XEVENT (event)->channel = frame;
       XEVENT (event)->timestamp = GetTickCount ();
       XEVENT (event)->event.eval.function = Qeval;
       XEVENT (event)->event.eval.object =
 	list4 (Qfuncall, callback_ex, image_instance, event);
+#endif /* not USE_KKCC */
     }
   else if (NILP (callback) || UNBOUNDP (callback))
     return Qnil;
@@ -80,11 +89,19 @@
       event = Fmake_event (Qnil, Qnil);
 
       get_gui_callback (callback, &fn, &arg);
+#ifdef USE_KKCC
+      XSET_EVENT_TYPE (event, misc_user_event);
+      XSET_EVENT_CHANNEL (event, frame);
+      XSET_EVENT_TIMESTAMP (event, GetTickCount());
+      XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), fn);
+      XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), arg);
+#else /* not USE_KKCC */
       XEVENT (event)->event_type = misc_user_event;
       XEVENT (event)->channel = frame;
       XEVENT (event)->timestamp = GetTickCount ();
       XEVENT (event)->event.eval.function = fn;
       XEVENT (event)->event.eval.object = arg;
+#endif /* not USE_KKCC */
     }
 
   mswindows_enqueue_dispatch_event (event);
Index: src/gui-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gui-x.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- src/gui-x.c	2002/06/20 21:18:35	1.28
+++ src/gui-x.c	2002/07/29 09:21:21	1.29
@@ -95,9 +95,16 @@
   return data->last_menubar_buffer;
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("popup-data", popup_data,
+			       0, /*dumpable-flag*/
                                mark_popup_data, internal_object_printer,
 			       0, 0, 0, 0, struct popup_data);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("popup-data", popup_data,
+                               mark_popup_data, internal_object_printer,
+			       0, 0, 0, 0, struct popup_data);
+#endif /* not USE_KKCC */
 
 /* This is like FRAME_MENUBAR_DATA (f), but contains an alist of
    (id . popup-data) for GCPRO'ing the callbacks of the popup menus
@@ -250,10 +257,17 @@
     {
       event = Fmake_event (Qnil, Qnil);
 
+#ifdef USE_KKCC
+      XSET_EVENT_TYPE (event, misc_user_event);
+      XSET_EVENT_CHANNEL (event, frame);
+      XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), Qrun_hooks);
+      XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), Qmenu_no_selection_hook);
+#else /* not USE_KKCC */
       XEVENT (event)->event_type = misc_user_event;
       XEVENT (event)->channel = frame;
       XEVENT (event)->event.eval.function = Qrun_hooks;
       XEVENT (event)->event.eval.object = Qmenu_no_selection_hook;
+#endif /* not USE_KKCC */
     }
   else
     {
@@ -271,11 +285,18 @@
 	{
 	  event = Fmake_event (Qnil, Qnil);
 
+#ifdef USE_KKCC
+	  XSET_EVENT_TYPE (event, misc_user_event);
+	  XSET_EVENT_CHANNEL (event, frame);
+	  XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), Qeval);
+	  XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), list4 (Qfuncall, callback_ex, image_instance, event));
+#else /* not USE_KKCC */
 	  XEVENT (event)->event_type = misc_user_event;
 	  XEVENT (event)->channel = frame;
 	  XEVENT (event)->event.eval.function = Qeval;
 	  XEVENT (event)->event.eval.object =
 	    list4 (Qfuncall, callback_ex, image_instance, event);
+#endif /* not USE_KKCC */
 	}
       else if (NILP (callback) || UNBOUNDP (callback))
 	event = Qnil;
@@ -286,10 +307,17 @@
 	  event = Fmake_event (Qnil, Qnil);
 
 	  get_gui_callback (callback, &fn, &arg);
+#ifdef USE_KKCC
+	  XSET_EVENT_TYPE (event, misc_user_event);
+	  XSET_EVENT_CHANNEL (event, frame);
+	  XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), fn);
+	  XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), arg);
+#else /* not USE_KKCC */
 	  XEVENT (event)->event_type = misc_user_event;
 	  XEVENT (event)->channel = frame;
 	  XEVENT (event)->event.eval.function = fn;
 	  XEVENT (event)->event.eval.object = arg;
+#endif /* not USE_KKCC */
 	}
     }
 
Index: src/gui.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gui.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- src/gui.c	2002/06/20 21:18:35	1.23
+++ src/gui.c	2002/07/29 09:21:21	1.24
@@ -549,6 +549,25 @@
   return Qnil;
 }
 
+#ifdef USE_KKCC
+static const struct lrecord_description gui_item_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, name) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, callback) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, callback_ex) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, suffix) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, active) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, included) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, config) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, filter) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, style) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, selected) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, keys) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, accelerator) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Gui_Item, value) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_gui_item (Lisp_Object obj)
 {
@@ -770,13 +789,22 @@
 {
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item,
+			       0, /*dumpable-flag*/
 			       mark_gui_item, print_gui_item,
 			       finalize_gui_item, gui_item_equal,
 			       gui_item_hash,
+			       gui_item_description,
+			       Lisp_Gui_Item);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item,
+			       mark_gui_item, print_gui_item,
+			       finalize_gui_item, gui_item_equal,
+			       gui_item_hash,
 			       0,
 			       Lisp_Gui_Item);
-
+#endif /* not USE_KKCC */
 
 DOESNT_RETURN
 gui_error (const Char_ASCII *reason, Lisp_Object frob)
Index: src/keymap.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/keymap.c,v
retrieving revision 1.45
retrieving revision 1.47
diff -u -r1.45 -r1.47
--- src/keymap.c	2002/06/20 21:18:36	1.45
+++ src/keymap.c	2002/08/22 11:31:42	1.47
@@ -281,10 +281,18 @@
 };
 
 /* No need for keymap_equal #### Why not? */
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("keymap", keymap,
+			       1, /*dumpable-flag*/
                                mark_keymap, print_keymap, 0, 0, 0,
 			       keymap_description,
 			       Lisp_Keymap);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("keymap", keymap,
+                               mark_keymap, print_keymap, 0, 0, 0,
+			       keymap_description,
+			       Lisp_Keymap);
+#endif /* not USE_KKCC */
 
 /************************************************************************/
 /*                Traversing keymaps and their parents                  */
@@ -428,11 +436,17 @@
 }
 
 static Lisp_Object
+#ifdef USE_KKCC
+make_key_description (const Lisp_Key_Data *key, int prettify)
+{
+  Lisp_Object keysym = KEY_DATA_KEYSYM(key);
+  int modifiers = KEY_DATA_MODIFIERS (key);
+#else /* not USE_KKCC */
 make_key_description (const struct key_data *key, int prettify)
 {
   Lisp_Object keysym = key->keysym;
   int modifiers = key->modifiers;
-
+#endif /* not USE_KKCC */
   if (prettify && CHARP (keysym))
     {
       /* This is a little slow, but (control a) is prettier than (control 65).
@@ -456,7 +470,11 @@
 
 static Lisp_Object
 raw_lookup_key (Lisp_Object keymap,
+#ifdef USE_KKCC
+                const Lisp_Key_Data *raw_keys, int raw_keys_count,
+#else /* not USE_KKCC */
                 const struct key_data *raw_keys, int raw_keys_count,
+#endif /* not USE_KKCC */
                 int keys_so_far, int accept_default);
 
 /* Relies on caller to gc-protect args */
@@ -640,11 +658,20 @@
 
 /* Relies on caller to gc-protect keymap, keysym, value */
 static void
+#ifdef USE_KKCC
+keymap_store (Lisp_Object keymap, const Lisp_Key_Data *key,
+#else /* not USE_KKCC */
 keymap_store (Lisp_Object keymap, const struct key_data *key,
+#endif /* not USE_KKCC */
               Lisp_Object value)
 {
+#ifdef USE_KKCC
+  Lisp_Object keysym = KEY_DATA_KEYSYM (key);
+  int modifiers = KEY_DATA_MODIFIERS (key);
+#else /* not USE_KKCC */
   Lisp_Object keysym = key->keysym;
   int modifiers = key->modifiers;
+#endif /* not USE_KKCC */
   Lisp_Keymap *k = XKEYMAP (keymap);
 
   modifiers &= ~(XEMACS_MOD_BUTTON1 | XEMACS_MOD_BUTTON2 | XEMACS_MOD_BUTTON3
@@ -1015,10 +1042,8 @@
                && EQ (XCAR (tem), Qautoload)
                && EQ (Fcar (Fcdr (Fcdr (Fcdr (Fcdr (tem))))), Qkeymap))
 	{
-	  struct gcpro gcpro1, gcpro2;
-	  GCPRO2 (tem, object);
+	  /* do_autoload GCPROs both arguments */
 	  do_autoload (tem, object);
-	  UNGCPRO;
 	}
       else if (errorp)
 	object = wrong_type_argument (Qkeymapp, object);
@@ -1054,14 +1079,28 @@
   if (!NILP (map))
     {
       Lisp_Object idx = Fcdr (object);
+#ifdef USE_KKCC
+      Lisp_Key_Data indirection;
+#else /* not USE_KKCC */
       struct key_data indirection;
+#endif /* not USE_KKCC */
       if (CHARP (idx))
 	{
+#ifdef USE_KKCC
+	  Lisp_Object event = Fmake_event (Qnil, Qnil);
+          struct gcpro gcpro1;
+          GCPRO1 (event);
+	  XSET_EVENT_TYPE (event, empty_event);
+	  character_to_event (XCHAR (idx), XEVENT (event),
+			      XCONSOLE (Vselected_console), 0, 0);
+	  indirection = *XKEY_DATA (XEVENT_DATA (event));
+#else /* not USE_KKCC */
 	  Lisp_Event event;
 	  event.event_type = empty_event;
 	  character_to_event (XCHAR (idx), &event,
 			      XCONSOLE (Vselected_console), 0, 0);
 	  indirection = event.event.key;
+#endif /* not USE_KKCC */
 	}
       else if (CONSP (idx))
 	{
@@ -1073,7 +1112,11 @@
       else if (SYMBOLP (idx))
 	{
 	  indirection.keysym = idx;
+#ifdef USE_KKCC
+	  SET_KEY_DATA_MODIFIERS (&indirection, XINT (XCDR (idx)));
+#else /* not USE_KKCC */
 	  indirection.modifiers = 0;
+#endif /* not USE_KKCC */
 	}
       else
 	{
@@ -1099,13 +1142,24 @@
 }
 
 static Lisp_Object
+#ifdef USE_KKCC
+keymap_lookup_1 (Lisp_Object keymap, const Lisp_Key_Data *key,
+#else /* not USE_KKCC */
 keymap_lookup_1 (Lisp_Object keymap, const struct key_data *key,
+#endif /* not USE_KKCC */
                  int accept_default)
 {
   /* This function can GC */
+#ifdef USE_KKCC
+  return get_keyelt (keymap_lookup_directly (keymap,
+					     KEY_DATA_KEYSYM (key), 
+                                             KEY_DATA_MODIFIERS (key)),
+		     accept_default);
+#else /* not USE_KKCC */
   return get_keyelt (keymap_lookup_directly (keymap,
 					     key->keysym, key->modifiers),
 		     accept_default);
+#endif /* not USE_KKCC */
 }
 
 
@@ -1398,30 +1452,86 @@
  */
 
 static void
+#ifdef USE_KKCC
+define_key_parser (Lisp_Object spec, Lisp_Key_Data *returned_value)
+#else /* not USE_KKCC */
 define_key_parser (Lisp_Object spec, struct key_data *returned_value)
+#endif /* not USE_KKCC */
 {
   if (CHAR_OR_CHAR_INTP (spec))
     {
+#ifdef USE_KKCC
+      Lisp_Object event = Fmake_event (Qnil, Qnil);
+      struct gcpro gcpro1;
+      GCPRO1 (event);
+      XSET_EVENT_TYPE (event, empty_event);
+      character_to_event (XCHAR_OR_CHAR_INT (spec), XEVENT (event),
+			  XCONSOLE (Vselected_console), 0, 0);
+      SET_KEY_DATA_KEYSYM (returned_value, XKEY_DATA_KEYSYM (XEVENT_DATA (event)));
+      SET_KEY_DATA_MODIFIERS (returned_value, 
+                              XKEY_DATA_MODIFIERS (XEVENT_DATA (event)));
+#else /* not USE_KKCC */
       Lisp_Event event;
       event.event_type = empty_event;
       character_to_event (XCHAR_OR_CHAR_INT (spec), &event,
 			  XCONSOLE (Vselected_console), 0, 0);
       returned_value->keysym    = event.event.key.keysym;
       returned_value->modifiers = event.event.key.modifiers;
+#endif /* not USE_KKCC */
     }
   else if (EVENTP (spec))
     {
+#ifdef USE_KKCC
+      switch (XEVENT_TYPE (spec))
+#else /* not USE_KKCC */
       switch (XEVENT (spec)->event_type)
+#endif /* not USE_KKCC */
 	{
 	case key_press_event:
           {
+#ifdef USE_KKCC
+            SET_KEY_DATA_KEYSYM (returned_value, XKEY_DATA_KEYSYM (XEVENT_DATA (spec)));
+            SET_KEY_DATA_MODIFIERS (returned_value, XKEY_DATA_MODIFIERS (XEVENT_DATA (spec)));
+#else /* not USE_KKCC */
             returned_value->keysym    = XEVENT (spec)->event.key.keysym;
             returned_value->modifiers = XEVENT (spec)->event.key.modifiers;
+#endif /* not USE_KKCC */
 	    break;
           }
 	case button_press_event:
 	case button_release_event:
 	  {
+#ifdef USE_KKCC
+	    int down = (XEVENT_TYPE (spec) == button_press_event);
+	    switch (XBUTTON_DATA_BUTTON (XEVENT_DATA (spec)))
+	      {
+	      case 1:
+		SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton1 : Qbutton1up)); 
+		break;
+	      case 2:
+		SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton2 : Qbutton2up)); 
+		break;
+	      case 3:
+		SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton3 : Qbutton3up)); 
+		break;
+	      case 4:
+		SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton4 : Qbutton4up)); 
+		break;
+	      case 5:
+		SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton5 : Qbutton5up)); 
+		break;
+	      case 6:
+		SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton6 : Qbutton6up)); 
+		break;
+	      case 7:
+		SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton7 : Qbutton7up)); 
+		break;
+	      default:
+		SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton0 : Qbutton0up)); 
+		break;
+	      }
+	    SET_KEY_DATA_MODIFIERS (returned_value, XBUTTON_DATA_MODIFIERS (XEVENT_DATA (spec)));
+#else /* not USE_KKCC */
 	    int down = (XEVENT (spec)->event_type == button_press_event);
 	    switch (XEVENT (spec)->event.button.button)
 	      {
@@ -1443,6 +1553,7 @@
 		returned_value->keysym = (down ? Qbutton0 : Qbutton0up); break;
 	      }
 	    returned_value->modifiers = XEVENT (spec)->event.button.modifiers;
+#endif /* not USE_KKCC */
 	    break;
 	  }
 	default:
@@ -1455,8 +1566,13 @@
       if (bucky_sym_to_bucky_bit (spec) != 0)
         invalid_argument ("Key is a modifier name", spec);
       define_key_check_and_coerce_keysym (spec, &spec, 0);
+#ifdef USE_KKCC
+      SET_KEY_DATA_KEYSYM (returned_value, spec);
+      SET_KEY_DATA_MODIFIERS (returned_value, 0);
+#else /* not USE_KKCC */
       returned_value->keysym = spec;
       returned_value->modifiers = 0;
+#endif /* not USE_KKCC */
     }
   else if (CONSP (spec))
     {
@@ -1491,8 +1607,13 @@
 			   "List must be nil-terminated", spec);
 
       define_key_check_and_coerce_keysym (spec, &keysym, modifiers);
+#ifdef USE_KKCC
+      SET_KEY_DATA_KEYSYM(returned_value, keysym);
+      SET_KEY_DATA_MODIFIERS (returned_value, modifiers);
+#else /* not USE_KKCC */
       returned_value->keysym = keysym;
       returned_value->modifiers = modifiers;
+#endif /* not USE_KKCC */
     }
   else
     {
@@ -1506,7 +1627,11 @@
 key_desc_list_to_event (Lisp_Object list, Lisp_Object event,
                         int allow_menu_events)
 {
+#ifdef USE_KKCC
+  Lisp_Key_Data raw_key;
+#else /* not USE_KKCC */
   struct key_data raw_key;
+#endif /* not USE_KKCC */
 
   if (allow_menu_events &&
       CONSP (list) &&
@@ -1521,10 +1646,17 @@
 	fn = Qcall_interactively;
       else
 	fn = Qeval;
+#ifdef USE_KKCC
+      XSET_EVENT_TYPE (event, misc_user_event);
+      XSET_EVENT_CHANNEL (event, wrap_frame (selected_frame));
+      XSET_MISC_USER_DATA_FUNCTION (XEVENT_DATA (event), fn);
+      XSET_MISC_USER_DATA_OBJECT (XEVENT_DATA (event), arg);
+#else /* not USE_KKCC */
       XEVENT (event)->channel = wrap_frame (selected_frame ());
       XEVENT (event)->event_type = misc_user_event;
       XEVENT (event)->event.eval.function = fn;
       XEVENT (event)->event.eval.object = arg;
+#endif /* not USE_KKCC */
       return;
     }
 
@@ -1541,10 +1673,17 @@
     invalid_operation ("Mouse-clicks can't appear in saved keyboard macros",
 		       Qunbound);
 
+#ifdef USE_KKCC
+  XSET_EVENT_CHANNEL (event, Vselected_console);
+  XSET_EVENT_TYPE (event, key_press_event);
+  XSET_KEY_DATA_KEYSYM (XEVENT_DATA (event), raw_key.keysym);
+  XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (event), KEY_DATA_MODIFIERS (&raw_key));
+#else /* not USE_KKCC */
   XEVENT (event)->channel = Vselected_console;
   XEVENT (event)->event_type = key_press_event;
   XEVENT (event)->event.key.keysym = raw_key.keysym;
   XEVENT (event)->event.key.modifiers = raw_key.modifiers;
+#endif /* not USE_KKCC */
 }
 
 
@@ -1589,8 +1728,13 @@
       ch2 = event_to_character (XEVENT (event2), 0, 0, 0);
       retval = (ch1 >= 0 && ch2 >= 0 && ch1 == ch2);
     }
+#ifdef USE_KKCC
+  else if (EQ (XKEY_DATA_KEYSYM (EVENT_DATA (event)), XKEY_DATA_KEYSYM (XEVENT_DATA (event2))) &&
+	   XKEY_DATA_MODIFIERS (EVENT_DATA (event)) == XKEY_DATA_MODIFIERS (XEVENT_DATA (event2)))
+#else /* not USE_KKCC */
   else if (EQ (event->event.key.keysym, XEVENT (event2)->event.key.keysym) &&
 	   event->event.key.modifiers == XEVENT (event2)->event.key.modifiers)
+#endif /* not USE_KKCC */
     retval = 1;
   else
     retval = 0;
@@ -1600,8 +1744,23 @@
 }
 
 static int
+#ifdef USE_KKCC
+meta_prefix_char_p (const Lisp_Key_Data *key)
+#else /* not USE_KKCC */
 meta_prefix_char_p (const struct key_data *key)
+#endif /* not USE_KKCC */
 {
+#ifdef USE_KKCC
+  Lisp_Object event = Fmake_event (Qnil, Qnil);
+  struct gcpro gcpro1;
+  GCPRO1 (event);
+
+  XSET_EVENT_TYPE (event, key_press_event);
+  XSET_EVENT_CHANNEL (event, Vselected_console);
+  XSET_KEY_DATA_KEYSYM (XEVENT_DATA (event), KEY_DATA_KEYSYM (key));
+  XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (event), KEY_DATA_MODIFIERS (key));
+  return event_matches_key_specifier_p (XEVENT(event), Vmeta_prefix_char);
+#else /* not USE_KKCC */
   Lisp_Event event;
 
   event.event_type = key_press_event;
@@ -1609,6 +1768,7 @@
   event.event.key.keysym = key->keysym;
   event.event.key.modifiers = key->modifiers;
   return event_matches_key_specifier_p (&event, Vmeta_prefix_char);
+#endif /* not USE_KKCC */
 }
 
 DEFUN ("event-matches-key-specifier-p", Fevent_matches_key_specifier_p, 2, 2, 0, /*
@@ -1622,28 +1782,49 @@
   return (event_matches_key_specifier_p (XEVENT (event), key_specifier)
 	  ? Qt : Qnil);
 }
-
+#ifdef USE_KKCC
+#define MACROLET(k,m) do {		\
+  SET_KEY_DATA_KEYSYM(returned_value, k);		\
+  SET_KEY_DATA_MODIFIERS(returned_value, m);    	\
+  RETURN_SANS_WARNINGS;			\
+} while (0)
+#else /* not USE_KKCC */
 #define MACROLET(k,m) do {		\
   returned_value->keysym = (k);		\
   returned_value->modifiers = (m);	\
   RETURN_SANS_WARNINGS;			\
 } while (0)
-
+#endif /* not USE_KKCC */
 /* ASCII grunge.
    Given a keysym, return another keysym/modifier pair which could be
    considered the same key in an ASCII world.  Backspace returns ^H, for
    example.
  */
 static void
+#ifdef USE_KKCC
+define_key_alternate_name (Lisp_Key_Data *key,
+                           Lisp_Key_Data *returned_value)
+#else /* not USE_KKCC */
 define_key_alternate_name (struct key_data *key,
                            struct key_data *returned_value)
+#endif /* not USE_KKCC */
 {
+#ifdef USE_KKCC
+  Lisp_Object keysym = KEY_DATA_KEYSYM (key);
+  int modifiers = KEY_DATA_MODIFIERS (key);
+#else /* not USE_KKCC */
   Lisp_Object keysym = key->keysym;
   int modifiers = key->modifiers;
+#endif /* not USE_KKCC */
   int modifiers_sans_control = (modifiers & (~XEMACS_MOD_CONTROL));
   int modifiers_sans_meta = (modifiers & (~XEMACS_MOD_META));
+#ifdef USE_KKCC
+  SET_KEY_DATA_KEYSYM (returned_value, Qnil); /* By default, no "alternate" key */
+  SET_KEY_DATA_MODIFIERS (returned_value, 0);
+#else /* not USE_KKCC */
   returned_value->keysym = Qnil; /* By default, no "alternate" key */
   returned_value->modifiers = 0;
+#endif /* not USE_KKCC */
   if (modifiers_sans_meta == XEMACS_MOD_CONTROL)
     {
       if (EQ (keysym, QKspace))
@@ -1694,8 +1875,11 @@
   Lisp_Object new_keys;
   int i;
   Lisp_Object mpc_binding;
+#ifdef USE_KKCC
+  Lisp_Key_Data meta_key;
+#else /* not USE_KKCC */
   struct key_data meta_key;
-
+#endif /* not USE_KKCC */
   if (NILP (Vmeta_prefix_char) ||
       (INTP (Vmeta_prefix_char) && !CHAR_INTP (Vmeta_prefix_char)))
     return;
@@ -1896,9 +2080,13 @@
   while (1)
     {
       Lisp_Object c;
+#ifdef USE_KKCC
+      Lisp_Key_Data raw_key1;
+      Lisp_Key_Data raw_key2;
+#else /* not USE_KKCC */
       struct key_data raw_key1;
       struct key_data raw_key2;
-
+#endif /* not USE_KKCC */
       if (STRINGP (keys))
 	c = make_char (string_ichar (keys, idx));
       else
@@ -2012,7 +2200,11 @@
 struct raw_lookup_key_mapper_closure
 {
   int remaining;
+#ifdef USE_KKCC
+  const Lisp_Key_Data *raw_keys;
+#else /* not USE_KKCC */
   const struct key_data *raw_keys;
+#endif /* not USE_KKCC */
   int raw_keys_count;
   int keys_so_far;
   int accept_default;
@@ -2023,7 +2215,11 @@
 /* Caller should gc-protect args (keymaps may autoload) */
 static Lisp_Object
 raw_lookup_key (Lisp_Object keymap,
+#ifdef USE_KKCC
+                const Lisp_Key_Data *raw_keys, int raw_keys_count,
+#else /* not USE_KKCC */
                 const struct key_data *raw_keys, int raw_keys_count,
+#endif /* not USE_KKCC */
                 int keys_so_far, int accept_default)
 {
   /* This function can GC */
@@ -2046,7 +2242,11 @@
   int accept_default = c->accept_default;
   int remaining = c->remaining;
   int keys_so_far = c->keys_so_far;
+#ifdef USE_KKCC
+  const Lisp_Key_Data *raw_keys = c->raw_keys;
+#else /* not USE_KKCC */
   const struct key_data *raw_keys = c->raw_keys;
+#endif /* not USE_KKCC */
   Lisp_Object cmd;
 
   if (! meta_prefix_char_p (&(raw_keys[0])))
@@ -2099,7 +2299,11 @@
 				  keys_so_far + 1, accept_default);
 	  else if ((raw_keys[1].modifiers & XEMACS_MOD_META) == 0)
 	    {
+#ifdef USE_KKCC
+	      Lisp_Key_Data metified;
+#else /* not USE_KKCC */
 	      struct key_data metified;
+#endif /* not USE_KKCC */
 	      metified.keysym = raw_keys[1].keysym;
 	      metified.modifiers = raw_keys[1].modifiers |
 		(unsigned char) XEMACS_MOD_META;
@@ -2131,8 +2335,13 @@
              int accept_default)
 {
   /* This function can GC */
+#ifdef USE_KKCC
+  Lisp_Key_Data kkk[20];
+  Lisp_Key_Data *raw_keys;
+#else /* not USE_KKCC */
   struct key_data kkk[20];
   struct key_data *raw_keys;
+#endif /* not USE_KKCC */
   int i;
 
   if (nkeys == 0)
@@ -2141,7 +2350,11 @@
   if (nkeys < countof (kkk))
     raw_keys = kkk;
   else
+#ifdef USE_KKCC
+    raw_keys = alloca_array (Lisp_Key_Data, nkeys);
+#else /* not USE_KKCC */
     raw_keys = alloca_array (struct key_data, nkeys);
+#endif /* not USE_KKCC */
 
   for (i = 0; i < nkeys; i++)
     {
@@ -2155,11 +2368,19 @@
                int accept_default)
 {
   /* This function can GC */
+#ifdef USE_KKCC
+  Lisp_Key_Data kkk[20];
+#else /* not USE_KKCC */
   struct key_data kkk[20];
+#endif /* not USE_KKCC */
   Lisp_Object event;
 
   int nkeys;
+#ifdef USE_KKCC
+  Lisp_Key_Data *raw_keys;
+#else /* not USE_KKCC */
   struct key_data *raw_keys;
+#endif /* not USE_KKCC */
   Lisp_Object tem = Qnil;
   struct gcpro gcpro1, gcpro2;
   int iii;
@@ -2171,7 +2392,11 @@
   if (nkeys < countof (kkk))
     raw_keys = kkk;
   else
+#ifdef USE_KKCC
+    raw_keys = alloca_array (Lisp_Key_Data, nkeys);
+#else /* not USE_KKCC */
     raw_keys = alloca_array (struct key_data, nkeys);
+#endif /* not USE_KKCC */
 
   nkeys = 0;
   EVENT_CHAIN_LOOP (event, event_head)
@@ -2220,7 +2445,11 @@
     {
       int length = string_char_length (keys);
       int i;
+#ifdef USE_KKCC
+      Lisp_Key_Data *raw_keys = alloca_array (Lisp_Key_Data, length);
+#else /* not USE_KKCC */
       struct key_data *raw_keys = alloca_array (struct key_data, length);
+#endif /* not USE_KKCC */
       if (length == 0)
 	return Qnil;
 
@@ -2799,7 +3028,11 @@
 
 struct map_keymap_unsorted_closure
 {
+#ifdef USE_KKCC
+  void (*fn) (const Lisp_Key_Data *, Lisp_Object binding, void *arg);
+#else /* not USE_KKCC */
   void (*fn) (const struct key_data *, Lisp_Object binding, void *arg);
+#endif /* not USE_KKCC */
   void *arg;
   int modifiers;
 };
@@ -2827,7 +3060,11 @@
     }
   else
     {
+#ifdef USE_KKCC
+      Lisp_Key_Data key;
+#else /* not USE_KKCC */
       struct key_data key;
+#endif /* not USE_KKCC */
       key.keysym = keysym;
       key.modifiers = modifiers;
       ((*closure->fn) (&key, value, closure->arg));
@@ -2934,7 +3171,11 @@
 static void
 map_keymap_sorted (Lisp_Object keymap_table,
                    int modifiers,
+#ifdef USE_KKCC
+                   void (*function) (const Lisp_Key_Data *key,
+#else /* not USE_KKCC */
                    void (*function) (const struct key_data *key,
+#endif /* not USE_KKCC */
                                      Lisp_Object binding,
                                      void *map_keymap_sorted_closure),
                    void *map_keymap_sorted_closure)
@@ -2967,7 +3208,11 @@
 			   map_keymap_sorted_closure);
       else
 	{
+#ifdef USE_KKCC
+	  Lisp_Key_Data k;
+#else /* not USE_KKCC */
 	  struct key_data k;
+#endif /* not USE_KKCC */
 	  k.keysym = keysym;
 	  k.modifiers = modifiers;
 	  ((*function) (&k, binding, map_keymap_sorted_closure));
@@ -2979,7 +3224,11 @@
 
 /* used by Fmap_keymap() */
 static void
+#ifdef USE_KKCC
+map_keymap_mapper (const Lisp_Key_Data *key,
+#else /* not USE_KKCC */
 map_keymap_mapper (const struct key_data *key,
+#endif /* not USE_KKCC */
                    Lisp_Object binding,
                    void *function)
 {
@@ -2992,7 +3241,11 @@
 
 static void
 map_keymap (Lisp_Object keymap_table, int sort_first,
+#ifdef USE_KKCC
+            void (*function) (const Lisp_Key_Data *key,
+#else /* not USE_KKCC */
             void (*function) (const struct key_data *key,
+#endif /* not USE_KKCC */
                               Lisp_Object binding,
                               void *fn_arg),
             void *fn_arg)
@@ -3091,7 +3344,11 @@
       Lisp_Object vec;
       int j;
       int len;
+#ifdef USE_KKCC
+      Lisp_Key_Data key;
+#else /* not USE_KKCC */
       struct key_data key;
+#endif /* not USE_KKCC */
       key.keysym = keysym;
       key.modifiers = modifiers;
 
@@ -3179,7 +3436,11 @@
       NGCPRO1 (p);
       for (iii = 0; iii < len; iii++)
 	{
+#ifdef USE_KKCC
+	  Lisp_Key_Data key;
+#else /* not USE_KKCC */
 	  struct key_data key;
+#endif /* not USE_KKCC */
 	  define_key_parser (Faref (prefix, make_int (iii)), &key);
 	  XVECTOR_DATA (p)[iii] = make_key_description (&key, 1);
 	}
@@ -3275,6 +3536,17 @@
       
       if (!EVENTP (key))
 	{
+#ifdef USE_KKCC
+	  Lisp_Object event = Fmake_event (Qnil, Qnil);
+	  XSET_EVENT_TYPE (event, empty_event);
+	  CHECK_CHAR_COERCE_INT (key);
+	  character_to_event (XCHAR (key), XEVENT(event),
+			      XCONSOLE (Vselected_console), 0, 1);
+	  format_event_object (buf, event, 1);
+	}
+      else
+	format_event_object (buf, key, 1);
+#else /* not USE_KKCC */
 	  Lisp_Event event;
 	  event.event_type = empty_event;
 	  CHECK_CHAR_COERCE_INT (key);
@@ -3284,6 +3556,7 @@
 	}
       else
 	format_event_object (buf, XEVENT (key), 1);
+#endif /* not USE_KKCC */
       str = eimake_string (buf);
       eifree (buf);
       return str;
@@ -3507,7 +3780,11 @@
 
 
 static Lisp_Object
+#ifdef USE_KKCC
+raw_keys_to_keys (Lisp_Key_Data *keys, int count)
+#else /* not USE_KKCC */
 raw_keys_to_keys (struct key_data *keys, int count)
+#endif /* not USE_KKCC */
 {
   Lisp_Object result = make_vector (count, Qnil);
   while (count--)
@@ -3517,17 +3794,33 @@
 
 
 static void
+#ifdef USE_KKCC
+format_raw_keys (Lisp_Key_Data *keys, int count, Eistring *buf)
+#else /* not USE_KKCC */
 format_raw_keys (struct key_data *keys, int count, Eistring *buf)
+#endif /* not USE_KKCC */
 {
   int i;
+#ifdef USE_KKCC
+  Lisp_Object event = Fmake_event (Qnil, Qnil);
+  XSET_EVENT_TYPE (event, key_press_event);
+  XSET_EVENT_CHANNEL (event, Vselected_console);
+#else /* not USE_KKCC */
   Lisp_Event event;
   event.event_type = key_press_event;
   event.channel = Vselected_console;
+#endif /* not USE_KKCC */
   for (i = 0; i < count; i++)
     {
+#ifdef USE_KKCC
+      XSET_KEY_DATA_KEYSYM (XEVENT_DATA (event), keys[i].keysym);
+      XSET_KEY_DATA_MODIFIERS (XEVENT_DATA (event), KEY_DATA_MODIFIERS (&keys[i]));
+      format_event_object (buf, event, 1);
+#else /* not USE_KKCC */
       event.event.key.keysym    = keys[i].keysym;
       event.event.key.modifiers = keys[i].modifiers;
       format_event_object (buf, &event, 1);
+#endif /* not USE_KKCC */
       if (i < count - 1)
 	eicat_c (buf, " ");
     }
@@ -3563,7 +3856,11 @@
     int keys_count;
     int modifiers_so_far;
     Eistring *target_buffer;
+#ifdef USE_KKCC
+    Lisp_Key_Data *keys_so_far;
+#else /* not USE_KKCC */
     struct key_data *keys_so_far;
+#endif /* not USE_KKCC */
     int keys_so_far_total_size;
     int keys_so_far_malloced;
   };
@@ -3592,7 +3889,11 @@
 	 Verify that these bindings aren't shadowed by other bindings
 	 in the shadow maps.  Either nil or number as value from
 	 raw_lookup_key() means undefined.  */
+#ifdef USE_KKCC
+      Lisp_Key_Data *so_far = c->keys_so_far;
+#else /* not USE_KKCC */
       struct key_data *so_far = c->keys_so_far;
+#endif /* not USE_KKCC */
 
       for (;;) /* loop over all keys that match */
 	{
@@ -3600,7 +3901,11 @@
 	  int i;
 
 	  so_far [keys_count].keysym = k;
+#ifdef USE_KKCC
+	  SET_KEY_DATA_MODIFIERS (&so_far [keys_count], modifiers_so_far);
+#else /* not USE_KKCC */
 	  so_far [keys_count].modifiers = modifiers_so_far;
+#endif /* not USE_KKCC */
 
 	  /* now loop over all shadow maps */
 	  for (i = 0; i < c->shadow_count; i++)
@@ -3681,10 +3986,18 @@
 	lower_modifiers = (modifiers_so_far | bucky);
       else
 	{
+#ifdef USE_KKCC
+	  Lisp_Key_Data *so_far = c->keys_so_far;
+#else /* not USE_KKCC */
 	  struct key_data *so_far = c->keys_so_far;
+#endif /* not USE_KKCC */
 	  lower_modifiers = 0;
 	  so_far [lower_keys_count].keysym = key;
+#ifdef USE_KKCC
+	  SET_KEY_DATA_MODIFIERS (&so_far [lower_keys_count], modifiers_so_far);
+#else /* not USE_KKCC */
 	  so_far [lower_keys_count].modifiers = modifiers_so_far;
+#endif /* not USE_KKCC */
 	  lower_keys_count++;
 	}
 
@@ -3693,12 +4006,24 @@
 	  int size = lower_keys_count + 50;
 	  if (! c->keys_so_far_malloced)
 	    {
+#ifdef USE_KKCC
+	      Lisp_Key_Data *new = xnew_array (Lisp_Key_Data, size);
+#else /* not USE_KKCC */
 	      struct key_data *new = xnew_array (struct key_data, size);
+#endif /* not USE_KKCC */
 	      memcpy ((void *)new, (const void *)c->keys_so_far,
+#ifdef USE_KKCC
+		      c->keys_so_far_total_size * sizeof (Lisp_Key_Data));
+#else /* not USE_KKCC */
 		      c->keys_so_far_total_size * sizeof (struct key_data));
+#endif /* not USE_KKCC */
 	    }
 	  else
+#ifdef USE_KKCC
+	    XREALLOC_ARRAY (c->keys_so_far, Lisp_Key_Data, size);
+#else /* not USE_KKCC */
 	    XREALLOC_ARRAY (c->keys_so_far, struct key_data, size);
+#endif /* not USE_KKCC */
 
 	  c->keys_so_far_total_size = size;
 	  c->keys_so_far_malloced = 1;
@@ -3732,7 +4057,11 @@
   /* This function can GC */
   Lisp_Object result = Qnil;
   int i;
+#ifdef USE_KKCC
+  Lisp_Key_Data raw[20];
+#else /* not USE_KKCC */
   struct key_data raw[20];
+#endif /* not USE_KKCC */
   struct where_is_closure c;
 
   c.definition = definition;
@@ -3947,7 +4276,11 @@
 
 struct describe_map_shadow_closure
   {
+#ifdef USE_KKCC
+    const Lisp_Key_Data *raw_key;
+#else /* not USE_KKCC */
     const struct key_data *raw_key;
+#endif /* not USE_KKCC */
     Lisp_Object self;
   };
 
@@ -3960,9 +4293,15 @@
   if (EQ (map, c->self))
     return Qzero;		/* Not shadowed; terminate search */
 
+#ifdef USE_KKCC
+  return !NILP (keymap_lookup_directly (map,
+					KEY_DATA_KEYSYM (c->raw_key),
+					KEY_DATA_MODIFIERS (c->raw_key)))
+#else /* not USE_KKCC */
   return !NILP (keymap_lookup_directly (map,
 					c->raw_key->keysym,
 					c->raw_key->modifiers))
+#endif /* not USE_KKCC */
     ? Qt : Qnil;
 }
 
@@ -3970,21 +4309,35 @@
 static Lisp_Object
 keymap_lookup_inherited_mapper (Lisp_Object km, void *arg)
 {
+#ifdef USE_KKCC
+  Lisp_Key_Data *k = (Lisp_Key_Data *) arg;
+  return keymap_lookup_directly (km, KEY_DATA_KEYSYM (k), KEY_DATA_MODIFIERS (k));
+#else /* not USE_KKCC */
   struct key_data *k = (struct key_data *) arg;
   return keymap_lookup_directly (km, k->keysym, k->modifiers);
+#endif /* not USE_KKCC */
 }
 
 
 static void
+#ifdef USE_KKCC
+describe_map_mapper (const Lisp_Key_Data *key,
+#else /* not USE_KKCC */
 describe_map_mapper (const struct key_data *key,
+#endif /* not USE_KKCC */
                      Lisp_Object binding,
 		     void *describe_map_closure)
 {
   /* This function can GC */
   struct describe_map_closure *closure =
     (struct describe_map_closure *) describe_map_closure;
+#ifdef USE_KKCC
+  Lisp_Object keysym = KEY_DATA_KEYSYM (key);
+  int modifiers = KEY_DATA_MODIFIERS (key);
+#else /* not USE_KKCC */
   Lisp_Object keysym = key->keysym;
   int modifiers = key->modifiers;
+#endif /* not USE_KKCC */
 
   /* Don't mention suppressed commands.  */
   if (SYMBOLP (binding)
Index: src/lisp.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lisp.h,v
retrieving revision 1.84
retrieving revision 1.87
diff -u -r1.84 -r1.87
--- src/lisp.h	2002/07/23 08:35:11	1.84
+++ src/lisp.h	2002/08/30 08:05:32	1.87
@@ -1525,7 +1525,6 @@
 
 /* OK, you can open them again */
 
-
 /************************************************************************/
 /**		     Definitions of basic Lisp objects		       **/
 /************************************************************************/
@@ -2508,7 +2507,7 @@
 #define C_READONLY(obj) (C_READONLY_RECORD_HEADER_P(XRECORD_LHEADER (obj)))
 #define LISP_READONLY(obj) (LISP_READONLY_RECORD_HEADER_P(XRECORD_LHEADER (obj)))
 
-/*----------------------------- structrures ----------------------------*/
+/*----------------------------- structures ----------------------------*/
 
 typedef struct structure_keyword_entry structure_keyword_entry;
 struct structure_keyword_entry
@@ -3426,6 +3425,20 @@
 #define DUMPEDP(adr) 0
 #endif
 
+
+#ifdef USE_KKCC
+Lisp_Object allocate_event (void);
+Lisp_Object allocate_key_data (void);
+Lisp_Object allocate_button_data (void);
+Lisp_Object allocate_motion_data (void);
+Lisp_Object allocate_process_data (void);
+Lisp_Object allocate_timeout_data (void);
+Lisp_Object allocate_magic_data (void);
+Lisp_Object allocate_magic_eval_data (void);
+Lisp_Object allocate_eval_data (void);
+Lisp_Object allocate_misc_user_data (void);
+#endif /* USE_KKCC */
+
 /* Defined in buffer.c */
 Lisp_Object get_truename_buffer (Lisp_Object);
 void switch_to_buffer (Lisp_Object, Lisp_Object);
@@ -3967,7 +3980,7 @@
 int record_unwind_protect_freeing_dynarr (void *ptr);
 int internal_bind_int (int *addr, int newval);
 int internal_bind_lisp_object (Lisp_Object *addr, Lisp_Object newval);
-void do_autoload (Lisp_Object, Lisp_Object);
+void do_autoload (Lisp_Object, Lisp_Object); /* GCPROs both arguments */
 Lisp_Object un_autoload (Lisp_Object);
 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object);
 void warn_when_safe (Lisp_Object, Lisp_Object, const CIbyte *,
Index: src/lread.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lread.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- src/lread.c	2002/06/05 09:56:20	1.57
+++ src/lread.c	2002/08/02 15:35:54	1.58
@@ -1128,7 +1128,7 @@
 
    MODE nonnegative means don't open the files,
    just look for one for which access(file,MODE) succeeds.  In this case,
-   returns 1 on success.
+   returns a nonnegative value on success.  On failure, returns -1.
 
    If STOREPTR is nonzero, it points to a slot where the name of
    the file actually found should be stored as a Lisp string.
Index: src/lrecord.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lrecord.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- src/lrecord.h	2002/06/28 14:24:08	1.21
+++ src/lrecord.h	2002/07/29 09:21:22	1.22
@@ -77,6 +77,7 @@
   unsigned int lisp_readonly :1;
 
   unsigned int unused :21;
+
 };
 
 struct lrecord_implementation;
@@ -165,6 +166,17 @@
   lrecord_type_extent_auxiliary,
   lrecord_type_marker,
   lrecord_type_event,
+#ifdef USE_KKCC
+  lrecord_type_key_data,
+  lrecord_type_button_data,
+  lrecord_type_motion_data,
+  lrecord_type_process_data,
+  lrecord_type_timeout_data,
+  lrecord_type_eval_data,
+  lrecord_type_misc_user_data,
+  lrecord_type_magic_eval_data,
+  lrecord_type_magic_data,
+#endif /* USE_KKCC */
   lrecord_type_keymap,
   lrecord_type_command_builder,
   lrecord_type_timeout,
@@ -209,6 +221,10 @@
 {
   const char *name;
 
+  /* information for the dumper: is the object dumpable and should it 
+     be dumped. */
+  unsigned int dumpable :1;
+
   /* `marker' is called at GC time, to make sure that all Lisp_Objects
      pointed to by this object get properly marked.  It should call
      the mark_object function on all Lisp_Objects in the object.  If
@@ -304,6 +320,10 @@
   ((void) ((lheader)->lisp_readonly = 1))
 #define RECORD_MARKER(lheader) lrecord_markers[(lheader)->type]
 
+#ifdef USE_KKCC
+#define RECORD_DUMPABLE(lheader) (lrecord_implementations_table[(lheader)->type])->dumpable
+#endif /* USE_KKCC */
+
 /* External description stuff
 
    PLEASE NOTE: Both lrecord_description and struct_description are
@@ -635,31 +655,83 @@
 # define DECLARE_ERROR_CHECK_TYPES(c_name, structtype)
 #endif
 
+
+#ifdef USE_KKCC
+#define DEFINE_BASIC_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,structtype) \
+DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
+
+#define DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof(structtype),0,1,structtype)
+
+#define DEFINE_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,structtype) \
+DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
+
+#define DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof (structtype),0,0,structtype)
+
+#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
+DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,0,0,0,0,sizer,structtype)
+
+#define DEFINE_BASIC_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,0,0,0,0,0,sizer,1,structtype)
+
+#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizer,structtype) \
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,0,sizer,0,structtype)
+
+#define MAKE_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,size,sizer,basic_p,structtype) \
+DECLARE_ERROR_CHECK_TYPES(c_name, structtype)			\
+const struct lrecord_implementation lrecord_##c_name =			\
+  { name, dumpable, marker, printer, nuker, equal, hash, desc,		\
+    getprop, putprop, remprop, plist, size, sizer,			\
+    lrecord_type_##c_name, basic_p }
+
+#define DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,structtype) \
+DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
+
+#define DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
+MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof (structtype),0,0,structtype)
+
+#define DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
+DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,0,0,0,0,sizer,structtype)
+
+#define DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizer,structtype) \
+MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,0,sizer,0,structtype)
+
+#define MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,size,sizer,basic_p,structtype) \
+DECLARE_ERROR_CHECK_TYPES(c_name, structtype)			\
+int lrecord_type_##c_name;						\
+struct lrecord_implementation lrecord_##c_name =			\
+  { name, dumpable, marker, printer, nuker, equal, hash, desc,		\
+    getprop, putprop, remprop, plist, size, sizer,			\
+    lrecord_type_last_built_in_type, basic_p }
+
+#else /* not USE_KKCC */
+
 #define DEFINE_BASIC_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,structtype) \
 DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
 
 #define DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
-MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof(structtype),0,1,structtype)
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,0,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof(structtype),0,1,structtype)
 
 #define DEFINE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,structtype) \
 DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
 
 #define DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
-MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof (structtype),0,0,structtype)
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,0,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof (structtype),0,0,structtype)
 
 #define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,sizer,structtype)
 
 #define DEFINE_BASIC_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
-MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,0,sizer,1,structtype)
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,0,marker,printer,nuker,equal,hash,desc,0,0,0,0,0,sizer,1,structtype)
 
 #define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizer,structtype) \
-MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,0,sizer,0,structtype)
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,0,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,0,sizer,0,structtype)
 
-#define MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,size,sizer,basic_p,structtype) \
+#define MAKE_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,size,sizer,basic_p,structtype) \
 DECLARE_ERROR_CHECK_TYPES(c_name, structtype)			\
 const struct lrecord_implementation lrecord_##c_name =			\
-  { name, marker, printer, nuker, equal, hash, desc,			\
+  { name, dumpable, marker, printer, nuker, equal, hash, desc,		\
     getprop, putprop, remprop, plist, size, sizer,			\
     lrecord_type_##c_name, basic_p }
 
@@ -667,22 +739,22 @@
 DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
 
 #define DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
-MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof (structtype),0,0,structtype)
+MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,0,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof (structtype),0,0,structtype)
 
 #define DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
 DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,sizer,structtype)
 
 #define DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizer,structtype) \
-MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,0,sizer,0,structtype)
+MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,0,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,0,sizer,0,structtype)
 
-#define MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,size,sizer,basic_p,structtype) \
+#define MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,dumpable,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,size,sizer,basic_p,structtype) \
 DECLARE_ERROR_CHECK_TYPES(c_name, structtype)			\
 int lrecord_type_##c_name;						\
 struct lrecord_implementation lrecord_##c_name =			\
-  { name, marker, printer, nuker, equal, hash, desc,			\
+  { name, dumpable, marker, printer, nuker, equal, hash, desc,		\
     getprop, putprop, remprop, plist, size, sizer,			\
     lrecord_type_last_built_in_type, basic_p }
-
+#endif /* not USE_KKCC */
 
 extern Lisp_Object (*lrecord_markers[]) (Lisp_Object);
 
Index: src/lstream.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lstream.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- src/lstream.c	2002/06/05 09:56:24	1.24
+++ src/lstream.c	2002/07/29 09:21:22	1.25
@@ -114,10 +114,18 @@
   return aligned_sizeof_lstream (((const Lstream *) header)->imp->size);
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("stream", lstream,
+					0, /*dumpable-flag*/
 					mark_lstream, print_lstream,
 					finalize_lstream, 0, 0, 0,
 					sizeof_lstream, Lstream);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("stream", lstream,
+					mark_lstream, print_lstream,
+					finalize_lstream, 0, 0, 0,
+					sizeof_lstream, Lstream);
+#endif /* not USE_KKCC */
 
 
 /* Change the buffering of a stream.  See lstream.h.  By default the
Index: src/malloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/malloc.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- src/malloc.c	2001/09/20 06:29:06	1.8
+++ src/malloc.c	2002/08/29 19:45:30	1.9
@@ -149,7 +149,7 @@
 #else
 
 /* Determine which kind of system this is.  */
-#include <signal.h>
+#include "syssignal.h"
 #ifndef SIGTSTP
 #ifndef USG
 #define USG
Index: src/marker.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/marker.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- src/marker.c	2002/05/14 13:04:00	1.11
+++ src/marker.c	2002/07/29 09:21:22	1.12
@@ -103,10 +103,18 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("marker", marker,
+				     1, /*dumpable-flag*/
 				     mark_marker, print_marker, 0,
 				     marker_equal, marker_hash, marker_description,
 				     Lisp_Marker);
+#else /* not USE_KKCC */
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("marker", marker,
+				     mark_marker, print_marker, 0,
+				     marker_equal, marker_hash, marker_description,
+				     Lisp_Marker);
+#endif /* not USE_KKCC */
 
 /* Operations on markers. */
 
Index: src/menubar-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/menubar-msw.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- src/menubar-msw.c	2002/06/20 21:18:37	1.33
+++ src/menubar-msw.c	2002/08/16 08:15:42	1.34
@@ -888,8 +888,13 @@
   /* Default is to put the menu at the point (10, 10) in frame */
   if (eev)
     {
+#ifdef USE_KKCC
+      pt.x = XBUTTON_DATA_X (EVENT_DATA (eev));
+      pt.y = XBUTTON_DATA_Y (EVENT_DATA (eev));
+#else /* not USE_KKCC */
       pt.x = eev->event.button.x;
       pt.y = eev->event.button.y;
+#endif /* not USE_KKCC */
       ClientToScreen (FRAME_MSWINDOWS_HANDLE (f), &pt);
     }
   else
Index: src/menubar-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/menubar-x.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- src/menubar-x.c	2002/06/20 21:18:37	1.34
+++ src/menubar-x.c	2002/07/29 09:21:23	1.35
@@ -672,12 +672,21 @@
     {
       Position shellx, shelly, framex, framey;
       Arg al [2];
+#ifdef USE_KKCC
+      btn->time = EVENT_TIMESTAMP (eev);
+      btn->button = XBUTTON_DATA_BUTTON (EVENT_DATA (eev));
+      btn->root = RootWindowOfScreen (XtScreen (daddy));
+      btn->subwindow = (Window) NULL;
+      btn->x = XBUTTON_DATA_X (EVENT_DATA (eev));
+      btn->y = XBUTTON_DATA_Y (EVENT_DATA (eev));
+#else /* not USE_KKCC */
       btn->time = eev->timestamp;
       btn->button = eev->event.button.button;
       btn->root = RootWindowOfScreen (XtScreen (daddy));
       btn->subwindow = (Window) NULL;
       btn->x = eev->event.button.x;
       btn->y = eev->event.button.y;
+#endif /* not USE_KKCC */
       shellx = shelly = 0;
 #ifndef HAVE_WMCOMMAND
       {
Index: src/mule-charset.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-charset.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- src/mule-charset.c	2002/06/20 21:18:38	1.34
+++ src/mule-charset.c	2002/07/29 09:21:23	1.35
@@ -196,10 +196,16 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("charset", charset,
+			       1, /* dumpable flag */
                                mark_charset, print_charset, finalize_charset,
 			       0, 0, charset_description, Lisp_Charset);
-
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("charset", charset,
+                               mark_charset, print_charset, finalize_charset,
+			       0, 0, charset_description, Lisp_Charset);
+#endif /* not USE_KKCC */
 /* Make a new charset. */
 /* #### SJT Should generic properties be allowed? */
 static Lisp_Object
Index: src/objects-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-gtk.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- src/objects-gtk.c	2002/06/20 21:18:38	1.9
+++ src/objects-gtk.c	2002/08/02 15:18:46	1.10
@@ -425,7 +425,7 @@
 
 /* find a font spec that matches font spec FONT and also matches
    (the registry of) CHARSET. */
-static Lisp_Object gtk_find_charset_font (Lisp_Object device, Lisp_Object font, Lisp_Object charset);
+static Lisp_Object gtk_find_charset_font (Lisp_Object device, Lisp_Object font, Lisp_Object charset, int stage);
 
 #endif /* MULE */
 
Index: src/objects-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-impl.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- src/objects-impl.h	2002/06/20 21:18:39	1.1
+++ src/objects-impl.h	2002/07/29 09:21:23	1.2
@@ -103,6 +103,10 @@
   Lisp_Object name;
   Lisp_Object device;
 
+#ifdef USE_KKCC
+  enum console_variant color_instance_type;
+#endif /* USE_KKCC */
+
   /* console-type-specific data */
   void *data;
 };
@@ -124,6 +128,10 @@
 			   if they know it, and nil otherwise; we should
 			   check this and enforce it as a general policy) */
   Lisp_Object device;
+
+#ifdef USE_KKCC
+  enum console_variant font_instance_type;
+#endif /* USE_KKCC */
 
   unsigned short ascent;	/* extracted from `font', or made up */
   unsigned short descent;
Index: src/objects.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- src/objects.c	2002/06/22 17:14:45	1.16
+++ src/objects.c	2002/07/29 09:21:23	1.17
@@ -35,6 +35,10 @@
 #include "specifier.h"
 #include "window.h"
 
+#ifdef USE_KKCC
+#include "objects-tty-impl.h"
+#endif /* USE_KKCC */
+
 /* Objects that are substituted when an instantiation fails.
    If we leave in the Qunbound value, we will probably get crashes. */
 Lisp_Object Vthe_null_color_instance, Vthe_null_font_instance;
@@ -58,6 +62,36 @@
 
 Lisp_Object Qcolor_instancep;
 
+#ifdef USE_KKCC
+static const struct lrecord_description empty_color_instance_data_description [] = {
+  { XD_END }
+};
+
+static const struct lrecord_description tty_color_instance_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct tty_color_instance_data, symbol) },
+  { XD_END }
+};
+
+static const struct struct_description color_instance_data_description []= {
+  { dead_console, empty_color_instance_data_description},
+  { tty_console, tty_color_instance_data_description},
+  { gtk_console, empty_color_instance_data_description},
+  { x_console, empty_color_instance_data_description},
+  { mswindows_console, empty_color_instance_data_description},
+  { stream_console, empty_color_instance_data_description},
+  { XD_END }
+};
+
+static const struct lrecord_description color_instance_description[] = {
+  { XD_INT, offsetof (Lisp_Color_Instance, color_instance_type) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Color_Instance, name)},
+  { XD_LISP_OBJECT, offsetof (Lisp_Color_Instance, device)},
+  { XD_UNION, offsetof (Lisp_Color_Instance, data), 
+    XD_INDIRECT (0, 0), color_instance_data_description },
+  {XD_END}
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_color_instance (Lisp_Object obj)
 {
@@ -122,11 +156,21 @@
 				    LISP_HASH (obj)));
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("color-instance", color_instance,
+			       0, /*dumpable-flag*/
+			       mark_color_instance, print_color_instance,
+			       finalize_color_instance, color_instance_equal,
+			       color_instance_hash, 
+			       color_instance_description,
+			       Lisp_Color_Instance);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("color-instance", color_instance,
 			       mark_color_instance, print_color_instance,
 			       finalize_color_instance, color_instance_equal,
 			       color_instance_hash, 0,
 			       Lisp_Color_Instance);
+#endif /* not USE_KKCC */
 
 DEFUN ("make-color-instance", Fmake_color_instance, 1, 3, 0, /*
 Return a new `color-instance' object named NAME (a string).
@@ -157,6 +201,9 @@
   c->name = name;
   c->device = device;
   c->data = 0;
+#ifdef USE_KKCC
+  c->color_instance_type = get_console_variant(XDEVICE_TYPE(c->device));
+#endif /* USE_KKCC */
 
   retval = MAYBE_INT_DEVMETH (XDEVICE (device), initialize_color_instance,
 			      (c, name, device,
@@ -231,7 +278,38 @@
 
 static Lisp_Object font_instance_truename_internal (Lisp_Object xfont,
 						    Error_Behavior errb);
+#ifdef USE_KKCC
+static const struct lrecord_description empty_font_instance_data_description [] = {
+  { XD_END }
+};
+
+static const struct lrecord_description tty_font_instance_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct tty_font_instance_data, charset) },
+  { XD_END }
+};
+
+static const struct struct_description font_instance_data_description []= {
+  { dead_console, empty_font_instance_data_description},
+  { tty_console, tty_font_instance_data_description},
+  { gtk_console, empty_font_instance_data_description},
+  { x_console, empty_font_instance_data_description},
+  { mswindows_console, empty_font_instance_data_description},
+  { stream_console, empty_font_instance_data_description},
+  { XD_END }
+};
+
+static const struct lrecord_description font_instance_description[] = {
+  { XD_INT, offsetof (Lisp_Font_Instance, font_instance_type) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, name)},
+  { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, truename)},
+  { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, device)},
+  { XD_UNION, offsetof (Lisp_Font_Instance, data), 
+    XD_INDIRECT (0, 0), font_instance_data_description },
+  {XD_END}
+};
+#endif /* USE_KKCC */
 
+
 static Lisp_Object
 mark_font_instance (Lisp_Object obj)
 {
@@ -294,10 +372,19 @@
 			depth + 1);
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("font-instance", font_instance,
+			       0, /*dumpable-flag*/
 			       mark_font_instance, print_font_instance,
 			       finalize_font_instance, font_instance_equal,
+			       font_instance_hash, font_instance_description, Lisp_Font_Instance);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("font-instance", font_instance,
+			       mark_font_instance, print_font_instance,
+			       finalize_font_instance, font_instance_equal,
 			       font_instance_hash, 0, Lisp_Font_Instance);
+#endif /* not USE_KKCC */
+
 
 DEFUN ("make-font-instance", Fmake_font_instance, 1, 3, 0, /*
 Return a new `font-instance' object named NAME.
@@ -330,6 +417,9 @@
   f->device = device;
 
   f->data = 0;
+#ifdef USE_KKCC
+  f->font_instance_type = get_console_variant(XDEVICE_TYPE(f->device));
+#endif /* USE_KKCC */
 
   /* Stick some default values here ... */
   f->ascent = f->height = 1;
Index: src/opaque.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/opaque.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- src/opaque.c	2002/05/28 08:44:57	1.14
+++ src/opaque.c	2002/07/29 09:21:23	1.15
@@ -112,11 +112,20 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("opaque", opaque,
+					1, /*dumpable-flag*/
 					0, print_opaque, 0,
 					equal_opaque, hash_opaque,
 					opaque_description,
 					sizeof_opaque, Lisp_Opaque);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("opaque", opaque,
+					0, print_opaque, 0,
+					equal_opaque, hash_opaque,
+					opaque_description,
+					sizeof_opaque, Lisp_Opaque);
+#endif /* not USE_KKCC */
 
 /* stuff to handle opaque pointers */
 
@@ -144,10 +153,18 @@
   return (unsigned long) XOPAQUE_PTR (obj)->ptr;
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("opaque-ptr", opaque_ptr,
+			       0, /*dumpable-flag*/
+			       0, print_opaque_ptr, 0,
+			       equal_opaque_ptr, hash_opaque_ptr, 0,
+			       Lisp_Opaque_Ptr);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("opaque-ptr", opaque_ptr,
 			       0, print_opaque_ptr, 0,
 			       equal_opaque_ptr, hash_opaque_ptr, 0,
 			       Lisp_Opaque_Ptr);
+#endif /* not USE_KKCC */
 
 Lisp_Object
 make_opaque_ptr (void *val)
Index: src/postgresql.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/postgresql.c,v
retrieving revision 1.8
retrieving revision 1.10
diff -u -r1.8 -r1.10
--- src/postgresql.c	2002/06/20 21:18:40	1.8
+++ src/postgresql.c	2002/08/02 11:37:01	1.10
@@ -178,6 +178,12 @@
   return wrap_pgconn (pgconn);
 }
 
+#ifdef USE_KKCC
+static const struct lrecord_description pgconn_description [] = {
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 #ifdef RUNNING_XEMACS_21_1
 mark_pgconn (Lisp_Object obj, void (*markobj) (Lisp_Object))
@@ -261,11 +267,20 @@
 			       NULL, NULL,
 			       Lisp_PGconn);
 #else
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("pgconn", pgconn,
+			       0, /*dumpable-flag*/
+			       mark_pgconn, print_pgconn, finalize_pgconn,
+			       NULL, NULL,
+			       pgconn_description,
+			       Lisp_PGconn);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("pgconn", pgconn,
 			       mark_pgconn, print_pgconn, finalize_pgconn,
 			       NULL, NULL,
 			       0,
 			       Lisp_PGconn);
+#endif /* not USE_KKCC */
 #endif
 /****/
 
@@ -280,6 +295,13 @@
   return wrap_pgresult (pgresult);
 }
 
+#ifdef USE_KKCC
+static const struct lrecord_description pgresult_description [] = {
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
+
 static Lisp_Object
 #ifdef RUNNING_XEMACS_21_1
 mark_pgresult (Lisp_Object obj, void (*markobj) (Lisp_Object))
@@ -378,11 +400,20 @@
 			       NULL, NULL,
 			       Lisp_PGresult);
 #else
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("pgresult", pgresult,
+			       0, /*dumpable-flag*/			       
+			       mark_pgresult, print_pgresult, finalize_pgresult,
+			       NULL, NULL,
+			       pgresult_description,
+			       Lisp_PGresult);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("pgresult", pgresult,
 			       mark_pgresult, print_pgresult, finalize_pgresult,
 			       NULL, NULL,
 			       0,
 			       Lisp_PGresult);
+#endif /* not USE_KKCC */
 #endif
 
 /***********************/
Index: src/process-unix.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/process-unix.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- src/process-unix.c	2002/07/25 00:23:46	1.46
+++ src/process-unix.c	2002/07/31 07:23:39	1.47
@@ -72,6 +72,7 @@
  * Implementation-specific data. Pointed to by Lisp_Process->process_data
  */
 
+#ifndef USE_KKCC
 struct unix_process_data
 {
   /* Non-0 if this is really a ToolTalk channel. */
@@ -89,7 +90,7 @@
   /* Non-false if communicating through a pty.  */
   char pty_flag;
 };
-
+#endif /* not USE_KKCC */
 #define UNIX_DATA(p) ((struct unix_process_data*) ((p)->process_data))
 
 
Index: src/process.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/process.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- src/process.c	2002/07/09 11:56:04	1.60
+++ src/process.c	2002/07/29 09:21:23	1.61
@@ -138,6 +138,47 @@
 
 
 
+#ifdef USE_KKCC
+static const struct lrecord_description empty_process_data_description [] = {
+  { XD_END }
+};
+
+static const struct lrecord_description unix_process_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct unix_process_data, tty_name) },
+  { XD_END }
+};
+
+static const struct struct_description process_data_description []= {
+  { unix_process, unix_process_data_description},
+  { nt_process, empty_process_data_description},
+  { XD_END }
+};
+
+static const struct lrecord_description process_description [] = {
+  { XD_INT, offsetof (Lisp_Process, process_type) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, name) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, command) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, filter) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, stderr_filter) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, sentinel) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, buffer) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, mark) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, stderr_buffer) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, stderr_mark) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, pid) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, pipe_instream) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, pipe_outstream) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, pipe_errstream) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, coding_instream) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, coding_outstream) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, coding_errstream) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Process, status_symbol) },
+  { XD_UNION, offsetof (Lisp_Process, process_data), 
+    XD_INDIRECT (0, 0), process_data_description },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_process (Lisp_Object object)
 {
@@ -214,9 +255,16 @@
     }
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("process", process,
+			       0, /*dumpable-flag*/
+                               mark_process, print_process, finalize_process,
+                               0, 0, process_description, Lisp_Process);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("process", process,
                                mark_process, print_process, finalize_process,
                                0, 0, 0, Lisp_Process);
+#endif /* not USE_KKCC */
 
 /************************************************************************/
 /*                       basic process accessors                        */
@@ -531,6 +579,14 @@
 
   p->process_data = 0;
   MAYBE_PROCMETH (alloc_process_data, (p));
+
+#ifdef USE_KKCC
+#ifdef HAVE_MS_WINDOWS
+  p->process_type = nt_process;
+#else /*HAVE_MS_WINDOWS*/
+  p->process_type = unix_process;
+#endif /*HAVE_MS_WINDOWS*/
+#endif /* USE_KKCC */
 
   val = wrap_process (p);
 
Index: src/process.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/process.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- src/process.h	2002/06/20 21:18:41	1.18
+++ src/process.h	2002/07/29 09:21:24	1.19
@@ -39,6 +39,15 @@
 /* struct Lisp_Process is defined in procimpl.h; only process-*.c need
    to know about the guts of it. */
 
+#ifdef USE_KKCC
+enum process_variant
+{
+  unix_process,
+  nt_process
+};
+
+#endif /* USE_KKCC */
+
 DECLARE_LRECORD (process, Lisp_Process);
 #define XPROCESS(x) XRECORD (x, process, Lisp_Process)
 #define wrap_process(p) wrap_record (p, process)
Index: src/procimpl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/procimpl.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- src/procimpl.h	2002/06/05 09:56:52	1.8
+++ src/procimpl.h	2002/07/29 09:21:24	1.9
@@ -149,6 +149,10 @@
   Lisp_Object coding_outstream;
   Lisp_Object coding_errstream;
 
+#ifdef USE_KKCC
+  enum process_variant process_type;
+#endif /* USE_KKCC */
+
   /* Implementation dependent data */
   void *process_data;
 };
@@ -185,5 +189,25 @@
 		   Lisp_Object relocatable,
 		   const Ibyte *nonrelocatable,
 		   int start, int len);
+
+#ifdef USE_KKCC
+struct unix_process_data
+{
+  /* Non-0 if this is really a ToolTalk channel. */
+  int connected_via_filedesc_p;
+  /* Descriptor by which we read from this process.  -1 for dead process */
+  int infd;
+  /* Descriptor by which we read stderr from this process.  -1 for
+     dead process */
+  int errfd;
+  /* Descriptor for the tty which this process is using.
+     -1 if we didn't record it (on some systems, there's no need).  */
+  int subtty;
+  /* Name of subprocess terminal. */
+  Lisp_Object tty_name;
+  /* Non-false if communicating through a pty.  */
+  char pty_flag;
+};
+#endif /* USE_KKCC */
 
 #endif /* INCLUDED_procimpl_h_ */
Index: src/rangetab.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/rangetab.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- src/rangetab.c	2002/05/05 11:32:15	1.13
+++ src/rangetab.c	2002/07/29 09:21:24	1.14
@@ -156,11 +156,20 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table,
+			       1, /*dumpable-flag*/
                                mark_range_table, print_range_table, 0,
 			       range_table_equal, range_table_hash,
 			       range_table_description,
 			       Lisp_Range_Table);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table,
+                               mark_range_table, print_range_table, 0,
+			       range_table_equal, range_table_hash,
+			       range_table_description,
+			       Lisp_Range_Table);
+#endif /* not USE_KKCC */
 
 /************************************************************************/
 /*                        Range table operations                        */
Index: src/scrollbar.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/scrollbar.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- src/scrollbar.c	2002/06/20 21:18:44	1.25
+++ src/scrollbar.c	2002/07/29 09:21:24	1.26
@@ -77,6 +77,14 @@
 static void update_scrollbar_instance (struct window *w, int vertical,
 				       struct scrollbar_instance *instance);
 
+#ifdef USE_KKCC
+static const struct lrecord_description scrollbar_instance_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct scrollbar_instance, mirror) },
+  { XD_LISP_OBJECT, offsetof (struct scrollbar_instance, next) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 
 static Lisp_Object
 mark_scrollbar_instance (Lisp_Object obj)
@@ -89,10 +97,19 @@
     return Qnil;
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("scrollbar-instance", scrollbar_instance,
+			       0, /*dumpable-flag*/
+			       mark_scrollbar_instance,
+			       internal_object_printer, 0, 0, 0, 
+			       scrollbar_instance_description,
+			       struct scrollbar_instance);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("scrollbar-instance", scrollbar_instance,
 			       mark_scrollbar_instance,
 			       internal_object_printer, 0, 0, 0, 0,
 			       struct scrollbar_instance);
+#endif /* not USE_KKCC */
 
 static void
 free_scrollbar_instance (struct scrollbar_instance *instance,
Index: src/specifier.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/specifier.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- src/specifier.c	2002/06/20 21:18:46	1.28
+++ src/specifier.c	2002/07/29 09:21:24	1.29
@@ -407,13 +407,24 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("specifier", specifier,
+					1, /*dumpable-flag*/
 					mark_specifier, print_specifier,
 					finalize_specifier,
 					specifier_equal, specifier_hash,
 					specifier_description,
 					sizeof_specifier,
 					Lisp_Specifier);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("specifier", specifier,
+					mark_specifier, print_specifier,
+					finalize_specifier,
+					specifier_equal, specifier_hash,
+					specifier_description,
+					sizeof_specifier,
+					Lisp_Specifier);
+#endif /* not USE_KKCC */
 
 /************************************************************************/
 /*                       Creating specifiers                            */
Index: src/symbols.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/symbols.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- src/symbols.c	2002/07/23 08:35:11	1.39
+++ src/symbols.c	2002/07/29 09:21:24	1.40
@@ -136,7 +136,9 @@
   return external_remprop (&XSYMBOL (symbol)->plist, property, 0, ERROR_ME);
 }
 
+#ifdef USE_KKCC
 DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("symbol", symbol,
+						1, /*dumpable-flag*/
 						mark_symbol, print_symbol,
 						0, 0, 0, symbol_description,
 						symbol_getprop,
@@ -144,7 +146,16 @@
 						symbol_remprop,
 						Fsymbol_plist,
 						Lisp_Symbol);
-
+#else /* not USE_KKCC */
+DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("symbol", symbol,
+						mark_symbol, print_symbol,
+						0, 0, 0, symbol_description,
+						symbol_getprop,
+						symbol_putprop,
+						symbol_remprop,
+						Fsymbol_plist,
+						Lisp_Symbol);
+#endif /* not USE_KKCC */
 
 /**********************************************************************/
 /*                              Intern				      */
@@ -1007,8 +1018,10 @@
   { XD_END }
 };
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-forward",
 			       symbol_value_forward,
+			       1, /*dumpable-flag*/
 			       0,
 			       print_symbol_value_magic, 0, 0, 0,
 			       symbol_value_forward_description,
@@ -1016,6 +1029,7 @@
 
 DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-buffer-local",
 			       symbol_value_buffer_local,
+			       1, /*dumpable-flag*/
 			       mark_symbol_value_buffer_local,
 			       print_symbol_value_magic, 0, 0, 0,
 			       symbol_value_buffer_local_description,
@@ -1023,6 +1037,7 @@
 
 DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-lisp-magic",
 			       symbol_value_lisp_magic,
+			       1, /*dumpable-flag*/
 			       mark_symbol_value_lisp_magic,
 			       print_symbol_value_magic, 0, 0, 0,
 			       symbol_value_lisp_magic_description,
@@ -1030,11 +1045,42 @@
 
 DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-varalias",
 			       symbol_value_varalias,
+			       1, /*dumpable-flag*/
 			       mark_symbol_value_varalias,
 			       print_symbol_value_magic, 0, 0, 0,
 			       symbol_value_varalias_description,
 			       struct symbol_value_varalias);
 
+#else /* not USE_KKCC */
+
+DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-forward",
+			       symbol_value_forward,
+			       0,
+			       print_symbol_value_magic, 0, 0, 0,
+			       symbol_value_forward_description,
+			       struct symbol_value_forward);
+
+DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-buffer-local",
+			       symbol_value_buffer_local,
+			       mark_symbol_value_buffer_local,
+			       print_symbol_value_magic, 0, 0, 0,
+			       symbol_value_buffer_local_description,
+			       struct symbol_value_buffer_local);
+
+DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-lisp-magic",
+			       symbol_value_lisp_magic,
+			       mark_symbol_value_lisp_magic,
+			       print_symbol_value_magic, 0, 0, 0,
+			       symbol_value_lisp_magic_description,
+			       struct symbol_value_lisp_magic);
+
+DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-varalias",
+			       symbol_value_varalias,
+			       mark_symbol_value_varalias,
+			       print_symbol_value_magic, 0, 0, 0,
+			       symbol_value_varalias_description,
+			       struct symbol_value_varalias);
+#endif /* not USE_KKCC */
 
 /* Getting and setting values of symbols */
 
@@ -3373,7 +3419,6 @@
 	assert (subr->max_args <= SUBR_MAX_ARGS);
 	assert (subr->min_args <= subr->max_args);
       }
-
     assert (UNBOUNDP (XSYMBOL (sym)->function));
   }
 }
Index: src/syssignal.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/syssignal.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- src/syssignal.h	2002/06/20 21:18:47	1.13
+++ src/syssignal.h	2002/08/29 19:45:30	1.14
@@ -251,7 +251,15 @@
 #endif
 
 #ifndef NSIG
-# define NSIG (SIGUSR2+1) /* guess how many elements are in sys_siglist... */
+# ifdef USG5_4
+/* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
+ * instead, there's a system variable _sys_nsig.  Unfortunately, we need the
+ * constant to dimension an array.  So wire in the appropriate value here.
+ */
+#  define NSIG 32
+# else
+#  define NSIG (SIGUSR2+1) /* guess how many elements are in sys_siglist... */
+# endif
 #endif
 
 /* SYS_SIGLIST_DECLARED is determined by configure.  On Linux, it seems,
Index: src/toolbar.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/toolbar.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- src/toolbar.c	2002/07/06 21:05:58	1.27
+++ src/toolbar.c	2002/07/29 09:21:25	1.28
@@ -56,6 +56,22 @@
 
 Lisp_Object Qinit_toolbar_from_resources;
 
+#ifdef USE_KKCC
+static const struct lrecord_description toolbar_button_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, next) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, frame) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, up_glyph) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, down_glyph) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, disabled_glyph) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, cap_up_glyph) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, cap_down_glyph) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, cap_disabled_glyph) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, callback) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, enabled_p) },
+  { XD_LISP_OBJECT, offsetof (struct toolbar_button, help_string) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
 
 static Lisp_Object
 mark_toolbar_button (Lisp_Object obj)
@@ -74,9 +90,17 @@
   return data->help_string;
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("toolbar-button", toolbar_button,
+			       0, /*dumpable-flag*/
+			       mark_toolbar_button, 0, 0, 0, 0, 
+			       toolbar_button_description,
+			       struct toolbar_button);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("toolbar-button", toolbar_button,
 			       mark_toolbar_button, 0, 0, 0, 0, 0,
 			       struct toolbar_button);
+#endif /* not USE_KKCC */
 
 DEFUN ("toolbar-button-p", Ftoolbar_button_p, 1, 1, 0, /*
 Return non-nil if OBJECT is a toolbar button.
Index: src/tooltalk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/tooltalk.c,v
retrieving revision 1.28
retrieving revision 1.30
diff -u -r1.28 -r1.30
--- src/tooltalk.c	2002/06/05 09:57:28	1.28
+++ src/tooltalk.c	2002/08/12 08:00:06	1.30
@@ -152,6 +152,14 @@
   Tt_message m;
 };
 
+#ifdef USE_KKCC
+static const struct lrecord_description tooltalk_message_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Tooltalk_Message, callback) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Tooltalk_Message, plist_sym) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_tooltalk_message (Lisp_Object obj)
 {
@@ -173,10 +181,19 @@
 		    (long) (p->m), p->header.uid);
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message,
+			       0, /*dumpable-flag*/
+                               mark_tooltalk_message, print_tooltalk_message,
+                               0, 0, 0, 
+			       tooltalk_message_description,
+			       Lisp_Tooltalk_Message);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message,
                                mark_tooltalk_message, print_tooltalk_message,
                                0, 0, 0, 0,
 			       Lisp_Tooltalk_Message);
+#endif /* not USE_KKCC */
 
 static Lisp_Object
 make_tooltalk_message (Tt_message m)
@@ -222,6 +239,14 @@
   Tt_pattern p;
 };
 
+#ifdef USE_KKCC
+static const struct lrecord_description tooltalk_pattern_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Tooltalk_Pattern, callback) },
+  { XD_LISP_OBJECT, offsetof (struct Lisp_Tooltalk_Pattern, plist_sym) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_tooltalk_pattern (Lisp_Object obj)
 {
@@ -243,10 +268,19 @@
 		    (long) (p->p), p->header.uid);
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern,
+			       0, /*dumpable-flag*/
+                               mark_tooltalk_pattern, print_tooltalk_pattern,
+                               0, 0, 0, 
+			       tooltalk_pattern_description,
+			       Lisp_Tooltalk_Pattern);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern,
                                mark_tooltalk_pattern, print_tooltalk_pattern,
                                0, 0, 0, 0,
 			       Lisp_Tooltalk_Pattern);
+#endif /* not USE_KKCC */
 
 static Lisp_Object
 make_tooltalk_pattern (Tt_pattern p)
Index: src/ui-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ui-gtk.c,v
retrieving revision 1.9
retrieving revision 1.11
diff -u -r1.9 -r1.11
--- src/ui-gtk.c	2002/06/05 09:57:29	1.9
+++ src/ui-gtk.c	2002/08/12 08:00:07	1.11
@@ -298,6 +298,13 @@
   return (data);
 }
 
+#ifdef USE_KKCC
+static const struct lrecord_description ffi_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct emacs_ffi_data, function_name) }, 
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_ffi_data (Lisp_Object obj)
 {
@@ -319,9 +326,17 @@
   write_fmt_string (printcharfun, " %p>", (void *)XFFI (obj)->function_ptr);
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("ffi", emacs_ffi,
+			       0, /*dumpable-flag*/
+			       mark_ffi_data, ffi_object_printer,
+			       0, 0, 0, 
+			       ffi_data_description, emacs_ffi_data);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("ffi", emacs_ffi,
 			       mark_ffi_data, ffi_object_printer,
 			       0, 0, 0, NULL, emacs_ffi_data);
+#endif /* not USE_KKCC */
 
 typedef GtkObject * (*__OBJECT_fn) ();
 typedef gint (*__INT_fn) ();
@@ -885,6 +900,13 @@
   return (1);
 }
 
+#ifdef USE_KKCC
+static const struct lrecord_description gtk_object_data_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct emacs_gtk_object_data, plist) }, 
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_gtk_object_data (Lisp_Object obj)
 {
@@ -911,18 +933,34 @@
     }
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("GtkObject", emacs_gtk_object,
+					  0, /*dumpable-flag*/
 					  mark_gtk_object_data, /* marker function */
 					  emacs_gtk_object_printer, /* print function */
 					  emacs_gtk_object_finalizer, /* finalizer */
 					  0, /* equality */
 					  0, /* hash */
+					  gtk_object_data_description, /* desc */
+					  object_getprop, /* get prop */
+					  object_putprop, /* put prop */
+					  0, /* rem prop */
+					  0, /* plist */
+					  emacs_gtk_object_data);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("GtkObject", emacs_gtk_object,
+					  mark_gtk_object_data, /* marker function */
+					  emacs_gtk_object_printer, /* print function */
+					  emacs_gtk_object_finalizer, /* finalizer */
+					  0, /* equality */
+					  0, /* hash */
 					  NULL, /* desc */
 					  object_getprop, /* get prop */
 					  object_putprop, /* put prop */
 					  0, /* rem prop */
 					  0, /* plist */
 					  emacs_gtk_object_data);
+#endif /* not USE_KKCC */
 
 static emacs_gtk_object_data *
 allocate_emacs_gtk_object_data (void)
@@ -1073,6 +1111,12 @@
 
 
 /* GTK_TYPE_BOXED wrapper for Emacs lisp */
+#ifdef USE_KKCC
+static const struct lrecord_description emacs_gtk_boxed_description [] = {
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static void
 emacs_gtk_boxed_printer (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
@@ -1101,19 +1145,34 @@
   return (HASH2 ((unsigned long)data->object, data->object_type));
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("GtkBoxed", emacs_gtk_boxed,
+					  0, /*dumpable-flag*/
 					  0, /* marker function */
 					  emacs_gtk_boxed_printer, /* print function */
 					  0, /* nuker */
 					  emacs_gtk_boxed_equality, /* equality */
 					  emacs_gtk_boxed_hash, /* hash */
+					  emacs_gtk_boxed_description, /* desc */
+					  0, /* get prop */
+					  0, /* put prop */
+					  0, /* rem prop */
+					  0, /* plist */
+					  emacs_gtk_boxed_data);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("GtkBoxed", emacs_gtk_boxed,
+					  0, /* marker function */
+					  emacs_gtk_boxed_printer, /* print function */
+					  0, /* nuker */
+					  emacs_gtk_boxed_equality, /* equality */
+					  emacs_gtk_boxed_hash, /* hash */
 					  NULL, /* desc */
 					  0, /* get prop */
 					  0, /* put prop */
 					  0, /* rem prop */
 					  0, /* plist */
 					  emacs_gtk_boxed_data);
-
+#endif /* not USE_KKCC */
 /* Currently defined GTK_TYPE_BOXED structures are:
 
    GtkAccelGroup -
Index: src/unexhp9k3.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/unexhp9k3.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- src/unexhp9k3.c	2001/04/12 18:24:27	1.4
+++ src/unexhp9k3.c	2002/08/29 19:45:30	1.5
@@ -41,7 +41,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <errno.h>
-#include <signal.h>
+#include "syssignal.h"
 #ifdef __hp9000s300
 # include </usr/include/debug.h>
 #endif
Index: src/window.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/window.c,v
retrieving revision 1.66
retrieving revision 1.68
diff -u -r1.66 -r1.68
--- src/window.c	2002/06/20 21:18:49	1.66
+++ src/window.c	2002/08/08 15:30:04	1.68
@@ -231,10 +231,16 @@
   return make_lisp_hash_table (20, HASH_TABLE_KEY_WEAK, HASH_TABLE_EQ);
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_IMPLEMENTATION ("window", window,
+			       0, /*dumpable-flag*/
                                mark_window, print_window, finalize_window,
 			       0, 0, 0, struct window);
-
+#else /* not USE_KKCC */
+DEFINE_LRECORD_IMPLEMENTATION ("window", window,
+                               mark_window, print_window, finalize_window,
+			       0, 0, 0, struct window);
+#endif /* not USE_KKCC */
 
 #define INIT_DISP_VARIABLE(field, initialization)	\
   p->field[CURRENT_DISP] = initialization;		\
@@ -336,6 +342,12 @@
    because neither structure is created very often (only when windows are
    created or deleted). --ben */
 
+#ifdef USE_KKCC
+static const struct lrecord_description window_mirror_description [] = {
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_window_mirror (Lisp_Object obj)
 {
@@ -368,9 +380,16 @@
     return Qnil;
 }
 
+#ifdef USE_KKCC
+DEFINE_LRECORD_IMPLEMENTATION ("window-mirror", window_mirror,
+			       0, /*dumpable-flag*/
+                               mark_window_mirror, internal_object_printer,
+			       0, 0, 0, 0/*window_mirror_description*/, struct window_mirror);
+#else /* not USE_KKCC */
 DEFINE_LRECORD_IMPLEMENTATION ("window-mirror", window_mirror,
                                mark_window_mirror, internal_object_printer,
 			       0, 0, 0, 0, struct window_mirror);
+#endif /* not USE_KKCC */
 
 /* Create a new window mirror structure and associated redisplay
    structs. */
@@ -3819,7 +3838,7 @@
 	/* In the new scheme, we are symmetric with respect to separators
 	   so there is no need to do weird things here. */
 	{
-	  psize = WINDOW_WIDTH (o) >> 1;
+	  psize = (WINDOW_WIDTH (o) + window_divider_width (o)) >> 1;
 	  csize = window_pixel_width_to_char_width (o, psize, 0);
         }
       else
@@ -5192,6 +5211,19 @@
 #define WINDOW_CONFIGURATIONP(x) RECORDP (x, window_configuration)
 #define CHECK_WINDOW_CONFIGURATION(x) CHECK_RECORD (x, window_configuration)
 
+#ifdef USE_KKCC
+static const struct struct_description saved_window_description = {
+};
+
+static const struct lrecord_description window_config_description [] = {
+  { XD_LISP_OBJECT, offsetof (struct window_config, current_window) },
+  { XD_LISP_OBJECT, offsetof (struct window_config, current_buffer) },
+  { XD_LISP_OBJECT, offsetof (struct window_config, minibuffer_scroll_window) },
+  { XD_LISP_OBJECT, offsetof (struct window_config, root_window) },
+  { XD_END }
+};
+#endif /* USE_KKCC */
+
 static Lisp_Object
 mark_window_config (Lisp_Object obj)
 {
@@ -5251,13 +5283,23 @@
   write_fmt_string (printcharfun, "0x%x>", config->header.uid);
 }
 
+#ifdef USE_KKCC
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("window-configuration",
 					window_configuration,
+					0, /*dumpable-flag*/
 					mark_window_config,
 					print_window_config,
+					0, 0, 0, 
+					0/*window_config_description*/, sizeof_window_config,
+					struct window_config);
+#else /* not USE_KKCC */
+DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("window-configuration",
+					window_configuration,
+					mark_window_config,
+					print_window_config,
 					0, 0, 0, 0, sizeof_window_config,
 					struct window_config);
-
+#endif /* not USE_KKCC */
 
 /* Returns a boolean indicating whether the two saved windows are
    identical. */
Index: src/s/linux.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/s/linux.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- src/s/linux.h	2002/06/04 06:05:47	1.18
+++ src/s/linux.h	2002/08/12 14:45:34	1.19
@@ -131,11 +131,11 @@
 #ifdef LINUX_ELF
 #define UNEXEC "unexelf.o"
 #define UNEXEC_USE_MAP_PRIVATE
-#if 0
+
 /* mrb - Ordinary link is simple and effective */
 /* slb - Not any more ... :-( */
+/* jwj - slb's comment does not seem relevant to current Linuxes */
 #define ORDINARY_LINK
-#endif /* 0 */
 
 /* I still think ORDINARY_LINK should be the default, but since slb
    insists, ORDINARY_LINK will stay on until we expunge the dump code.
Index: src/s/usg5-4.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/s/usg5-4.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- src/s/usg5-4.h	2001/06/10 10:42:39	1.8
+++ src/s/usg5-4.h	2002/08/29 19:45:34	1.9
@@ -79,21 +79,11 @@
 #include <sys/filio.h>
 #include <termio.h>
 #include <sys/ttold.h>
-#include <signal.h>
 #include <sys/stream.h>
 #include <sys/termios.h>
 #endif
 
 #undef BROKEN_SIGIO
-
-/* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
- * instead, there's a system variable _sys_nsig.  Unfortunately, we need the
- * constant to dimension an array.  So wire in the appropriate value here.
- */
-
-#ifndef NSIG
-#define NSIG	32
-#endif
 
 /* We need bss_end from emacs.c for undumping */
 
Index: src/s/win32-native.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/s/win32-native.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- src/s/win32-native.h	2002/03/13 08:53:23	1.2
+++ src/s/win32-native.h	2002/07/29 21:06:12	1.3
@@ -40,6 +40,9 @@
 /* Define process implementation */
 #define HAVE_WIN32_PROCESSES
 
+/* Wide characters are supported */
+#define HAVE_WCHAR_H
+
 /* These two are used in etags.c. */
 #define popen _popen
 #define pclose _pclose
Index: tests/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/ChangeLog,v
retrieving revision 1.19
retrieving revision 1.21
diff -u -r1.19 -r1.21
--- tests/ChangeLog	2002/07/27 03:53:09	1.19
+++ tests/ChangeLog	2002/08/30 08:26:22	1.21
@@ -1,3 +1,16 @@
+2002-08-30  Steve Youngs  <youngs@xemacs.org>
+
+	* XEmacs 21.5.9 "brussels sprouts" is released.
+
+2002-08-22  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* automated/test-harness.el (test-harness-from-buffer):
+	Print-Skip: new local function.
+
+	* automated/syntax-tests.el (forward-comment at buffer boundaries):
+	* automated/test-harness.el (Check-Message):
+	Warn, not barf, if required packages are unavailable.
+
 2002-07-27  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.8 "broccoli" is released.
Index: tests/automated/syntax-tests.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/automated/syntax-tests.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tests/automated/syntax-tests.el	2001/04/12 18:24:55	1.2
+++ tests/automated/syntax-tests.el	2002/08/22 14:56:27	1.3
@@ -127,16 +127,25 @@
 
 ;; Test forward-comment at buffer boundaries
 (with-temp-buffer
-  (c-mode)
-  (insert "// comment\n")
-  (forward-comment -2)
-  (Assert (eq (point) (point-min)))
+  (if (not (fboundp 'c-mode))
+      ;; #### This whole thing should go inside a macro Skip-Test
+      (let* ((reason "c-mode unavailable")
+	     (count (gethash reason skipped-test-reasons)))
+	;;(message "%S: %S" reason count)
+	(puthash reason (if (null count) 1 (1+ count))
+		 skipped-test-reasons)
+	(Print-Skip "comment and parse-partial-sexp tests" reason))
+    (c-mode)
+    
+    (insert "// comment\n")
+    (forward-comment -2)
+    (Assert (eq (point) (point-min)))
 
-  (let ((point (point)))
-	(insert "/* comment */")
-	(goto-char point)
-	(forward-comment 2)
-	(Assert (eq (point) (point-max)))
+    (let ((point (point)))
+      (insert "/* comment */")
+      (goto-char point)
+      (forward-comment 2)
+      (Assert (eq (point) (point-max)))
 
-	;; this last used to crash
-	(parse-partial-sexp point (point-max))))
+      ;; this last used to crash
+      (parse-partial-sexp point (point-max)))))
Index: tests/automated/test-harness.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/automated/test-harness.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tests/automated/test-harness.el	2002/07/20 15:22:46	1.5
+++ tests/automated/test-harness.el	2002/08/22 14:56:27	1.6
@@ -124,6 +124,11 @@
 	(missing-message-failures 0)
 	(other-failures 0)
 
+	;; #### perhaps this should be a defvar, and output at the very end
+	;; OTOH, this way AC types can use a null EMACSPACKAGEPATH to find
+	;; what stuff is needed, and ways to avoid using them
+	(skipped-test-reasons (make-hash-table :test 'equal))
+
 	(trick-optimizer nil)
 	(unexpected-test-suite-failure nil)
 	(debug-on-error t)
@@ -141,6 +146,10 @@
 	(and test-harness-verbose
 	     (princ (concat (apply #'format fmt args) "\n"))))
 
+      (defun Print-Skip (test reason &optional fmt &rest args)
+	(setq fmt (concat "SKIP: %S.  REASON: %S" fmt))
+	(princ (concat (apply #'format fmt test reason args) "\n")))
+
 
       (defmacro Assert (assertion)
 	`(condition-case error-info
@@ -201,31 +210,40 @@
 
 
       (defmacro Check-Message (expected-message-regexp &rest body)
-	(let ((quoted-body (if (= 1 (length body))
-			       `(quote ,(car body)) `(quote (progn ,@body)))))
-	  `(let ((messages ""))
-	     (defadvice message (around collect activate)
-	       (defvar messages)
-	       (let ((msg-string (apply 'format (ad-get-args 0))))
-		 (setq messages (concat messages msg-string))
-		 msg-string))
-	     (condition-case error-info
-		 (progn
-		   (setq trick-optimizer (progn ,@body))
-		   (if (string-match ,expected-message-regexp messages)
-		       (progn
-			 (Print-Pass "%S ==> value %S, message %S, matching %S, as expected"
-				     ,quoted-body trick-optimizer messages ',expected-message-regexp)
-			 (incf passes))
-		     (Print-Failure "%S ==> value %S, message %S, NOT matching expected %S"
-				    ,quoted-body  trick-optimizer messages
-				    ',expected-message-regexp)
-		     (incf missing-message-failures)))
-	       (error
-		(Print-Failure "%S ==> unexpected error %S"
-			       ,quoted-body error-info)
-		(incf other-failures)))
-	     (ad-unadvise 'message))))
+	(if (not (fboundp 'defadvice))
+	    ;; #### This whole thing should go inside a macro Skip-Test
+	    (let* ((reason "advice unavailable")
+		   (count (gethash reason skipped-test-reasons)))
+	      ;(message "%S: %S" reason count)
+	      (puthash reason (if (null count) 1 (1+ count))
+		       skipped-test-reasons)
+	      `(Print-Skip ,expected-message-regexp ,reason))
+	  (let ((quoted-body (if (= 1 (length body))
+				 `(quote ,(car body))
+			       `(quote (progn ,@body)))))
+	    `(let ((messages ""))
+	       (defadvice message (around collect activate)
+		 (defvar messages)
+		 (let ((msg-string (apply 'format (ad-get-args 0))))
+		   (setq messages (concat messages msg-string))
+		   msg-string))
+	       (condition-case error-info
+		   (progn
+		     (setq trick-optimizer (progn ,@body))
+		     (if (string-match ,expected-message-regexp messages)
+			 (progn
+			   (Print-Pass "%S ==> value %S, message %S, matching %S, as expected"
+				       ,quoted-body trick-optimizer messages ',expected-message-regexp)
+			   (incf passes))
+		       (Print-Failure "%S ==> value %S, message %S, NOT matching expected %S"
+				      ,quoted-body  trick-optimizer messages
+				      ',expected-message-regexp)
+		       (incf missing-message-failures)))
+		 (error
+		  (Print-Failure "%S ==> unexpected error %S"
+				 ,quoted-body error-info)
+		  (incf other-failures)))
+	       (ad-unadvise 'message)))))
 
       (defmacro Ignore-Ebola (&rest body)
 	`(let ((debug-issue-ebola-notices -42)) ,@body))
@@ -284,7 +302,19 @@
 	      (if (> total 0)
 		  (format "%s: %d of %d (%d%%) tests successful."
 			  basename passes total (/ (* 100 passes) total))
-		(format "%s: No tests run" basename))))
+		(format "%s: No tests run" basename)))
+	     (reasons ""))
+	(maphash (lambda (key value)
+		   (setq reasons
+			 (concat reasons
+				 (format "\n    %d tests skipped because %s"
+					 value key))))
+		 skipped-test-reasons)
+	(when (> (length reasons) 1)
+	  (setq summary-msg (concat summary-msg reasons "
+    Probably XEmacs cannot find your installed packages.  Set EMACSPACKAGEPATH
+    to the package hierarchy root or configure with --package-path to enable
+    the skipped tests.")))
 	(message "%s" summary-msg))
       (when unexpected-test-suite-failure
 	(message "Test suite execution failed unexpectedly."))