changeset 418:e804706bfb8c r21-2-17

Import from CVS: tag r21-2-17
author cvs
date Mon, 13 Aug 2007 11:23:13 +0200
parents 43a18b32d56e
children 66615b78f1a5
files CHANGES-beta ChangeLog configure configure.in etc/NEWS lib-src/ChangeLog lib-src/config.values.in lisp/ChangeLog lisp/font-menu.el lisp/help-nomule.el lisp/mule/cyrillic.el lisp/mule/mule-misc.el lisp/mule/thai-xtis.el lisp/mule/vietnamese.el lisp/select.el lisp/subr.el lwlib/ChangeLog man/ChangeLog nt/ChangeLog nt/xemacs.mak src/ChangeLog src/config.h.in src/data.c src/dialog-msw.c src/eldap.c src/eldap.h src/event-msw.c src/file-coding.c src/glyphs-msw.c src/glyphs-widget.c src/glyphs.c src/glyphs.h src/gui.c src/gui.h src/lisp.h src/menubar-msw.c src/menubar.c src/menubar.h src/mule-ccl.c src/mule-ccl.h src/mule-charset.c src/redisplay-msw.c src/redisplay-x.c tests/ChangeLog tests/automated/base64-tests.el tests/glyph-test.el version.sh
diffstat 47 files changed, 2154 insertions(+), 1828 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 11:22:24 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 11:23:13 2007 +0200
@@ -1,5 +1,17 @@
 							-*- indented-text -*-
+to 21.2.17 "Chiyoda"
+-- miscellaneous bug fixes from Steve Baur
+-- font menu fix from Robert Pluim
+-- ldap API update from Oscar Figueiredo
+-- Fix thai-xtis charset width from MORIOKA Tomohiko
+-- CCL engine fix from MORIOKA Tomohiko
+-- mswindows build fixes from Norbert Koch
+-- miscellaneous fixes from Andy Piper
+-- automated tests for mswindows from Adrian Aichner
+-- tree-view and tab-control widget glyph support from Andy Piper
+
 to 21.2.16 "Sumida"
+-- miscellaneous fixes from Hrvoje Niksic and Olivier Galibert
 -- make selection more mswindows conformant.
 -- Make customize use specifiers from Jan Vroonhof
 -- Cyrillic CCL crash fix from MORIOKA Tomohiko
--- a/ChangeLog	Mon Aug 13 11:22:24 2007 +0200
+++ b/ChangeLog	Mon Aug 13 11:23:13 2007 +0200
@@ -1,3 +1,14 @@
+1999-06-22  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.17 is released
+
+1999-06-13  Oscar Figueiredo  <oscar@xemacs.org>
+
+	* configure.in (with_ldap): Check libldap independently of liblber
+	Do not test alternate library names such as libldap10
+	Test the presence of a variety of LDAP API functions which were
+	formerly assumed to be present according to dubious heuristics
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.16 is released
--- a/configure	Mon Aug 13 11:22:24 2007 +0200
+++ b/configure	Mon Aug 13 11:23:13 2007 +0200
@@ -2,7 +2,7 @@
 
 #### Configuration script for XEmacs.  Largely divergent from FSF.
 #### Guess values for system-dependent variables and create Makefiles.
-#### Generated automatically using autoconf version 2.13 
+#### Generated automatically using autoconf version 2.12 
 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
@@ -199,8 +199,6 @@
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
 cross_compiling=no
 
-ac_exeext=
-ac_objext=o
 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -769,7 +767,7 @@
 fi
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:773: checking whether ln -s works" >&5
+echo "configure:771: checking whether ln -s works" >&5
 
 rm -f conftestdata
 if ln -s X conftestdata 2>/dev/null
@@ -1014,7 +1012,7 @@
 
 
 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
-echo "configure:1018: checking "host system type"" >&5
+echo "configure:1016: 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/'`
@@ -1506,14 +1504,13 @@
 # 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:1510: checking for $ac_word" >&5
+echo "configure:1508: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="gcc"
@@ -1533,15 +1530,14 @@
   # 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:1537: checking for $ac_word" >&5
+echo "configure:1534: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@@ -1575,42 +1571,11 @@
   echo "$ac_t""no" 1>&6
 fi
 
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # 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:1585: checking for $ac_word" >&5
-
-if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1614: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1579: 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'
@@ -1621,14 +1586,12 @@
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
 cross_compiling=no
 
-cat > conftest.$ac_ext << EOF
-
-#line 1627 "configure"
-#include "confdefs.h"
-
+cat > conftest.$ac_ext <<EOF
+#line 1591 "configure"
+#include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -1642,33 +1605,25 @@
   ac_cv_prog_cc_works=no
 fi
 rm -fr conftest*
-ac_ext=c
-xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
-xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
-ac_cpp='$CPP '"$xe_cppflags"
-ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
-cross_compiling=no
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 if test $ac_cv_prog_cc_works = no; then
   { 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:1660: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1615: 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:1665: checking whether we are using GNU C" >&5
+echo "configure:1620: 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:1672: \"$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:1627: \"$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
@@ -1678,15 +1633,11 @@
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1690: checking whether ${CC-cc} accepts -g" >&5
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1641: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1698,20 +1649,16 @@
 
 
 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
     CFLAGS="-g -O2"
   else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
     CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
 fi
  
 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
@@ -1719,14 +1666,13 @@
   # 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:1723: checking for $ac_word" >&5
+echo "configure:1670: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="gcc"
@@ -1746,15 +1692,14 @@
   # 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:1750: checking for $ac_word" >&5
+echo "configure:1696: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@@ -1788,42 +1733,11 @@
   echo "$ac_t""no" 1>&6
 fi
 
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # 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:1798: checking for $ac_word" >&5
-
-if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1827: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1741: 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'
@@ -1834,14 +1748,12 @@
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
 cross_compiling=no
 
-cat > conftest.$ac_ext << EOF
-
-#line 1840 "configure"
-#include "confdefs.h"
-
+cat > conftest.$ac_ext <<EOF
+#line 1753 "configure"
+#include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -1855,33 +1767,25 @@
   ac_cv_prog_cc_works=no
 fi
 rm -fr conftest*
-ac_ext=c
-xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
-xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
-ac_cpp='$CPP '"$xe_cppflags"
-ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
-cross_compiling=no
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 if test $ac_cv_prog_cc_works = no; then
   { 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:1873: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1777: 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:1878: checking whether we are using GNU C" >&5
+echo "configure:1782: 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:1885: \"$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:1789: \"$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
@@ -1891,15 +1795,11 @@
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1903: checking whether ${CC-cc} accepts -g" >&5
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1803: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1911,20 +1811,16 @@
 
 
 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
     CFLAGS="-g -O2"
   else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
     CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
 fi
 
 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
@@ -1932,14 +1828,13 @@
   # 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:1936: checking for $ac_word" >&5
+echo "configure:1832: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="gcc"
@@ -1959,15 +1854,14 @@
   # 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:1963: checking for $ac_word" >&5
+echo "configure:1858: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@@ -2001,42 +1895,11 @@
   echo "$ac_t""no" 1>&6
 fi
 
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # 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:2011: checking for $ac_word" >&5
-
-if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1903: 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'
@@ -2047,14 +1910,12 @@
 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
 cross_compiling=no
 
-cat > conftest.$ac_ext << EOF
-
-#line 2053 "configure"
-#include "confdefs.h"
-
+cat > conftest.$ac_ext <<EOF
+#line 1915 "configure"
+#include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -2068,33 +1929,25 @@
   ac_cv_prog_cc_works=no
 fi
 rm -fr conftest*
-ac_ext=c
-xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
-xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
-ac_cpp='$CPP '"$xe_cppflags"
-ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
-cross_compiling=no
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 if test $ac_cv_prog_cc_works = no; then
   { 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:2086: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1939: 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:2091: checking whether we are using GNU C" >&5
+echo "configure:1944: 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:2098: \"$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:1951: \"$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
@@ -2104,15 +1957,11 @@
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2116: checking whether ${CC-cc} accepts -g" >&5
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1965: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -2124,20 +1973,16 @@
 
 
 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
     CFLAGS="-g -O2"
   else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
     CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
 fi
 
 fi
@@ -2149,7 +1994,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:2153: checking how to run the C preprocessor" >&5
+echo "configure:1998: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2162,14 +2007,14 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2166 "configure"
+#line 2011 "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:2172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
 else
@@ -2179,31 +2024,14 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2183 "configure"
+#line 2028 "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:2189: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 2200 "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:2206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:2034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
 else
@@ -2216,8 +2044,6 @@
 rm -f conftest*
 fi
 rm -f conftest*
-fi
-rm -f conftest*
   ac_cv_prog_CPP="$CPP"
   CPP="$ac_cv_prog_CPP"
 else
@@ -2227,9 +2053,9 @@
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2231: checking for AIX" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2233 "configure"
+echo "configure:2057: checking for AIX" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2059 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -2256,9 +2082,9 @@
 
 
 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
-echo "configure:2260: checking for GNU libc" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2262 "configure"
+echo "configure:2086: checking for GNU libc" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2088 "configure"
 #include "confdefs.h"
 #include <features.h>
 int main() {
@@ -2270,7 +2096,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   have_glibc=yes
 else
@@ -2292,7 +2118,7 @@
 
 
 cat > conftest.$ac_ext <<EOF
-#line 2296 "configure"
+#line 2122 "configure"
 #include "confdefs.h"
 int main () {
 #if defined __SUNPRO_C
@@ -2304,7 +2130,7 @@
 #endif
 }
 EOF
-if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
@@ -2578,7 +2404,7 @@
  fi
 
 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2582: checking for dynodump" >&5
+echo "configure:2408: checking for dynodump" >&5
 if test "$unexec" != "unexsol2.o"; then
   echo "$ac_t""no" 1>&6
 else
@@ -2616,12 +2442,12 @@
   done
   
 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
-echo "configure:2620: checking for terminateAndUnload in -lC" >&5
+echo "configure:2446: 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 2625 "configure"
+#line 2451 "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
@@ -2632,7 +2458,7 @@
 terminateAndUnload()
 ; return 0; }
 EOF
-if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2736,7 +2562,7 @@
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:2740: checking "for runtime libraries flag"" >&5
+echo "configure:2566: checking "for runtime libraries flag"" >&5
   case "$opsys" in
     sol2 ) dash_r="-R" ;;
     decosf* | linux* | irix*) dash_r="-rpath " ;;
@@ -2758,14 +2584,14 @@
   done
 fi
         cat > conftest.$ac_ext <<EOF
-#line 2762 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+#line 2588 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
@@ -2867,10 +2693,10 @@
 fi
 after_morecore_hook_exists=yes
 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
-echo "configure:2871: checking for malloc_get_state" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
+echo "configure:2697: checking for malloc_get_state" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2700 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char malloc_get_state(); below.  */
@@ -2893,7 +2719,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_malloc_get_state=yes"
 else
@@ -2913,10 +2739,10 @@
 fi
 
 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
-echo "configure:2917: checking for malloc_set_state" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2920 "configure"
+echo "configure:2743: checking for malloc_set_state" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2746 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char malloc_set_state(); below.  */
@@ -2939,7 +2765,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_malloc_set_state=yes"
 else
@@ -2959,16 +2785,16 @@
 fi
 
 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
-echo "configure:2963: checking whether __after_morecore_hook exists" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2965 "configure"
+echo "configure:2789: checking whether __after_morecore_hook exists" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2791 "configure"
 #include "confdefs.h"
 extern void (* __after_morecore_hook)();
 int main() {
 __after_morecore_hook = 0
 ; return 0; }
 EOF
-if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -3027,14 +2853,13 @@
 # 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:3031: checking for $ac_word" >&5
+echo "configure:2857: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_RANLIB="ranlib"
@@ -3077,28 +2902,26 @@
 # SunOS /usr/etc/install
 # IRIX /sbin/install
 # AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # 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:3086: checking for a BSD compatible install" >&5
+echo "configure:2910: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
-  IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
+  IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
     # Account for people who put trailing slashes in PATH elements.
     case "$ac_dir/" in
     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
     *)
       # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
+      for ac_prog in ginstall installbsd scoinst install; do
         if test -f $ac_dir/$ac_prog; then
 	  if test $ac_prog = install &&
             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
+	    # OSF/1 installbsd also uses dspmsg, but is usable.
 	    :
 	  else
 	    ac_cv_path_install="$ac_dir/$ac_prog -c"
@@ -3127,8 +2950,6 @@
 # It thinks the first close brace ends the variable substitution.
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 for ac_prog in 'bison -y' byacc
@@ -3136,14 +2957,13 @@
 # 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:3140: checking for $ac_word" >&5
+echo "configure:2961: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_YACC="$ac_prog"
@@ -3168,16 +2988,16 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3172: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3175 "configure"
+echo "configure:2992: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2995 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:3000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -3209,16 +3029,16 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3213: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3216 "configure"
+echo "configure:3033: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3036 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:3041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -3250,16 +3070,16 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3254: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3257 "configure"
+echo "configure:3074: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3077 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -3288,10 +3108,10 @@
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:3292: checking for sys/wait.h that is POSIX.1 compatible" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3295 "configure"
+echo "configure:3112: checking for sys/wait.h that is POSIX.1 compatible" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3115 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -3307,7 +3127,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:3311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -3331,10 +3151,10 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3335: checking for ANSI C header files" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3338 "configure"
+echo "configure:3155: checking for ANSI C header files" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3158 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3342,8 +3162,8 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:3166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   ac_cv_header_stdc=yes
@@ -3359,7 +3179,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 3363 "configure"
+#line 3183 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3377,7 +3197,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 3381 "configure"
+#line 3201 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3395,7 +3215,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 3399 "configure"
+#line 3219 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3406,7 +3226,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
@@ -3432,10 +3252,10 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3436: checking whether time.h and sys/time.h may both be included" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3439 "configure"
+echo "configure:3256: checking whether time.h and sys/time.h may both be included" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3259 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3444,7 +3264,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3468,10 +3288,10 @@
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:3472: checking for sys_siglist declaration in signal.h or unistd.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3475 "configure"
+echo "configure:3292: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3295 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3483,7 +3303,7 @@
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:3487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -3508,9 +3328,9 @@
 
 
 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
-echo "configure:3512: checking for struct utimbuf" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3514 "configure"
+echo "configure:3332: checking for struct utimbuf" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3334 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3529,7 +3349,7 @@
 static struct utimbuf x; x.actime = x.modtime;
 ; return 0; }
 EOF
-if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3353: \"$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
@@ -3549,10 +3369,10 @@
 rm -f conftest*
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3553: checking return type of signal handlers" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3556 "configure"
+echo "configure:3373: checking return type of signal handlers" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3376 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3569,7 +3389,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3591,10 +3411,10 @@
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3595: checking for size_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3598 "configure"
+echo "configure:3415: checking for size_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3418 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3603,7 +3423,7 @@
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_size_t=yes
 else
@@ -3625,10 +3445,10 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3629: checking for pid_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3632 "configure"
+echo "configure:3449: checking for pid_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3452 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3637,7 +3457,7 @@
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_pid_t=yes
 else
@@ -3659,10 +3479,10 @@
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3663: checking for uid_t in sys/types.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3666 "configure"
+echo "configure:3483: checking for uid_t in sys/types.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3486 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -3698,10 +3518,10 @@
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3702: checking for mode_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3705 "configure"
+echo "configure:3522: checking for mode_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3525 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3710,7 +3530,7 @@
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_mode_t=yes
 else
@@ -3732,10 +3552,10 @@
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3736: checking for off_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3739 "configure"
+echo "configure:3556: checking for off_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3559 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3744,7 +3564,7 @@
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_off_t=yes
 else
@@ -3767,9 +3587,9 @@
 
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:3771: checking for struct timeval" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3773 "configure"
+echo "configure:3591: checking for struct timeval" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3593 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3785,7 +3605,7 @@
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
-if { (eval echo configure:3789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
@@ -3807,10 +3627,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:3811: checking whether struct tm is in sys/time.h or time.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3814 "configure"
+echo "configure:3631: checking whether struct tm is in sys/time.h or time.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3634 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -3818,7 +3638,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -3842,10 +3662,10 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3846: checking for tm_zone in struct tm" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3849 "configure"
+echo "configure:3666: checking for tm_zone in struct tm" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3669 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -3853,7 +3673,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:3857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -3876,10 +3696,10 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3880: checking for tzname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3883 "configure"
+echo "configure:3700: checking for tzname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3703 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -3889,7 +3709,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -3915,10 +3735,10 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3919: checking for working const" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3922 "configure"
+echo "configure:3739: checking for working const" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3742 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3967,7 +3787,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3992,7 +3812,7 @@
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:3996: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:3816: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
@@ -4017,12 +3837,12 @@
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:4021: checking whether byte ordering is bigendian" >&5
+echo "configure:3841: 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 4026 "configure"
+#line 3846 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -4033,11 +3853,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:4037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3857: \"$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 4041 "configure"
+#line 3861 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -4048,7 +3868,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:4052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -4065,7 +3885,7 @@
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
-#line 4069 "configure"
+#line 3889 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -4078,7 +3898,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_c_bigendian=no
 else
@@ -4105,10 +3925,10 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:4109: checking size of short" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4112 "configure"
+echo "configure:3929: checking size of short" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3932 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4119,7 +3939,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -4147,10 +3967,10 @@
   exit 1
 fi
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:4151: checking size of int" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4154 "configure"
+echo "configure:3971: checking size of int" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3974 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4161,7 +3981,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -4183,10 +4003,10 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:4187: checking size of long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4190 "configure"
+echo "configure:4007: checking size of long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4010 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4197,7 +4017,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -4219,10 +4039,10 @@
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:4223: checking size of long long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4226 "configure"
+echo "configure:4043: checking size of long long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4046 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4233,7 +4053,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4057: \"$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
@@ -4255,10 +4075,10 @@
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:4259: checking size of void *" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4262 "configure"
+echo "configure:4079: checking size of void *" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4082 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4269,7 +4089,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4093: \"$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
@@ -4292,7 +4112,7 @@
 
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:4296: checking for long file names" >&5
+echo "configure:4116: 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:
@@ -4338,10 +4158,10 @@
 
 
 echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:4342: checking for sin" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4345 "configure"
+echo "configure:4162: checking for sin" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4165 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sin(); below.  */
@@ -4364,7 +4184,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_sin=yes"
 else
@@ -4382,12 +4202,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:4386: checking for sin in -lm" >&5
+echo "configure:4206: 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 4391 "configure"
+#line 4211 "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
@@ -4398,7 +4218,7 @@
 sin()
 ; return 0; }
 EOF
-if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4442,14 +4262,14 @@
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4446 "configure"
+#line 4266 "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:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_INVERSE_HYPERBOLIC
@@ -4466,7 +4286,7 @@
 rm -f conftest*
 
 echo "checking type of mail spool file locking" 1>&6
-echo "configure:4470: checking type of mail spool file locking" >&5
+echo "configure:4290: checking type of mail spool file locking" >&5
 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
@@ -4491,12 +4311,12 @@
 case "$opsys" in decosf*)
   
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:4495: checking for cma_open in -lpthreads" >&5
+echo "configure:4315: 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 4500 "configure"
+#line 4320 "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
@@ -4507,7 +4327,7 @@
 cma_open()
 ; return 0; }
 EOF
-if { (eval echo configure:4511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4543,7 +4363,7 @@
 esac
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:4547: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:4367: 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;
@@ -4554,7 +4374,7 @@
 
 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
-echo "configure:4558: checking for \"-z ignore\" linker flag" >&5
+echo "configure:4378: 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 ;;
@@ -4564,7 +4384,7 @@
 
 
 echo "checking "for specified window system"" 1>&6
-echo "configure:4568: checking "for specified window system"" >&5
+echo "configure:4388: checking "for specified window system"" >&5
 
 if test "$with_x11" != "no"; then
     test "$x_includes $x_libraries" != "NONE NONE" && \
@@ -4597,7 +4417,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:4601: checking for X" >&5
+echo "configure:4421: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4657,13 +4477,13 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4661 "configure"
+#line 4481 "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:4666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:4486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   # We can compile using X headers with no special include directory.
@@ -4731,14 +4551,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4735 "configure"
+#line 4555 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -4847,17 +4667,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:4851: checking whether -R must be followed by a space" >&5
+echo "configure:4671: 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 4854 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+#line 4674 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -4873,14 +4693,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 4877 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+#line 4697 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -4916,12 +4736,12 @@
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:4920: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:4740: 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 4925 "configure"
+#line 4745 "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
@@ -4932,7 +4752,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4956,12 +4776,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:4960: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:4780: 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 4965 "configure"
+#line 4785 "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
@@ -4972,7 +4792,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5001,10 +4821,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:5005: checking for gethostbyname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5008 "configure"
+echo "configure:4825: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4828 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -5027,7 +4847,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -5048,12 +4868,12 @@
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:5052: checking for gethostbyname in -lnsl" >&5
+echo "configure:4872: 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 5057 "configure"
+#line 4877 "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
@@ -5064,7 +4884,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:5068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5094,10 +4914,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:5098: checking for connect" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5101 "configure"
+echo "configure:4918: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4921 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -5120,7 +4940,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -5143,12 +4963,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:5147: checking "$xe_msg_checking"" >&5
+echo "configure:4967: 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 5152 "configure"
+#line 4972 "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
@@ -5159,7 +4979,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5183,10 +5003,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:5187: checking for remove" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5190 "configure"
+echo "configure:5007: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5010 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -5209,7 +5029,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -5230,12 +5050,12 @@
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:5234: checking for remove in -lposix" >&5
+echo "configure:5054: 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 5239 "configure"
+#line 5059 "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 +5066,7 @@
 remove()
 ; 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:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5270,10 +5090,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:5274: checking for shmat" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5277 "configure"
+echo "configure:5094: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5097 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -5296,7 +5116,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -5317,12 +5137,12 @@
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:5321: checking for shmat in -lipc" >&5
+echo "configure:5141: 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 5326 "configure"
+#line 5146 "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
@@ -5333,7 +5153,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:5337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5366,15 +5186,13 @@
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   
-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:5373: checking "$xe_msg_checking"" >&5
+echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
+echo "configure:5191: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
-xe_check_libs=" -lICE $X_EXTRA_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5378 "configure"
+xe_check_libs=" -lICE "
+cat > conftest.$ac_ext <<EOF
+#line 5196 "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
@@ -5385,7 +5203,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:5389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5554,7 +5372,7 @@
 
 
     echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:5558: checking for X defines extracted by xmkmf" >&5
+echo "configure:5376: checking for X defines extracted by xmkmf" >&5
   rm -fr conftestdir
   if mkdir conftestdir; then
     cd conftestdir
@@ -5586,16 +5404,16 @@
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:5590: checking for X11/Intrinsic.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5593 "configure"
+echo "configure:5408: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5411 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:5416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -5618,12 +5436,12 @@
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:5622: checking for XOpenDisplay in -lX11" >&5
+echo "configure:5440: 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 5627 "configure"
+#line 5445 "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
@@ -5634,7 +5452,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5659,12 +5477,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:5663: checking "$xe_msg_checking"" >&5
+echo "configure:5481: 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 5668 "configure"
+#line 5486 "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
@@ -5675,7 +5493,7 @@
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:5679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5702,12 +5520,12 @@
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:5706: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:5524: 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 5711 "configure"
+#line 5529 "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
@@ -5718,7 +5536,7 @@
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5741,12 +5559,12 @@
 
     
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:5745: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:5563: 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 5750 "configure"
+#line 5568 "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
@@ -5757,7 +5575,7 @@
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5780,14 +5598,14 @@
 
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:5784: checking the version of X11 being used" >&5
+echo "configure:5602: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
+#line 5604 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:5791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:5609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
@@ -5812,16 +5630,16 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5816: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5819 "configure"
+echo "configure:5634: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5637 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:5642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -5851,7 +5669,7 @@
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:5855: checking for XFree86" >&5
+echo "configure:5673: checking for XFree86" >&5
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config"    -o \
 	  -f "/etc/X11/XF86Config" -o \
@@ -5871,12 +5689,12 @@
 
     test -z "$with_xmu" && { 
 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:5875: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:5693: 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 5880 "configure"
+#line 5698 "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
@@ -5887,7 +5705,7 @@
 XmuReadBitmapDataFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:5891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5926,19 +5744,19 @@
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:5930: checking for main in -lXbsd" >&5
+echo "configure:5748: 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 5935 "configure"
+#line 5753 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5975,22 +5793,22 @@
 fi 
 if test "$with_msw" != "no"; then
   echo "checking for MS-Windows" 1>&6
-echo "configure:5979: checking for MS-Windows" >&5
+echo "configure:5797: checking for MS-Windows" >&5
   
 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
-echo "configure:5982: checking for main in -lgdi32" >&5
+echo "configure:5800: 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 5987 "configure"
+#line 5805 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; 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:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6055,12 +5873,12 @@
  fi
     fi
         cat > conftest.$ac_ext <<EOF
-#line 6059 "configure"
+#line 5877 "configure"
 #include "confdefs.h"
 #include <fcntl.h>
     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
 EOF
-if { (eval echo configure:6064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:5882: \"$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
@@ -6136,7 +5954,7 @@
 esac
 
 echo "checking for WM_COMMAND option" 1>&6
-echo "configure:6140: checking for WM_COMMAND option" >&5;
+echo "configure:5958: checking for WM_COMMAND option" >&5;
 if test "$with_wmcommand" != "no"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_WMCOMMAND
@@ -6151,16 +5969,16 @@
 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:6155: checking for X11/Xauth.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6158 "configure"
+echo "configure:5973: checking for X11/Xauth.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5976 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:5981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -6182,12 +6000,12 @@
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:6186: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:6004: 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 6191 "configure"
+#line 6009 "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
@@ -6198,7 +6016,7 @@
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6243,16 +6061,16 @@
       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:6247: checking for ${dir}tt_c.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6250 "configure"
+echo "configure:6065: checking for ${dir}tt_c.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6068 "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:6255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:6073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -6287,12 +6105,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:6291: checking "$xe_msg_checking"" >&5
+echo "configure:6109: 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 6296 "configure"
+#line 6114 "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
@@ -6303,7 +6121,7 @@
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6360,16 +6178,16 @@
 
 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:6364: checking for Dt/Dt.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6367 "configure"
+echo "configure:6182: checking for Dt/Dt.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6185 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:6190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -6391,12 +6209,12 @@
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:6395: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:6213: 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 6400 "configure"
+#line 6218 "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
@@ -6407,7 +6225,7 @@
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6476,7 +6294,7 @@
 fi
 
 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
-echo "configure:6480: checking if drag and drop API is needed" >&5
+echo "configure:6298: checking if drag and drop API is needed" >&5
 if test "$with_dragndrop" != "no" ; then
   if test -n "$dragndrop_proto" ; then
     with_dragndrop=yes
@@ -6497,19 +6315,19 @@
 fi
 
 echo "checking for LDAP" 1>&6
-echo "configure:6501: checking for LDAP" >&5
+echo "configure:6319: 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:6504: checking for ldap.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6507 "configure"
+echo "configure:6322: checking for ldap.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6325 "configure"
 #include "confdefs.h"
 #include <ldap.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:6330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -6531,16 +6349,16 @@
  }
 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:6535: checking for lber.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6538 "configure"
+echo "configure:6353: checking for lber.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6356 "configure"
 #include "confdefs.h"
 #include <lber.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:6361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -6561,27 +6379,25 @@
 fi
  }
 if test "$with_ldap" != "no"; then
-  test -z "$with_umich_ldap" && { 
-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:6569: 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 6574 "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
-    builtin and then its argument prototype would still apply.  */
-char ldap_open();
-
-int main() {
-ldap_open()
-; return 0; }
-EOF
-if { (eval echo configure:6585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  
+echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
+echo "configure:6385: 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 6390 "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
+    builtin and then its argument prototype would still apply.  */
+char ldap_search();
+
+int main() {
+ldap_search()
+; return 0; }
+EOF
+if { (eval echo configure:6401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6595,32 +6411,34 @@
 
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
   echo "$ac_t""yes" 1>&6
-  with_umich_ldap=yes
-else
-  echo "$ac_t""no" 1>&6
-with_umich_ldap=no
-fi
-
- }
-  test "$with_umich_ldap" = "no" && { 
-echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6
-echo "configure:6608: checking for ldap_set_option in -lldap10" >&5
-ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lldap10 "
-cat > conftest.$ac_ext <<EOF
-#line 6613 "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
-    builtin and then its argument prototype would still apply.  */
-char ldap_set_option();
-
-int main() {
-ldap_set_option()
-; return 0; }
-EOF
-if { (eval echo configure:6624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  with_ldap_nolber=yes
+else
+  echo "$ac_t""no" 1>&6
+with_ldap_nolber=no
+fi
+
+
+  test "$with_ldap_nolber" = "no" && { 
+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:6426: 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 6431 "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
+    builtin and then its argument prototype would still apply.  */
+char ldap_open();
+
+int main() {
+ldap_open()
+; return 0; }
+EOF
+if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6634,14 +6452,14 @@
 
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
   echo "$ac_t""yes" 1>&6
-  with_ns_ldap=yes
-else
-  echo "$ac_t""no" 1>&6
-with_ns_ldap=no
+  with_ldap_lber=yes
+else
+  echo "$ac_t""no" 1>&6
+with_ldap_lber=no
 fi
 
  }
-  test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
+  test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" \) && with_ldap=yes
 fi
 if test "$with_ldap" = "yes"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
@@ -6655,44 +6473,82 @@
   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"eldap.o\""
  fi
-  if test "$with_umich_ldap" = "yes" ; then
-    { test "$extra_verbose" = "yes" && cat << \EOF
-    Defining HAVE_UMICH_LDAP
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_UMICH_LDAP 1
-EOF
-}
-
+  if test "$with_ldap_nolber" = "yes" ; then
+    LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
+  else
     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
-  elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
-    { test "$extra_verbose" = "yes" && cat << \EOF
-    Defining HAVE_NS_LDAP
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_NS_LDAP 1
-EOF
-}
-
-    LIBS="-lldap10 $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap10\" to \$LIBS"; fi
-  elif test "$with_ldap" = "yes" ; then
-    LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
-  fi
+  fi
+  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:6486: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6489 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
 fi
 
 
 if test "$window_system" != "none"; then
   echo "checking for graphics libraries" 1>&6
-echo "configure:6688: checking for graphics libraries" >&5
+echo "configure:6544: checking for graphics libraries" >&5
 
     xpm_problem=""
   if test -z "$with_xpm"; then
     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
-echo "configure:6693: checking for Xpm - no older than 3.4f" >&5
+echo "configure:6549: checking for Xpm - no older than 3.4f" >&5
     xe_check_libs=-lXpm
     cat > conftest.$ac_ext <<EOF
-#line 6696 "configure"
+#line 6552 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
     int main(int c, char **v) {
@@ -6700,7 +6556,7 @@
       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
       XpmIncludeVersion < 30406 ? 2 : 0 ;}
 EOF
-if { (eval echo configure:6704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6560: \"$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
@@ -6742,17 +6598,17 @@
 
     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
-echo "configure:6746: checking for \"FOR_MSW\" xpm" >&5
+echo "configure:6602: checking for \"FOR_MSW\" xpm" >&5
     xe_check_libs=-lXpm
     cat > conftest.$ac_ext <<EOF
-#line 6749 "configure"
+#line 6605 "configure"
 #include "confdefs.h"
 
 int main() {
 XpmCreatePixmapFromData()
 ; return 0; }
 EOF
-if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   xpm_for_msw=no
 else
@@ -6778,16 +6634,16 @@
 
     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:6782: checking for compface.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6785 "configure"
+echo "configure:6638: checking for compface.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6641 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:6646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -6809,12 +6665,12 @@
  }
   test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:6813: checking for UnGenFace in -lcompface" >&5
+echo "configure:6669: 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 6818 "configure"
+#line 6674 "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
@@ -6825,7 +6681,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:6829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6877,12 +6733,12 @@
       if test "$with_png $with_tiff" != "no no"; then
     
 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
-echo "configure:6881: checking for inflate in -lc" >&5
+echo "configure:6737: 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 6886 "configure"
+#line 6742 "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
@@ -6893,7 +6749,7 @@
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6912,12 +6768,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
-echo "configure:6916: checking for inflate in -lz" >&5
+echo "configure:6772: 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 6921 "configure"
+#line 6777 "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
@@ -6928,7 +6784,7 @@
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:6932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6947,12 +6803,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
-echo "configure:6951: checking for inflate in -lgz" >&5
+echo "configure:6807: 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 6956 "configure"
+#line 6812 "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
@@ -6963,7 +6819,7 @@
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6993,16 +6849,16 @@
 
     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:6997: checking for jpeglib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7000 "configure"
+echo "configure:6853: checking for jpeglib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6856 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:6861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -7024,12 +6880,12 @@
  }
   test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:7028: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:6884: 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 7033 "configure"
+#line 6889 "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
@@ -7040,7 +6896,7 @@
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:7044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7076,10 +6932,10 @@
 
     png_problem=""
   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:7080: checking for pow" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7083 "configure"
+echo "configure:6936: checking for pow" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6939 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
@@ -7102,7 +6958,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
@@ -7123,16 +6979,16 @@
  }
   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:7127: checking for png.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7130 "configure"
+echo "configure:6983: checking for png.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6986 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:6991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -7154,12 +7010,12 @@
  }
   test -z "$with_png" && { 
 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
-echo "configure:7158: checking for png_read_image in -lpng" >&5
+echo "configure:7014: 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 7163 "configure"
+#line 7019 "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
@@ -7170,7 +7026,7 @@
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:7174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7193,10 +7049,10 @@
  }
   if test -z "$with_png"; then
     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
-echo "configure:7197: checking for workable png version information" >&5
+echo "configure:7053: checking for workable png version information" >&5
     xe_check_libs="-lpng -lz"
     cat > conftest.$ac_ext <<EOF
-#line 7200 "configure"
+#line 7056 "configure"
 #include "confdefs.h"
 #include <png.h>
     int main(int c, char **v) {
@@ -7204,7 +7060,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:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7064: \"$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
@@ -7247,16 +7103,16 @@
 
     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:7251: checking for tiffio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7254 "configure"
+echo "configure:7107: checking for tiffio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7110 "configure"
 #include "confdefs.h"
 #include <tiffio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:7115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -7278,12 +7134,12 @@
  }
   test -z "$with_tiff" && { 
 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:7282: checking for TIFFClientOpen in -ltiff" >&5
+echo "configure:7138: 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 7287 "configure"
+#line 7143 "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
@@ -7294,7 +7150,7 @@
 TIFFClientOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7333,16 +7189,16 @@
 if test "$with_x11" = "yes"; then
 
   echo "checking for X11 graphics libraries" 1>&6
-echo "configure:7337: checking for X11 graphics libraries" >&5
+echo "configure:7193: checking for X11 graphics libraries" >&5
 
     
 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
-echo "configure:7341: checking for XawScrollbarSetThumb in -lXaw" >&5
+echo "configure:7197: checking for XawScrollbarSetThumb in -lXaw" >&5
 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXaw "
 cat > conftest.$ac_ext <<EOF
-#line 7346 "configure"
+#line 7202 "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
@@ -7353,7 +7209,7 @@
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:7357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7377,16 +7233,16 @@
                     
     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:7381: checking for Xm/Xm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7384 "configure"
+echo "configure:7237: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7240 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:7245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -7402,12 +7258,12 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:7406: checking for XmStringFree in -lXm" >&5
+echo "configure:7262: 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 7411 "configure"
+#line 7267 "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
@@ -7418,7 +7274,7 @@
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:7422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7447,9 +7303,9 @@
 
   if test "$have_motif" = "yes"; then
         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
-echo "configure:7451: checking for Lesstif" >&5
+echo "configure:7307: checking for Lesstif" >&5
     cat > conftest.$ac_ext <<EOF
-#line 7453 "configure"
+#line 7309 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 #ifdef LESSTIF_VERSION
@@ -7712,7 +7568,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:7716: checking for Mule-related features" >&5
+echo "configure:7572: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -7737,16 +7593,16 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7741: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7744 "configure"
+echo "configure:7597: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7600 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:7605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -7776,12 +7632,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:7780: checking for strerror in -lintl" >&5
+echo "configure:7636: 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 7785 "configure"
+#line 7641 "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
@@ -7792,7 +7648,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:7796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7825,18 +7681,18 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:7829: checking for Mule input methods" >&5
+echo "configure:7685: checking for Mule input methods" >&5
         case "$with_xim" in "" | "yes" )
     echo "checking for XIM" 1>&6
-echo "configure:7832: checking for XIM" >&5
+echo "configure:7688: checking for XIM" >&5
     
 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
-echo "configure:7835: checking for XOpenIM in -lX11" >&5
+echo "configure:7691: 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 7840 "configure"
+#line 7696 "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
@@ -7847,7 +7703,7 @@
 XOpenIM()
 ; return 0; }
 EOF
-if { (eval echo configure:7851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7871,12 +7727,12 @@
         if test "$have_motif $have_lesstif" = "yes no"; then
       
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:7875: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:7731: 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 7880 "configure"
+#line 7736 "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
@@ -7887,7 +7743,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:7891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7952,15 +7808,15 @@
 
     if test "$with_xfs" = "yes" ; then
     echo "checking for XFontSet" 1>&6
-echo "configure:7956: checking for XFontSet" >&5
+echo "configure:7812: checking for XFontSet" >&5
     
 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:7959: checking for XmbDrawString in -lX11" >&5
+echo "configure:7815: 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 7964 "configure"
+#line 7820 "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
@@ -7971,7 +7827,7 @@
 XmbDrawString()
 ; return 0; }
 EOF
-if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8011,16 +7867,16 @@
     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:8015: checking for wnn/jllib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8018 "configure"
+echo "configure:7871: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7874 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:7879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -8044,10 +7900,10 @@
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8048: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8051 "configure"
+echo "configure:7904: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7907 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8070,7 +7926,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8099,12 +7955,12 @@
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:8103: checking for crypt in -lcrypt" >&5
+echo "configure:7959: 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 8108 "configure"
+#line 7964 "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
@@ -8115,7 +7971,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:8119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8150,12 +8006,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:8154: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:8010: 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 8159 "configure"
+#line 8015 "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
@@ -8166,7 +8022,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8184,12 +8040,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:8188: checking for jl_dic_list_e in -lwnn4" >&5
+echo "configure:8044: 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 8193 "configure"
+#line 8049 "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
@@ -8200,7 +8056,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8218,12 +8074,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:8222: checking for jl_dic_list_e in -lwnn6" >&5
+echo "configure:8078: 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 8227 "configure"
+#line 8083 "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
@@ -8234,7 +8090,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8252,12 +8108,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:8256: checking for dic_list_e in -lwnn6_fromsrc" >&5
+echo "configure:8112: 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 8261 "configure"
+#line 8117 "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
@@ -8268,7 +8124,7 @@
 dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8316,12 +8172,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:8320: checking for jl_fi_dic_list in -l$libwnn" >&5
+echo "configure:8176: 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 8325 "configure"
+#line 8181 "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
@@ -8332,7 +8188,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8367,16 +8223,16 @@
   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:8371: checking for canna/jrkanji.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8374 "configure"
+echo "configure:8227: checking for canna/jrkanji.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8230 "configure"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:8235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -8402,16 +8258,16 @@
     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:8406: checking for canna/jrkanji.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8409 "configure"
+echo "configure:8262: checking for canna/jrkanji.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8265 "configure"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:8270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -8438,16 +8294,16 @@
 
   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:8442: checking for canna/RK.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8445 "configure"
+echo "configure:8298: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8301 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:8306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -8469,12 +8325,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:8473: checking for RkBgnBun in -lRKC" >&5
+echo "configure:8329: 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 8478 "configure"
+#line 8334 "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
@@ -8485,7 +8341,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8508,12 +8364,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:8512: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:8368: 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 8517 "configure"
+#line 8373 "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
@@ -8524,7 +8380,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:8528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8573,12 +8429,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:8577: checking for layout_object_getvalue in -li18n" >&5
+echo "configure:8433: 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 8582 "configure"
+#line 8438 "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
@@ -8589,7 +8445,7 @@
 layout_object_getvalue()
 ; return 0; }
 EOF
-if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8675,10 +8531,10 @@
 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8679: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8682 "configure"
+echo "configure:8535: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8538 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8701,7 +8557,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8742,10 +8598,10 @@
       * ) for ac_func in realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8746: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8749 "configure"
+echo "configure:8602: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8605 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8768,7 +8624,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8804,10 +8660,10 @@
 for ac_func in getloadavg
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8808: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8811 "configure"
+echo "configure:8664: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8667 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8830,7 +8686,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8866,12 +8722,12 @@
 
     
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:8870: checking for kstat_open in -lkstat" >&5
+echo "configure:8726: 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 8875 "configure"
+#line 8731 "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
@@ -8882,7 +8738,7 @@
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:8886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8916,12 +8772,12 @@
 
     
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:8920: checking for kvm_read in -lkvm" >&5
+echo "configure:8776: 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 8925 "configure"
+#line 8781 "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 +8788,7 @@
 kvm_read()
 ; 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:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8966,16 +8822,16 @@
 fi
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:8970: checking whether netdb declares h_errno" >&5
-cat > conftest.$ac_ext <<EOF
-#line 8972 "configure"
+echo "configure:8826: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8828 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:8979: \"$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; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -8995,16 +8851,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:8999: checking for sigsetjmp" >&5
-cat > conftest.$ac_ext <<EOF
-#line 9001 "configure"
+echo "configure:8855: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8857 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:9008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8864: \"$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
@@ -9024,11 +8880,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:9028: checking whether localtime caches TZ" >&5
+echo "configure:8884: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 9032 "configure"
+#line 8888 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -9063,7 +8919,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:9067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -9093,9 +8949,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
-echo "configure:9097: checking whether gettimeofday accepts one or two arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 9099 "configure"
+echo "configure:8953: checking whether gettimeofday accepts one or two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8955 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -9117,7 +8973,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""two" 1>&6
 else
@@ -9139,19 +8995,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:9143: checking for inline" >&5
+echo "configure:8999: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 9148 "configure"
+#line 9004 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:9155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -9201,17 +9057,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:9205: checking for working alloca.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9208 "configure"
+echo "configure:9061: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9064 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:9215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -9235,28 +9091,23 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:9239: checking for alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9242 "configure"
+echo "configure:9095: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9098 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
 # define alloca __builtin_alloca
 #else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
+# if HAVE_ALLOCA_H
+#  include <alloca.h>
 # else
-#  if HAVE_ALLOCA_H
-#   include <alloca.h>
+#  ifdef _AIX
+ #pragma alloca
 #  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
+#   ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
-#    endif
 #   endif
 #  endif
 # endif
@@ -9266,7 +9117,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:9270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -9294,7 +9145,7 @@
   # that cause trouble.  Some versions do not even contain alloca or
   # contain a buggy version.  If you still want to use their alloca,
   # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.${ac_objext}
+  ALLOCA=alloca.o
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining C_ALLOCA
 EOF
@@ -9305,10 +9156,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:9309: checking whether alloca needs Cray hooks" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9312 "configure"
+echo "configure:9160: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9163 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -9332,10 +9183,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:9336: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9339 "configure"
+echo "configure:9187: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9190 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9358,7 +9209,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9388,10 +9239,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:9392: checking stack direction for C alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9395 "configure"
+echo "configure:9243: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9246 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -9410,7 +9261,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:9414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -9439,16 +9290,16 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:9443: checking for vfork.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9446 "configure"
+echo "configure:9294: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9297 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:9302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -9475,10 +9326,10 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:9479: checking for working vfork" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9482 "configure"
+echo "configure:9330: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9333 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -9573,7 +9424,7 @@
   }
 }
 EOF
-if { (eval echo configure:9577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
@@ -9599,10 +9450,10 @@
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:9603: checking for working strcoll" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9606 "configure"
+echo "configure:9454: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9457 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -9612,7 +9463,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:9616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -9640,10 +9491,10 @@
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9644: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9647 "configure"
+echo "configure:9495: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9498 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9666,7 +9517,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9694,10 +9545,10 @@
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:9698: checking whether getpgrp takes no argument" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9701 "configure"
+echo "configure:9549: checking whether getpgrp takes no argument" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9552 "configure"
 #include "confdefs.h"
 
 /*
@@ -9752,7 +9603,7 @@
 }
 
 EOF
-if { (eval echo configure:9756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_getpgrp_void=yes
 else
@@ -9779,10 +9630,10 @@
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:9783: checking for working mmap" >&5
+echo "configure:9634: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 9786 "configure"
+#line 9637 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -9815,7 +9666,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   have_mmap=yes
 else
@@ -9840,16 +9691,16 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9844: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9847 "configure"
+echo "configure:9695: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9698 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:9703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -9880,10 +9731,10 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9884: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9887 "configure"
+echo "configure:9735: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9738 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9906,7 +9757,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9934,10 +9785,10 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:9938: checking for working mmap" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9941 "configure"
+echo "configure:9789: checking for working mmap" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9792 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -10077,7 +9928,7 @@
 }
 
 EOF
-if { (eval echo configure:10081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -10115,16 +9966,16 @@
 
 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:10119: checking for termios.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10122 "configure"
+echo "configure:9970: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9973 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:9978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10166,16 +10017,16 @@
   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:10170: checking for termio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10173 "configure"
+echo "configure:10021: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10024 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10206,10 +10057,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:10210: checking for socket" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10213 "configure"
+echo "configure:10061: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10064 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -10232,7 +10083,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -10247,16 +10098,16 @@
   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:10251: checking for netinet/in.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10254 "configure"
+echo "configure:10102: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10105 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10272,16 +10123,16 @@
   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:10276: checking for arpa/inet.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10279 "configure"
+echo "configure:10127: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10130 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10305,9 +10156,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:10309: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:10160: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 10311 "configure"
+#line 10162 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10318,7 +10169,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:10322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SOCKADDR_SUN_LEN
@@ -10336,9 +10187,9 @@
 fi
 rm -f conftest*
       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
-echo "configure:10340: checking "for ip_mreq struct in netinet/in.h"" >&5
+echo "configure:10191: checking "for ip_mreq struct in netinet/in.h"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 10342 "configure"
+#line 10193 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10348,7 +10199,7 @@
 static struct ip_mreq x;
 ; return 0; }
 EOF
-if { (eval echo configure:10352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_MULTICAST
@@ -10379,10 +10230,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:10383: checking for msgget" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10386 "configure"
+echo "configure:10234: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10237 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -10405,7 +10256,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -10420,16 +10271,16 @@
   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:10424: checking for sys/ipc.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10427 "configure"
+echo "configure:10275: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10278 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10445,16 +10296,16 @@
   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:10449: checking for sys/msg.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10452 "configure"
+echo "configure:10300: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10303 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10491,16 +10342,16 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:10495: checking for dirent.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10498 "configure"
+echo "configure:10346: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10349 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10526,16 +10377,16 @@
   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:10530: checking for sys/dir.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10533 "configure"
+echo "configure:10381: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10384 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10567,16 +10418,16 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:10571: checking for nlist.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10574 "configure"
+echo "configure:10422: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10425 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10605,7 +10456,7 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:10609: checking "for sound support"" >&5
+echo "configure:10460: checking "for sound support"" >&5
 case "$with_sound" in
   native | both ) with_native_sound=yes;;
   nas    | no   ) with_native_sound=no;;
@@ -10616,16 +10467,16 @@
     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:10620: checking for multimedia/audio_device.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10623 "configure"
+echo "configure:10471: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10474 "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:10628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10672,12 +10523,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:10676: checking for ALopenport in -laudio" >&5
+echo "configure:10527: 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 10681 "configure"
+#line 10532 "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
@@ -10688,7 +10539,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:10692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10719,12 +10570,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:10723: checking for AOpenAudio in -lAlib" >&5
+echo "configure:10574: 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 10728 "configure"
+#line 10579 "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
@@ -10735,7 +10586,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:10739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10773,16 +10624,16 @@
     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:10777: checking for ${dir}/soundcard.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10780 "configure"
+echo "configure:10628: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10631 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10851,7 +10702,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 10855 "configure"
+#line 10706 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -10878,7 +10729,7 @@
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:10882: checking for TTY-related features" >&5
+echo "configure:10733: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -10894,12 +10745,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:10898: checking for tgetent in -lncurses" >&5
+echo "configure:10749: 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 10903 "configure"
+#line 10754 "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
@@ -10910,7 +10761,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:10914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10943,16 +10794,16 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:10947: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10950 "configure"
+echo "configure:10798: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10801 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -10973,16 +10824,16 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:10977: checking for ncurses/term.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10980 "configure"
+echo "configure:10828: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10831 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -11011,16 +10862,16 @@
       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:11015: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11018 "configure"
+echo "configure:10866: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10869 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:10874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -11054,12 +10905,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:11058: checking for tgetent in -l$lib" >&5
+echo "configure:10909: 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 11063 "configure"
+#line 10914 "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
@@ -11070,7 +10921,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11101,12 +10952,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:11105: checking for tgetent in -lcurses" >&5
+echo "configure:10956: 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 11110 "configure"
+#line 10961 "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
@@ -11117,7 +10968,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11135,12 +10986,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:11139: checking for tgetent in -ltermcap" >&5
+echo "configure:10990: 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 11144 "configure"
+#line 10995 "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
@@ -11151,7 +11002,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11199,16 +11050,16 @@
 
     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:11203: checking for gpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11206 "configure"
+echo "configure:11054: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11057 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:11062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -11230,12 +11081,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:11234: checking for Gpm_Open in -lgpm" >&5
+echo "configure:11085: 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 11239 "configure"
+#line 11090 "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
@@ -11246,7 +11097,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:11250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11296,21 +11147,21 @@
 
 test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
   != "no no no" && echo "checking for database support" 1>&6
-echo "configure:11300: checking for database support" >&5
+echo "configure:11151: checking for database support" >&5
 
 if test "$with_database_gnudbm $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:11305: checking for ndbm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11308 "configure"
+echo "configure:11156: checking for ndbm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11159 "configure"
 #include "confdefs.h"
 #include <ndbm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:11164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -11339,12 +11190,12 @@
 if test "$with_database_gnudbm" != "no"; then
   
 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:11343: checking for dbm_open in -lgdbm" >&5
+echo "configure:11194: 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 11348 "configure"
+#line 11199 "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
@@ -11355,7 +11206,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:11359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11383,10 +11234,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:11387: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11390 "configure"
+echo "configure:11238: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11241 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -11409,7 +11260,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -11428,12 +11279,12 @@
 
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:11432: checking for dbm_open in -ldbm" >&5
+echo "configure:11283: 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 11437 "configure"
+#line 11288 "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
@@ -11444,7 +11295,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:11448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11485,10 +11336,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
-echo "configure:11489: checking for Berkeley db.h" >&5
+echo "configure:11340: checking for Berkeley db.h" >&5
   for path in "db/db.h" "db.h"; do
     cat > conftest.$ac_ext <<EOF
-#line 11492 "configure"
+#line 11343 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -11506,7 +11357,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -11522,9 +11373,9 @@
 
   if test "$with_database_berkdb" != "no"; then
     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
-echo "configure:11526: checking for Berkeley DB version" >&5
+echo "configure:11377: checking for Berkeley DB version" >&5
     cat > conftest.$ac_ext <<EOF
-#line 11528 "configure"
+#line 11379 "configure"
 #include "confdefs.h"
 #include <$db_h_path>
 #if DB_VERSION_MAJOR > 1
@@ -11543,10 +11394,10 @@
 rm -f conftest*
 
     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
-echo "configure:11547: checking for $dbfunc" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11550 "configure"
+echo "configure:11398: checking for $dbfunc" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11401 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $dbfunc(); below.  */
@@ -11569,7 +11420,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$dbfunc=yes"
 else
@@ -11588,12 +11439,12 @@
 
     
 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
-echo "configure:11592: checking for $dbfunc in -ldb" >&5
+echo "configure:11443: 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 11597 "configure"
+#line 11448 "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
@@ -11604,7 +11455,7 @@
 $dbfunc()
 ; return 0; }
 EOF
-if { (eval echo configure:11608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11668,12 +11519,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:11672: checking for SOCKSinit in -lsocks" >&5
+echo "configure:11523: 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 11677 "configure"
+#line 11528 "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
@@ -11684,7 +11535,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:11688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11741,16 +11592,16 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11745: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11748 "configure"
+echo "configure:11596: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11599 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+{ (eval echo configure:11604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -11788,12 +11639,12 @@
 
 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:11792: checking for dlopen in -ldl" >&5
+echo "configure:11643: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldl "
 cat > conftest.$ac_ext <<EOF
-#line 11797 "configure"
+#line 11648 "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
@@ -11804,7 +11655,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:11808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11833,12 +11684,12 @@
  }
 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
-echo "configure:11837: checking for _dlopen in -lc" >&5
+echo "configure:11688: checking for _dlopen in -lc" >&5
 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lc "
 cat > conftest.$ac_ext <<EOF
-#line 11842 "configure"
+#line 11693 "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
@@ -11849,7 +11700,7 @@
 _dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:11853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11878,12 +11729,12 @@
  }
 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
-echo "configure:11882: checking for dlopen in -lc" >&5
+echo "configure:11733: checking for dlopen in -lc" >&5
 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lc "
 cat > conftest.$ac_ext <<EOF
-#line 11887 "configure"
+#line 11738 "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
@@ -11894,7 +11745,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:11898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11923,12 +11774,12 @@
  }
 test -z "$with_shlib" && { 
 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:11927: checking for shl_load in -ldld" >&5
+echo "configure:11778: 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 11932 "configure"
+#line 11783 "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
@@ -11939,7 +11790,7 @@
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:11943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11968,12 +11819,12 @@
  }
 test -z "$with_shlib" && { 
 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
-echo "configure:11972: checking for dld_init in -ldld" >&5
+echo "configure:11823: 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 11977 "configure"
+#line 11828 "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
@@ -11984,7 +11835,7 @@
 dld_init()
 ; return 0; }
 EOF
-if { (eval echo configure:11988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12023,7 +11874,7 @@
 xealias=$internal_configuration
 
 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
-echo "configure:12027: checking how to build dynamic libraries for ${xehost}" >&5
+echo "configure:11878: checking how to build dynamic libraries for ${xehost}" >&5
 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
 case "$xehost" in
 *-*-linux-gnu*) ;;
@@ -12051,9 +11902,9 @@
   XEGCC=yes
 else
   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:12055: checking checking whether we are using GNU C" >&5
+echo "configure:11906: checking checking whether we are using GNU C" >&5
   cat > conftest.$ac_ext <<EOF
-#line 12057 "configure"
+#line 11908 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -12075,7 +11926,7 @@
 fi
 
 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
-echo "configure:12079: checking how to produce PIC code" >&5
+echo "configure:11930: checking how to produce PIC code" >&5
 wl=
 
 can_build_shared=yes
@@ -12168,18 +12019,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:12172: checking if PIC flag ${dll_cflags} really works" >&5
+echo "configure:12023: checking if PIC flag ${dll_cflags} really works" >&5
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $dll_cflags -DPIC"
   cat > conftest.$ac_ext <<EOF
-#line 12176 "configure"
+#line 12027 "configure"
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
-if { (eval echo configure:12183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12034: \"$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
@@ -12210,7 +12061,7 @@
 xldf=
 xcldf=
 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
-echo "configure:12214: checking if C compiler can produce shared libraries" >&5
+echo "configure:12065: checking if C compiler can produce shared libraries" >&5
 if test "$XEGCC" = yes; then
   xcldf="-shared"
   xldf="-shared"
@@ -12261,14 +12112,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 12265 "configure"
+#line 12116 "configure"
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
-if { (eval echo configure:12272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cc_produces_so=yes
 else
@@ -12293,7 +12144,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:12297: checking for ld used by GCC" >&5
+echo "configure:12148: checking for ld used by GCC" >&5
     ac_prog=`($CC -print-prog-name=ld) 2>&5`
     case "$ac_prog" in
     # Accept absolute paths.
@@ -12318,7 +12169,7 @@
     esac
   else
     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:12322: checking for GNU ld" >&5
+echo "configure:12173: checking for GNU ld" >&5
   fi
 
   if test -z "$LTLD"; then
@@ -12356,7 +12207,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:12360: checking if the linker is GNU ld" >&5
+echo "configure:12211: 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
@@ -12383,7 +12234,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:12387: checking whether the linker supports shared libraries" >&5
+echo "configure:12238: checking whether the linker supports shared libraries" >&5
   dll_ld=$CC
   dll_ldflags=$LDFLAGS
   ld_shlibs=yes
@@ -12599,10 +12450,10 @@
     for ac_func in dlerror _dlerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12603: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 12606 "configure"
+echo "configure:12454: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 12457 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -12625,7 +12476,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:12629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -12659,11 +12510,11 @@
 fi
 
 cat > conftest.$ac_ext <<EOF
-#line 12663 "configure"
+#line 12514 "configure"
 #include "confdefs.h"
 int main(int c,char *v[]){return 0;}
 EOF
-if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:12518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
@@ -13307,9 +13158,7 @@
 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
 
-test "$with_umich_ldap"	     = yes && echo "  Compiling in support for LDAP (UMich libs)."
-test "$with_ns_ldap"	     = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
-test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
+test "$with_ldap"	     = yes && echo "  Compiling in support for LDAP."
 
 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
@@ -13443,7 +13292,7 @@
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    echo "$CONFIG_STATUS generated by autoconf version 2.12"
     exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
@@ -13463,11 +13312,9 @@
  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
 $ac_vpsub
 $extrasub
-s%@SHELL@%$SHELL%g
 s%@CFLAGS@%$CFLAGS%g
 s%@CPPFLAGS@%$CPPFLAGS%g
 s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
 s%@DEFS@%$DEFS%g
 s%@LDFLAGS@%$LDFLAGS%g
 s%@LIBS@%$LIBS%g
@@ -13497,7 +13344,6 @@
 s%@lib_gcc@%$lib_gcc%g
 s%@RANLIB@%$RANLIB%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@YACC@%$YACC%g
 s%@SET_MAKE@%$SET_MAKE%g
--- a/configure.in	Mon Aug 13 11:22:24 2007 +0200
+++ b/configure.in	Mon Aug 13 11:23:13 2007 +0200
@@ -2670,23 +2670,20 @@
 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
 if test "$with_ldap" != "no"; then
-  test -z "$with_umich_ldap" && { AC_CHECK_LIB(ldap, ldap_open, with_umich_ldap=yes, with_umich_ldap=no, -llber) }
-  test "$with_umich_ldap" = "no" && { AC_CHECK_LIB(ldap10, ldap_set_option, with_ns_ldap=yes, with_ns_ldap=no) }
-  test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
+  AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no)
+  test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) }
+  test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" \) && with_ldap=yes
 fi
 if test "$with_ldap" = "yes"; then
   AC_DEFINE(HAVE_LDAP)
   XE_ADD_OBJS(eldap.o)
-  if test "$with_umich_ldap" = "yes" ; then
-    AC_DEFINE(HAVE_UMICH_LDAP)
+  if test "$with_ldap_nolber" = "yes" ; then
+    XE_PREPEND(-lldap, LIBS)
+  else
     XE_PREPEND(-llber, LIBS)
     XE_PREPEND(-lldap, LIBS)
-  elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
-    AC_DEFINE(HAVE_NS_LDAP)
-    XE_PREPEND(-lldap10, LIBS)
-  elif test "$with_ldap" = "yes" ; then
-    XE_PREPEND(-lldap, LIBS)
   fi
+  AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result)
 fi
 
 dnl ----------------------
@@ -4061,9 +4058,7 @@
 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
 
-test "$with_umich_ldap"	     = yes && echo "  Compiling in support for LDAP (UMich libs)."
-test "$with_ns_ldap"	     = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
-test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
+test "$with_ldap"	     = yes && echo "  Compiling in support for LDAP."
 
 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
--- a/etc/NEWS	Mon Aug 13 11:22:24 2007 +0200
+++ b/etc/NEWS	Mon Aug 13 11:23:13 2007 +0200
@@ -88,6 +88,22 @@
 The new primitives available for this purpose are functions named
 `user-name-completion' and `user-name-all-completions'.
 
+** Native widgets can be displayed in buffers.
+
+The glyph system has been extended to allow the display of glyphs that
+are implemented as native window-system widgets. Thus you can embed
+buttons, scrollbars, combo boxes, edit fields and progress gauges in a
+buffer. As a side effect subwindow support now works once again.
+
+This support is currently only available under MS-Windows.
+
+** X-Face support is now available under MS-Windows
+
+If an X-Face libary built under MS-Windows is available then XEmacs
+will use this at build time.
+
+** The font-menu is now available under MS-Windows
+
 
 * Lisp and internal changes in XEmacs 21.2
 ==========================================
--- a/lib-src/ChangeLog	Mon Aug 13 11:22:24 2007 +0200
+++ b/lib-src/ChangeLog	Mon Aug 13 11:23:13 2007 +0200
@@ -1,3 +1,7 @@
+1999-06-22  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.17 is released
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.16 is released
--- a/lib-src/config.values.in	Mon Aug 13 11:22:24 2007 +0200
+++ b/lib-src/config.values.in	Mon Aug 13 11:23:13 2007 +0200
@@ -27,7 +27,6 @@
 ETCDIR "@ETCDIR@"
 ETCDIR_USER_DEFINED "@ETCDIR_USER_DEFINED@"
 EXEC_PREFIX "@EXEC_PREFIX@"
-FFLAGS "@FFLAGS@"
 INFODIR "@INFODIR@"
 INFODIR_USER_DEFINED "@INFODIR_USER_DEFINED@"
 INFOPATH "@INFOPATH@"
@@ -36,7 +35,6 @@
 INSTALL_ARCH_DEP_SUBDIR "@INSTALL_ARCH_DEP_SUBDIR@"
 INSTALL_DATA "@INSTALL_DATA@"
 INSTALL_PROGRAM "@INSTALL_PROGRAM@"
-INSTALL_SCRIPT "@INSTALL_SCRIPT@"
 LDFLAGS "@LDFLAGS@"
 LIBS "@LIBS@"
 LISPDIR "@LISPDIR@"
@@ -54,7 +52,6 @@
 RANLIB "@RANLIB@"
 RECURSIVE_MAKE "@RECURSIVE_MAKE@"
 SET_MAKE "@SET_MAKE@"
-SHELL "@SHELL@"
 SITELISPDIR "@SITELISPDIR@"
 SITELISPDIR_USER_DEFINED "@SITELISPDIR_USER_DEFINED@"
 SITEMODULEDIR "@SITEMODULEDIR@"
--- a/lisp/ChangeLog	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 11:23:13 2007 +0200
@@ -1,3 +1,46 @@
+1999-06-22  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.17 is released
+
+1999-06-17  Robert Pluim  <rpluim@bigfoot.com>
+
+	* font-menu.el (font-menu-set-font): allow for nil specification
+	of font size.
+
+1999-06-16  MORIOKA Tomohiko  <tomo@etl.go.jp>
+
+	* mule/thai-xtis.el: Specify `columns' of the charset `thai-xtis'
+	is 1.
+
+1999-06-12  MORIOKA Tomohiko  <tomo@etl.go.jp>
+
+	* mule/cyrillic.el (cyrillic-koi8-r-decode-table): Use NBSP of ISO
+	8859-5 instead of ISO 8859-1.
+
+1999-06-15  SL Baur  <steve@steve1.m17n.org>
+
+	* mule/vietnamese.el (viet-vscii-encode-table): Use split-char.
+	(viet-viscii-encode-table): Ditto.
+
+	* mule/mule-misc.el: Delete split-char & split-char-or-char-int.
+	Make obsolete definition of char-octet.
+
+1999-06-14  SL Baur  <steve@steve1.m17n.org>
+
+	* subr.el: Move no-Mule make-char ...
+	* help-nomule.el (make-char): To here.
+	(string-width): Make Mule compatibility alias.
+
+1999-06-15  Andy Piper  <andy@xemacs.org>
+
+	* select.el (get-selection-no-error): really make there be no-error.
+	(get-selection): revert to original.
+
+1999-06-11  Andy Piper  <andy@xemacs.org>
+
+	* select.el (selection-sets-clipboard): renamed.
+	(own-selection): use it.
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.16 is released
--- a/lisp/font-menu.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/font-menu.el	Mon Aug 13 11:23:13 2007 +0200
@@ -400,7 +400,7 @@
 		(list :family family
 		      :size (concat
 			     (int-to-string
-			      (/ size
+			      (/ (or size from-size)
 				 (specifier-instance font-menu-size-scaling
 				      (selected-device))))
 			      "pt")))		 
--- a/lisp/help-nomule.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/help-nomule.el	Mon Aug 13 11:23:13 2007 +0200
@@ -100,6 +100,19 @@
 		    ;; Now, signal the error
 		    (signal (car error-data) (cdr error-data)))))))
 
+;; General Mule-compatibility stuffs
+(define-function 'string-width 'length)
+
+;; The following was originally in subr.el
+(defun make-char (charset &optional arg1 arg2)
+  "Make a character from CHARSET and octets ARG1 and ARG2.
+This function is available for compatibility with Mule-enabled XEmacsen.
+When CHARSET is `ascii', return (int-char ARG1).  Otherwise, return
+that value with the high bit set.  ARG2 is always ignored."
+  (int-char (if (eq charset 'ascii)
+		arg1
+	      (logior arg1 #x80))))
+
 
 (provide 'help-nomule)
 
--- a/lisp/mule/cyrillic.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/mule/cyrillic.el	Mon Aug 13 11:23:13 2007 +0200
@@ -32,9 +32,9 @@
 
 ;; For syntax of Cyrillic
 (modify-syntax-entry 'cyrillic-iso8859-5 "w")
-(modify-syntax-entry ?.LN- ".")
-(modify-syntax-entry ?.LNp ".")
-(modify-syntax-entry ?.LN} ".")
+(modify-syntax-entry ?,L-(B ".")
+(modify-syntax-entry ?,Lp(B ".")
+(modify-syntax-entry ?,L}(B ".")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; CYRILLIC
@@ -77,7 +77,7 @@
 		  (charset . (cyrillic-iso8859-5))
 		  (tutorial . "TUTORIAL.ru")
 		  (coding-system . (iso-8859-5))
-		  (sample-text . "Russian (.LN@NcNaNaNZNXNY)	N7NTN`NPNRNaNbNRNcNYNbNU!")
+		  (sample-text . "Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!")
 		  (documentation . ("Support for Cyrillic ISO-8859-5."
 				    . describe-cyrillic-environment-map))))
 
@@ -96,13 +96,13 @@
    96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
    112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
    ?$B(!(B ?$B("(B ?$B(#(B ?$B($(B ?$B(&(B ?$B(%(B ?$B('(B ?$B()(B ?$B(((B ?$B(*(B ?$B(+(B 32  ?$(G#'(B ?$(G#+(B ?$(G#/(B 32
-   32  ?$(C"F(B 32  32  ?$B"#(B 32  ?$B"e(B ?$A!V(B ?$A!\(B ?$A!](B ?.AN   32  ?N0  ?N2  ?N7  ?Nw
-   ?$(G#D(B 32  32  ?.LNq  32  32  32  32  32  32  32  32  32  32  32  ?$(G#E(B
-   32  32  ?$(G#G(B ?.LN!  32  32  32  32  32  32  32  32  ?$(G#F(B 32  32  ?.AN)
-   ?.LNn  ?NP  ?NQ  ?Nf  ?NT  ?NU  ?Nd  ?NS  ?Ne  ?NX  ?NY  ?NZ  ?N[  ?N\  ?N]  ?N^ 
-   ?.LN_  ?No  ?N`  ?Na  ?Nb  ?Nc  ?NV  ?NR  ?Nl  ?Nk  ?NW  ?Nh  ?Nm  ?Ni  ?Ng  ?Nj 
-   ?.LNN  ?N0  ?N1  ?NF  ?N4  ?N5  ?ND  ?N3  ?NE  ?N8  ?N9  ?N:  ?N;  ?N<  ?N=  ?N> 
-   ?.LN?  ?NO  ?N@  ?NA  ?NB  ?NC  ?N6  ?N2  ?NL  ?NK  ?N7  ?NH  ?NM  ?NI  ?NG  ?NJ ]
+   32  ?$(C"F(B 32  32  ?$B"#(B 32  ?$B"e(B ?$A!V(B ?$A!\(B ?$A!](B ?,L (B  32  ?,A0(B  ?,A2(B  ?,A7(B  ?,Aw(B
+   ?$(G#D(B 32  32  ?,Lq(B  32  32  32  32  32  32  32  32  32  32  32  ?$(G#E(B
+   32  32  ?$(G#G(B ?,L!(B  32  32  32  32  32  32  32  32  ?$(G#F(B 32  32  ?,A)(B
+   ?,Ln(B  ?,LP(B  ?,LQ(B  ?,Lf(B  ?,LT(B  ?,LU(B  ?,Ld(B  ?,LS(B  ?,Le(B  ?,LX(B  ?,LY(B  ?,LZ(B  ?,L[(B  ?,L\(B  ?,L](B  ?,L^(B 
+   ?,L_(B  ?,Lo(B  ?,L`(B  ?,La(B  ?,Lb(B  ?,Lc(B  ?,LV(B  ?,LR(B  ?,Ll(B  ?,Lk(B  ?,LW(B  ?,Lh(B  ?,Lm(B  ?,Li(B  ?,Lg(B  ?,Lj(B 
+   ?,LN(B  ?,L0(B  ?,L1(B  ?,LF(B  ?,L4(B  ?,L5(B  ?,LD(B  ?,L3(B  ?,LE(B  ?,L8(B  ?,L9(B  ?,L:(B  ?,L;(B  ?,L<(B  ?,L=(B  ?,L>(B 
+   ?,L?(B  ?,LO(B  ?,L@(B  ?,LA(B  ?,LB(B  ?,LC(B  ?,L6(B  ?,L2(B  ?,LL(B  ?,LK(B  ?,L7(B  ?,LH(B  ?,LM(B  ?,LI(B  ?,LG(B  ?,LJ(B ]
   "Cyrillic KOI8-R decoding table.")
 
 (defvar cyrillic-koi8-r-encode-table
@@ -110,7 +110,7 @@
 	(i 0))
     (while (< i 256)
       (let* ((ch (aref cyrillic-koi8-r-decode-table i))
-	     (split (split-char-or-char-int ch)))
+	     (split (split-char ch)))
 	(cond ((eq (car split) 'cyrillic-iso8859-5)
 	       (aset table (logior (nth 1 split) 128) i)
 	       )
@@ -184,7 +184,7 @@
 		   (charset . (cyrillic-iso8859-5))
 		   (coding-system . (koi8-r))
 		   (tutorial . "TUTORIAL.ru")
-		   (sample-text . "Russian (.LN@NcNaNaNZNXNY)	N7NTN`NPNRNaNbNRNcNYNbNU!")
+		   (sample-text . "Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!")
 		   (documentation . ("Support for Cyrillic KOI-8."
 				     . describe-cyrillic-environment-map))))
 
@@ -204,14 +204,14 @@
 	       80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95
 	       96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111
 	       112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
-	       ?.LN0  ?N1  ?N2  ?N3  ?N4  ?N5  ?N6  ?N7  ?N8  ?N9  ?N:  ?N;  ?N<  ?N=  ?N>  ?N?
-	       ?.LN@  ?NA  ?NB  ?NC  ?ND  ?NE  ?NF  ?NG  ?NH  ?NI  ?NJ  ?NK  ?NL  ?NM  ?NN  ?NO
-	       ?.LNP  ?NQ  ?NR  ?NS  ?NT  ?NU  ?NV  ?NW  ?NX  ?NY  ?NZ  ?N[  ?N\  ?N]  ?N^  ?N_
+	       ?,L0(B  ?,L1(B  ?,L2(B  ?,L3(B  ?,L4(B  ?,L5(B  ?,L6(B  ?,L7(B  ?,L8(B  ?,L9(B  ?,L:(B  ?,L;(B  ?,L<(B  ?,L=(B  ?,L>(B  ?,L?(B
+	       ?,L@(B  ?,LA(B  ?,LB(B  ?,LC(B  ?,LD(B  ?,LE(B  ?,LF(B  ?,LG(B  ?,LH(B  ?,LI(B  ?,LJ(B  ?,LK(B  ?,LL(B  ?,LM(B  ?,LN(B  ?,LO(B
+	       ?,LP(B  ?,LQ(B  ?,LR(B  ?,LS(B  ?,LT(B  ?,LU(B  ?,LV(B  ?,LW(B  ?,LX(B  ?,LY(B  ?,LZ(B  ?,L[(B  ?,L\(B  ?,L](B  ?,L^(B  ?,L_(B
 	       32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
 	       32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
 	       32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
-	       ?.LN`  ?Na  ?Nb  ?Nc  ?Nd  ?Ne  ?Nf  ?Ng  ?Nh  ?Ni  ?Nj  ?Nk  ?Nl  ?Nm  ?Nn  ?No
-	       ?.LN!  ?Nq   32  32  32  32  32  32  32  32  32  32  32  32  32 ?Np]))))
+	       ?,L`(B  ?,La(B  ?,Lb(B  ?,Lc(B  ?,Ld(B  ?,Le(B  ?,Lf(B  ?,Lg(B  ?,Lh(B  ?,Li(B  ?,Lj(B  ?,Lk(B  ?,Ll(B  ?,Lm(B  ?,Ln(B  ?,Lo(B
+	       ?,L!(B  ?,Lq(B   32  32  32  32  32  32  32  32  32  32  32  32  32 ?,Lp(B]))))
   "CCL program to decode Alternativnyj.")
 
 (define-ccl-program ccl-encode-alternativnyj
@@ -268,7 +268,7 @@
 		  (charset . (cyrillic-iso8859-5))
 		  (coding-system . (alternativnyj))
 		  (tutorial . "TUTORIAL.ru")
-		  (sample-text . "Russian (.LN@NcNaNaNZNXNY)	N7NTN`NPNRNaNbNRNcNYNbNU!")
+		  (sample-text . "Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!")
 		  (documentation . ("Support for Cyrillic ALTERNATIVNYJ."
 				    . describe-cyrillic-environment-map))))
 
@@ -303,7 +303,7 @@
               (charset . (cyrillic-iso8859-5))
 	      (tutorial . "TUTORIAL.ru")
               (coding-system . (iso-8859-5 koi8-r alternativnyj))
-              (sample-text . "Russian (.LN@NcNaNaNZNXNY) N7NTN`NPNRNaNbNRNcNYNbNU!")
+              (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
               (documentation . nil)))
 
 ;;; cyrillic.el ends here
--- a/lisp/mule/mule-misc.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/mule/mule-misc.el	Mon Aug 13 11:23:13 2007 +0200
@@ -190,34 +190,46 @@
 because its `find-charset-string' ignores ASCII charset."
   (delq 'ascii (charsets-in-region start end)))
 
-(defun split-char (char)
-  "Return list of charset and one or two position-codes of CHAR."
-  (let ((charset (char-charset char)))
-    (if (eq charset 'ascii)
-	(list charset (char-int char))
-      (let ((i 0)
-	    (len (charset-dimension charset))
-	    (code (if (integerp char)
-		      char
-		    (char-int char)))
-	    dest)
-	(while (< i len)
-	  (setq dest (cons (logand code 127) dest)
-		code (lsh code -7)
-		i (1+ i)))
-	(cons charset dest)
-	))))
+;(defun split-char (char)
+;  "Return list of charset and one or two position-codes of CHAR."
+;  (let ((charset (char-charset char)))
+;    (if (eq charset 'ascii)
+;	(list charset (char-int char))
+;      (let ((i 0)
+;	    (len (charset-dimension charset))
+;	    (code (if (integerp char)
+;		      char
+;		    (char-int char)))
+;	    dest)
+;	(while (< i len)
+;	  (setq dest (cons (logand code 127) dest)
+;		code (lsh code -7)
+;		i (1+ i)))
+;	(cons charset dest)
+;	))))
 
-(defun split-char-or-char-int (char)
-  "Return list of charset and one or two position-codes of CHAR.
-CHAR must be character or integer."
-  (if (characterp char)
-      (split-char char)
-    (let ((c (int-char char)))
-      (if c
-	  (split-char c)
-	(list 'ascii c)
-	))))
+(defun char-octet (ch &optional n)
+  "Return the octet numbered N (should be 0 or 1) of char CH.
+N defaults to 0 if omitted."
+  (let ((split (split-char ch)))
+    (cond ((eq n 0)
+	   (nth 1 split))
+	  ((eq n 1)
+	   (nth 2 split))
+	  (t (error "n must be 0 or 1")))))
+;; Made obsolete June 15, 1999.  Delete ASAP.
+(make-obsolete 'char-octet "Use split-char")
+
+;(defun split-char-or-char-int (char)
+;  "Return list of charset and one or two position-codes of CHAR.
+;CHAR must be character or integer."
+;  (if (characterp char)
+;      (split-char char)
+;    (let ((c (int-char char)))
+;      (if c
+;	  (split-char c)
+;	(list 'ascii c)
+;	))))
 
 
 ;;; Commands
--- a/lisp/mule/thai-xtis.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/mule/thai-xtis.el	Mon Aug 13 11:23:13 2007 +0200
@@ -36,8 +36,9 @@
 
 (when (featurep 'xemacs)
   (make-charset 'thai-xtis "Precomposed Thai (XTIS by Virach)."
-		'(registry "xtis-0$"
+		'(registry "xtis-0"
 			   dimension 2
+			   columns 1
 			   chars 94
 			   final ??
 			   graphic 0))
--- a/lisp/mule/vietnamese.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/mule/vietnamese.el	Mon Aug 13 11:23:13 2007 +0200
@@ -33,22 +33,22 @@
 
 (defvar viet-viscii-decode-table
   [;; VISCII is a full 8-bit code.
-   0 1 ?.2NF 3 4 ?NG ?Ng 7 8 9 10 11 12 13 14 15
-   16 17 18 19 ?.2NV 21 22 23 24 ?N[ 26 27 28 29 ?N\ 31
+   0 1 ?,2F(B 3 4 ?,2G(B ?,2g(B 7 8 9 10 11 12 13 14 15
+   16 17 18 19 ?,2V(B 21 22 23 24 ?,2[(B 26 27 28 29 ?,2\(B 31
    32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
    48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
    64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
    80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
    96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
    112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 
-   ?.2NU ?N! ?N" ?N# ?N$ ?N% ?N& ?N' ?N( ?N) ?N* ?N+ ?N, ?N- ?N. ?N/
-   ?.2N0 ?N1 ?N2 ?N5 ?N~ ?N> ?N6 ?N7 ?N8 ?Nv ?Nw ?No ?N| ?N{ ?Nx ?NO
-   ?.2Nu ?.1N! ?N" ?N# ?N$ ?N% ?N& ?N' ?N( ?N) ?N* ?N+ ?N, ?N- ?N. ?N/
-   ?.1N0 ?N1 ?N2 ?.2N^ ?N= ?.1N5 ?N6 ?N7 ?N8 ?.2Nq ?NQ ?NW ?NX ?.1N= ?N> ?.2N_
-   ?.2N` ?Na ?Nb ?Nc ?Nd ?Ne ?.1NF ?NG ?.2Nh ?Ni ?Nj ?Nk ?Nl ?Nm ?Nn ?.1NO
-   ?.2Np ?.1NQ ?.2Nr ?Ns ?Nt ?.1NU ?NV ?NW ?NX ?.2Ny ?Nz ?.1N[ ?N\ ?.2N} ?.1N^ ?N_
-   ?.1N` ?Na ?Nb ?Nc ?Nd ?Ne ?Nf ?Ng ?Nh ?Ni ?Nj ?Nk ?Nl ?Nm ?Nn ?No
-   ?.1Np ?Nq ?Nr ?Ns ?Nt ?Nu ?Nv ?Nw ?Nx ?Ny ?Nz ?N{ ?N| ?N} ?N~ ?.2Nf ]
+   ?,2U(B ?,2!(B ?,2"(B ?,2#(B ?,2$(B ?,2%(B ?,2&(B ?,2'(B ?,2((B ?,2)(B ?,2*(B ?,2+(B ?,2,(B ?,2-(B ?,2.(B ?,2/(B
+   ?,20(B ?,21(B ?,22(B ?,25(B ?,2~(B ?,2>(B ?,26(B ?,27(B ?,28(B ?,2v(B ?,2w(B ?,2o(B ?,2|(B ?,2{(B ?,2x(B ?,2O(B
+   ?,2u(B ?,1!(B ?,1"(B ?,1#(B ?,1$(B ?,1%(B ?,1&(B ?,1'(B ?,1((B ?,1)(B ?,1*(B ?,1+(B ?,1,(B ?,1-(B ?,1.(B ?,1/(B
+   ?,10(B ?,11(B ?,12(B ?,2^(B ?,2=(B ?,15(B ?,16(B ?,17(B ?,18(B ?,2q(B ?,2Q(B ?,2W(B ?,2X(B ?,1=(B ?,1>(B ?,2_(B
+   ?,2`(B ?,2a(B ?,2b(B ?,2c(B ?,2d(B ?,2e(B ?,1F(B ?,1G(B ?,2h(B ?,2i(B ?,2j(B ?,2k(B ?,2l(B ?,2m(B ?,2n(B ?,1O(B
+   ?,2p(B ?,1Q(B ?,2r(B ?,2s(B ?,2t(B ?,1U(B ?,1V(B ?,1W(B ?,1X(B ?,2y(B ?,2z(B ?,1[(B ?,1\(B ?,2}(B ?,1^(B ?,1_(B
+   ?,1`(B ?,1a(B ?,1b(B ?,1c(B ?,1d(B ?,1e(B ?,1f(B ?,1g(B ?,1h(B ?,1i(B ?,1j(B ?,1k(B ?,1l(B ?,1m(B ?,1n(B ?,1o(B
+   ?,1p(B ?,1q(B ?,1r(B ?,1s(B ?,1t(B ?,1u(B ?,1v(B ?,1w(B ?,1x(B ?,1y(B ?,1z(B ?,1{(B ?,1|(B ?,1}(B ?,1~(B ?,2f(B ]
   "Vietnamese VISCII decoding table.")
 
 (defvar viet-viscii-encode-table
@@ -58,7 +58,7 @@
 	char-component)
     (while (< i 256)
       (setq char-component
-	    (split-char-or-char-int (aref viet-viscii-decode-table i)))
+	    (split-char (aref viet-viscii-decode-table i)))
       (cond ((eq (car char-component) 'vietnamese-viscii-lower)
 	     (aset table-lower (nth 1 char-component) i))
 	    ((eq (car char-component) 'vietnamese-viscii-upper)
@@ -71,22 +71,22 @@
 
 (defvar viet-vscii-decode-table
   [;; VSCII is a full 8-bit code.
-   0 ?.2Nz ?Nx 3 ?NW ?NX ?Nf 7 8 9 10 11 12 13 14 15
-   16 ?.2NQ ?N_ ?NO ?NV ?N[ ?N} ?N\ 24 25 26 27 28 29 30 31
+   0 ?,2z(B ?,2x(B 3 ?,2W(B ?,2X(B ?,2f(B 7 8 9 10 11 12 13 14 15
+   16 ?,2Q(B ?,2_(B ?,2O(B ?,2V(B ?,2[(B ?,2}(B ?,2\(B 24 25 26 27 28 29 30 31
    32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
    48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
    64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
    80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
    96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
    112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 
-   ?.2N` ?Nd ?Nc ?Na ?NU ?N# ?N' ?Nh ?Nk ?N( ?Ni ?N) ?N. ?Nl ?No ?Nn
-   ?.2Nm ?N8 ?Nr ?Nv ?Nu ?Ns ?Nw ?N5 ?N6 ?N7 ?N^ ?N> ?N~ ?Ny ?N| ?N{
-   160 ?.2Ne ?Nb ?Nj ?Nt ?N= ?N_ ?Np ?.1Ne ?Nb ?Nj ?Nt ?N> ?Ny ?Np ?.2N"
-   192 193 194 195 196 ?.1N` ?Nd ?Nc ?Na ?NU ?.2NF ?.1N" ?NF ?NG ?N! ?.2NG
-   ?.2N! ?N% ?N& ?Ng ?N% ?N+ ?.1N# ?N% ?N& ?Ng ?N$ ?N' ?Nh ?.2N, ?.1Nk ?N(
-   ?.1Ni ?N) ?N+ ?N, ?N- ?N* ?N. ?Nl ?No ?.2N- ?N* ?N0 ?.1Nn ?Nm ?N8 ?Nr
-   ?.2N1 ?.1Nv ?Nu ?Ns ?Nw ?N0 ?N1 ?N2 ?N/ ?N5 ?N6 ?N7 ?N^ ?N> ?N~ ?Ny
-   ?.2N2 ?.1N| ?N{ ?Nz ?Nx ?NW ?NX ?Nf ?NQ ?Nq ?NO ?NV ?N[ ?N} ?N\ ?.2N/]
+   ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B
+   ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B
+   160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1>(B ?,1y(B ?,1p(B ?,2"(B
+   192 193 194 195 196 ?,1`(B ?,1d(B ?,1c(B ?,1a(B ?,1U(B ?,2F(B ?,1"(B ?,1F(B ?,1G(B ?,1!(B ?,2G(B
+   ?,2!(B ?,2%(B ?,2&(B ?,2g(B ?,2%(B ?,2+(B ?,1#(B ?,1%(B ?,1&(B ?,1g(B ?,1$(B ?,1'(B ?,1h(B ?,2,(B ?,1k(B ?,1((B
+   ?,1i(B ?,1)(B ?,1+(B ?,1,(B ?,1-(B ?,1*(B ?,1.(B ?,1l(B ?,1o(B ?,2-(B ?,2*(B ?,20(B ?,1n(B ?,1m(B ?,18(B ?,1r(B
+   ?,21(B ?,1v(B ?,1u(B ?,1s(B ?,1w(B ?,10(B ?,11(B ?,12(B ?,1/(B ?,15(B ?,16(B ?,17(B ?,1^(B ?,1>(B ?,1~(B ?,1y(B
+   ?,22(B ?,1|(B ?,1{(B ?,1z(B ?,1x(B ?,1W(B ?,1X(B ?,1f(B ?,1Q(B ?,1q(B ?,1O(B ?,1V(B ?,1[(B ?,1}(B ?,1\(B ?,2/(B]
   "Vietnamese VSCII decoding table.")
 
 (defvar viet-vscii-encode-table
@@ -96,7 +96,7 @@
 	char-component)
     (while (< i 256)
       (setq char-component
-	    (split-char-or-char-int (aref viet-vscii-decode-table i)))
+	    (split-char (aref viet-vscii-decode-table i)))
       (cond ((eq (car char-component) 'vietnamese-viscii-lower)
 	     (aset table-lower (nth 1 char-component) i))
 	    ((eq (car char-component) 'vietnamese-viscii-upper)
@@ -270,7 +270,7 @@
 		(charset . (vietnamese-viscii-lower
 			    vietnamese-viscii-upper))
 		(coding-system . (viscii vscii viqr))
-		(sample-text . "Vietnamese (Ti.1N*ng ViN.t)	ChN`o bNUn")
+		(sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt)	Ch,1`(Bo b,1U(Bn")
 		(documentation . "\
 For Vietnamese, Emacs uses special charasets internally.
 They can be decoded from and encoded to VISCC, VSCII, and VIQR.")
--- a/lisp/select.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/select.el	Mon Aug 13 11:23:13 2007 +0200
@@ -40,7 +40,7 @@
 If a list is provided, the types are tried in sequence until
 there is a successful conversion.")
 
-(defvar selection-is-clipboard-p nil 
+(defvar selection-sets-clipboard nil 
   "Controls the selection's relationship to the clipboard.
 When non-nil, any operation that sets the primary selection will also
 set the clipboard.")
@@ -75,21 +75,18 @@
   "Return the value of one of the cut buffers.
 This will do nothing under anything other than X.")
 
+(defun get-selection-no-error (&optional type data-type)
+  "Return the value of a Windows selection.
+The argument TYPE (default `PRIMARY') says which selection,
+and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
+says how to convert the data. Returns NIL if there is no selection"
+  (condition-case err (get-selection type data-type) (t nil)))
+
 (defun get-selection (&optional type data-type)
   "Return the value of a Windows selection.
 The argument TYPE (default `PRIMARY') says which selection,
 and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
 says how to convert the data. If there is no selection an error is signalled."
-  (let ((text (get-selection-no-error type data-type)))
-    (when (not (stringp text))
-      (error "Selection is not a string: %S" text))
-    text))
-
-(defun get-selection-no-error (&optional type data-type)
-  "Return the value of a Windows selection.
-The argument TYPE (default `PRIMARY') says which selection,
-and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
-says how to convert the data. Returns NIL if there is no selection"
   (or type (setq type 'PRIMARY))
   (or data-type (setq data-type selected-text-type))
   (let ((text
@@ -103,6 +100,8 @@
 	   (get-selection-internal type data-type))))
     (when (and (consp text) (symbolp (car text)))
       (setq text (cdr text)))
+    (when (not (stringp text))
+      (error "Selection is not a string: %S" text))
     text))
 
 ;; FSFmacs calls this `x-set-selection', and reverses the
@@ -144,7 +143,7 @@
       (disown-selection-internal type)
     (own-selection-internal type data)
     (when (and (eq type 'PRIMARY)
-	       selection-is-clipboard-p)
+	       selection-sets-clipboard)
       (own-selection-internal 'CLIPBOARD data)))
   (cond ((eq type 'PRIMARY)
 	 (setq primary-selection-extent
--- a/lisp/subr.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/lisp/subr.el	Mon Aug 13 11:23:13 2007 +0200
@@ -682,16 +682,6 @@
   (eval-after-load file (read)))
 (make-compatible 'eval-next-after-load "")
 
-(unless (featurep 'mule)
-  (defun make-char (charset &optional arg1 arg2)
-    "Make a character from CHARSET and octets ARG1 and ARG2.
-This function is available for compatibility with Mule-enabled XEmacsen.
-When CHARSET is `ascii', return (int-char ARG1).  Otherwise, return
-that value with the high bit set.  ARG2 is always ignored."
-    (int-char (if (eq charset 'ascii)
-		  arg1
-		(logior arg1 #x80)))))
-
 ; alternate names (not obsolete)
 (if (not (fboundp 'mod)) (define-function 'mod '%))
 (define-function 'move-marker 'set-marker)
--- a/lwlib/ChangeLog	Mon Aug 13 11:22:24 2007 +0200
+++ b/lwlib/ChangeLog	Mon Aug 13 11:23:13 2007 +0200
@@ -1,3 +1,7 @@
+1999-06-22  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.17 is released
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.16 is released
--- a/man/ChangeLog	Mon Aug 13 11:22:24 2007 +0200
+++ b/man/ChangeLog	Mon Aug 13 11:23:13 2007 +0200
@@ -1,3 +1,7 @@
+1999-06-22  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.17 is released
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.16 is released
--- a/nt/ChangeLog	Mon Aug 13 11:22:24 2007 +0200
+++ b/nt/ChangeLog	Mon Aug 13 11:23:13 2007 +0200
@@ -1,3 +1,18 @@
+1999-06-22  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.17 is released
+
+1999-06-13  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+	* xemacs.mak (DOC_SRC8): Remove mule-coding.c.
+	(TEMACS_MULE_OBJS): Remove mule-coding.obj
+	(check): Implement according to src/Makefile.
+	(check-temacs): ditto.
+
+1999-06-05  Norbert Koch <n.koch@delta-ii.de>
+
+	* xemacs.mak (mule): remove dependencies from mule-coding.c
+	
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.16 is released
--- a/nt/xemacs.mak	Mon Aug 13 11:22:24 2007 +0200
+++ b/nt/xemacs.mak	Mon Aug 13 11:23:13 2007 +0200
@@ -650,8 +650,7 @@
 DOC_SRC8=\
  $(XEMACS)\src\mule.c \
  $(XEMACS)\src\mule-charset.c \
- $(XEMACS)\src\mule-ccl.c \
- $(XEMACS)\src\mule-coding.c
+ $(XEMACS)\src\mule-ccl.c
 ! if $(HAVE_X)
  DOC_SRC8=$(DOC_SRC8) $(XEMACS)\src\input-method-xlib.c
 ! endif
@@ -739,8 +738,7 @@
 TEMACS_MULE_OBJS=\
 	$(OUTDIR)\mule.obj \
 	$(OUTDIR)\mule-charset.obj \
-	$(OUTDIR)\mule-ccl.obj \
-	$(OUTDIR)\mule-coding.obj
+	$(OUTDIR)\mule-ccl.obj
 ! if $(HAVE_X)
 TEMACS_MULE_OBJS=\
 	$(TEMACS_MULE_OBJS) $(OUTDIR)\input-method-xlib.obj
@@ -890,6 +888,32 @@
 $(OUTDIR)\xemacs.res: xemacs.rc
 	rc -Fo$@ xemacs.rc
 
+# Section handling automated tests starts here
+
+SRCDIR=../src
+PROGNAME=xemacs
+blddir=$(MAKEDIR:\=\\)\\..
+temacs_loadup=temacs -batch -l $(SRCDIR)/../lisp/loadup.el
+dump_temacs   = $(temacs_loadup) dump
+run_temacs    = $(temacs_loadup) run-temacs
+## We have automated tests!!
+testdir=../tests/automated
+batch_test_emacs=-batch -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
+
+# .PHONY: check check-temacs
+
+check:
+	@cd $(SRCDIR)
+	$(PROGNAME) $(batch_test_emacs)
+
+check-temacs:
+	cd $(SRCDIR)
+	set EMACSBOOTSTRAPLOADPATH=$(LISP)
+	set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
+	$(run_temacs) $(batch_test_emacs)
+
+# Section handling automated tests ends here
+
 #------------------------------------------------------------------------------
 
 # LISP bits 'n bobs
--- a/src/ChangeLog	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 11:23:13 2007 +0200
@@ -1,3 +1,147 @@
+1999-06-22  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.17 is released
+
+1999-06-13  Oscar Figueiredo  <oscar@xemacs.org>
+
+	* config.h.in (HAVE_LDAP_SET_OPTION): New define
+	(HAVE_LDAP_GET_LDERRNO): Ditto
+	(HAVE_LDAP_RESULT2ERROR): Ditto
+	(HAVE_LDAP_PARSE_RESULT): Ditto
+	(HAVE_UMICH_LDAP): Removed
+	(HAVE_NS_LDAP): Removed
+
+	* eldap.h (struct Lisp_LDAP): Removed the `livep' member as  
+	suggested by Olivier Galibert
+	(CHECK_LIVE_LDAP): Test on `ld' instead of `livep'
+
+	* eldap.c: Take the removal of `livep' into account in all the
+	necessary functions
+	(signal_ldap_error): Take two additional parameters
+	Added new finer compilation conditions in order to use
+	ldap_parse_result or ldap_result2error if available
+	(Fldap_open): Conform to this new API
+	(Fldap_search_internal): Ditto
+
+1999-06-17  SL Baur  <steve@miho.m17n.org>
+
+	* data.c (struct int_or_double): Should use EMACS_INT not int.
+
+1999-06-16  Norbert Koch  <n.koch@eai-delta.de>
+
+	* redisplay-msw.c: Run 'ccl_driver' with 'CCL_MODE_ENCODING' as in 
+	redisplay-x.c
+
+1999-06-12  MORIOKA Tomohiko  <tomo@etl.go.jp>
+
+	* redisplay-x.c (separate_textual_runs): Run `ccl_driver' with
+	`CCL_MODE_ENCODING'.
+
+	* file-coding.c (mule_decode): Run `ccl_driver' with
+	`CCL_MODE_DECODING'.
+	(mule_encode): Run `ccl_driver' with `CCL_MODE_ENCODING'.
+
+	* mule-ccl.c (CCL_WRITE_CHAR): Refer `conversion_mode'.
+	(ccl_driver): Add new argument `conversion_mode'.
+	(Fccl_execute): Run `ccl_driver' with `CCL_MODE_ENCODING'.
+	(Fccl_execute_on_string): Likewise [perhaps it is better to add
+	new optional argument].
+
+	* mule-ccl.h (CCL_MODE_ENCODING): New macro.
+	(CCL_MODE_DECODING): New macro.
+	(ccl_driver): Add new argument `conversion_mode'.
+
+1999-06-15  SL Baur  <steve@miho.m17n.org>
+
+	* mule-charset.c (Fsplit_char): New subr.
+	(Fchar_octet): delete.
+	(syms_of_mule_charset): DEFSUBR it.
+
+1999-06-13  Andy Piper  <andy@xemacs.org>
+
+	* menubar.h: update declarations involving gui_items.
+
+	* lisp.h: declare Lisp_Gui_Item.
+
+	* glyphs.h (struct Lisp_Image_Instance): update type of gui_item.
+
+	* glyphs.c (mark_image_instance): modify for new lisp-based gui_items.
+	(print_image_instance): ditto.
+	(image_instance_equal): ditto.
+	(image_instance_hash): ditto.
+
+	* event-msw.c (mswindows_need_event): assert badly_p status.
+	(mswindows_wnd_proc): modify WM_NOTIFY handling to cope with
+ 	callbacks in tree-view and tab-control widgets.
+	(emacs_mswindows_next_event): modify use of
+ 	mswindows_dequeue_dispatch_event.
+
+	* dialog-msw.c (mswindows_popup_dialog_box): modify for new
+ 	lisp-based gui_items.
+
+	* glyphs-msw.c (mswindows_update_subwindow): update use of
+ 	gui_items.
+	(mswindows_register_gui_item): new function.
+	(mswindows_register_gui_item): fix to use lisp gui_items.
+	(mswindows_widget_instantiate): ditto.
+	(mswindows_button_instantiate): ditto.
+	(add_tree_item): new function to recursively add tree view
+ 	elements.
+	(add_tree_item_list): ditto.
+	(mswindows_tree_instantiate): new function. instantiate tree view
+ 	controls.
+	(add_tab_item): new function to add tabs to a tab control.
+	(mswindows_tab_instantiate): new function. instantiate tab
+ 	controls.
+	(image_instantiator_format_create_glyphs_mswindows): add tree view
+ 	and tab controls.
+	(vars_of_glyphs_mswindows): ditto.
+
+	* glyphs-widget.c (check_valid_item_list_1): allow nested lists in
+ 	item lists.
+	(check_valid_item_list): ditto.
+	(initialize_widget_image_instance): fix to use new lisp gui_item.
+	(widget_instantiate_1): allow the setting of default textwidth in
+ 	characters.
+	(widget_instantiate): change to use new widget_instantiate_1
+ 	signature.
+	(combo_instantiate): ditto.
+	(static_instantiate): ditto.
+	(tab_instantiate): new function for tab widgets.
+	(image_instantiator_format_create_glyphs_widget): add tab and tree
+ 	view widgets.
+
+	* menubar-msw.c (displayable_menu_item): convert to use lisp
+ 	gui_items.
+	(populate_menu_add_item): ditto.
+	(populate_or_checksum_helper): ditto.
+
+	* menubar.c (menu_parse_submenu_keywords): convert to use lisp
+ 	gui_items.
+	(Fmenu_find_real_submenu): ditto.
+
+	* gui.h (struct Lisp_Gui_Item): make gui_item a lisp oebjct.
+
+	* gui.c (gui_item_add_keyval_pair): gui_items are now lisp
+ 	objects, convert functions that use them accordingly.
+	(gui_item_init): ditto.
+	(gui_item_active_p): ditto.
+	(gui_item_selected_p): ditto.
+	(gui_item_included_p): ditto.
+	(gui_item_display_flush_left): ditto.
+	(gui_item_display_flush_right): ditto.
+	(mark_gui_item): ditto.
+	(allocate_gui_item): new function to create a gui_item.
+	(make_gui_item_from_keywords_internal): ditto. create and return a
+ 	gui_item as well as setting keywords.
+	(gui_parse_item_keywords): ditto.
+	(gui_parse_item_keywords_no_errors): ditto.
+	(gui_add_item_keywords_to_plist): new function, not yet used.
+	(gui_item_hash): new function.
+	(gui_item_id_hash): use gui_item_hash.
+	(gui_item_equal): new function.
+	(print_gui_item): new function.
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.16 is released
@@ -27,12 +171,6 @@
 
 	* file-coding.h (Qraw_text): New variable.
 
-1999-05-20  MORIOKA Tomohiko  <tomo@etl.go.jp>
-
-	* mule-charset.c (complex_vars_of_mule_charset): Registry of
-	japanese-jisx0208-1978 should not match with "jisx0208.1983" nor
-	"jisc6226.1983".
-
 1999-06-08  SL Baur  <steve@xemacs.org>
 
 	* s/decosf4-0.h: Explicitly #undef SYSTEM_MALLOC.
--- a/src/config.h.in	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/config.h.in	Mon Aug 13 11:23:13 2007 +0200
@@ -357,10 +357,14 @@
 
 /* Do we have LDAP support? */
 #undef HAVE_LDAP
-/* Do we have the LDAP library of the University of Michigan ? */
-#undef HAVE_UMICH_LDAP
-/* Do we have Netscape LDAP SDK library */
-#undef HAVE_NS_LDAP
+/* Does the library define ldap_set_option () ? */
+#undef HAVE_LDAP_SET_OPTION
+/* Does the library define ldap_get_lderrno () ? */
+#undef HAVE_LDAP_GET_LDERRNO
+/* Does the library define ldap_result2error () ? */
+#undef HAVE_LDAP_RESULT2ERROR
+/* Does the library define ldap_parse_result () ? */
+#undef HAVE_LDAP_PARSE_RESULT
 
 /* Do you have the Xauth library present?  This will add some extra
    functionality to gnuserv. */
--- a/src/data.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/data.c	Mon Aug 13 11:23:13 2007 +0200
@@ -799,7 +799,7 @@
   int int_p;
   union
   {
-    int ival;
+    EMACS_INT ival;
     double dval;
   } c;
 } int_or_double;
--- a/src/dialog-msw.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/dialog-msw.c	Mon Aug 13 11:23:13 2007 +0200
@@ -110,12 +110,6 @@
 
 #define ID_ITEM_BIAS 32
 
-typedef struct gui_item struct_gui_item;
-typedef struct
-{
-  Dynarr_declare (struct gui_item);
-} struct_gui_item_dynarr;
-
 /* Dialog procedure */
 static BOOL CALLBACK 
 dialog_proc (HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param)
@@ -200,7 +194,7 @@
 static void
 mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc)
 {
-  struct_gui_item_dynarr *dialog_items = Dynarr_new (struct_gui_item);
+  Lisp_Object_dynarr *dialog_items = Dynarr_new (Lisp_Object);
   unsigned_char_dynarr *template = Dynarr_new (unsigned_char);
   unsigned int button_row_width = 0;
   unsigned int text_width, text_height;
@@ -223,11 +217,10 @@
       {
 	if (!NILP (XCAR (item_cons)))
 	  {
-	    struct gui_item gitem;
-	    gui_item_init (&gitem);
-	    gui_parse_item_keywords (XCAR (item_cons), &gitem);
+	    Lisp_Object gitem = gui_parse_item_keywords (XCAR (item_cons));
 	    Dynarr_add (dialog_items, gitem);
-	    button_row_width += button_width (gitem.name) + X_BUTTON_MARGIN;
+	    button_row_width += button_width (XGUI_ITEM (gitem)->name) 
+	      + X_BUTTON_MARGIN;
 	  }
       }
     if (Dynarr_length (dialog_items) == 0)
@@ -350,10 +343,11 @@
 
     for (i = 0; i < Dynarr_length (dialog_items); ++i)
       {
-	struct gui_item *pgui_item = Dynarr_atp (dialog_items, i);
+	Lisp_Object* gui_item = Dynarr_atp (dialog_items, i);
+	struct Lisp_Gui_Item *pgui_item = XGUI_ITEM (*gui_item);
 
 	item_tem.style = (WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON
-			  | (gui_item_active_p (pgui_item) ? 0 : WS_DISABLED));
+			  | (gui_item_active_p (*gui_item) ? 0 : WS_DISABLED));
 	item_tem.cx = button_width (pgui_item->name);
 	/* Item ids are indices into dialog_items plus offset, to avoid having
            items by reserved ids (IDOK, IDCANCEL) */
@@ -390,7 +384,7 @@
     vector = make_vector (Dynarr_length (dialog_items), Qunbound);
     dialog_data = Fcons (frame, vector);
     for (i = 0; i < Dynarr_length (dialog_items); i++)
-      XVECTOR_DATA (vector) [i] = Dynarr_atp (dialog_items, i)->callback;
+      XVECTOR_DATA (vector) [i] = XGUI_ITEM (*Dynarr_atp (dialog_items, i))->callback;
 
     /* Woof! Everything is ready. Pop pop pop in now! */
     if (!CreateDialogIndirectParam (NULL,
--- a/src/eldap.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/eldap.c	Mon Aug 13 11:23:13 2007 +0200
@@ -26,8 +26,8 @@
    conforming to the API defined in RFC 1823.
    It has been tested with:
    - UMich LDAP 3.3 (http://www.umich.edu/~dirsvcs/ldap/)
-   - OpenLDAP 1.0.3 (http://www.openldap.org/)
-   - Netscape's LDAP SDK 1.0 (http://developer.netscape.com/) */
+   - OpenLDAP 1.2 (http://www.openldap.org/)
+   - Netscape's LDAP SDK (http://developer.netscape.com/) */
 
 
 #include <config.h>
@@ -40,14 +40,6 @@
 
 #include "eldap.h"
 
-#ifdef HAVE_NS_LDAP
-# define HAVE_LDAP_SET_OPTION 1
-# define HAVE_LDAP_GET_ERRNO 1
-#else
-# undef HAVE_LDAP_SET_OPTION
-# undef HAVE_LDAP_GET_ERRNO
-#endif
-
 static int ldap_default_port;
 static Lisp_Object Vldap_default_base;
 
@@ -69,16 +61,27 @@
 /************************************************************************/
 
 static void
-signal_ldap_error (LDAP *ld)
+signal_ldap_error (LDAP *ld, LDAPMessage *res, int ldap_err)
 {
-#ifdef HAVE_LDAP_GET_ERRNO
-  signal_simple_error
-    ("LDAP error",
-     build_string (ldap_err2string (ldap_get_lderrno (ld, NULL, NULL))));
+  if (ldap_err <= 0)
+    {
+#if defined HAVE_LDAP_PARSE_RESULT
+      int err;
+      ldap_err = ldap_parse_result (ld, res,
+                                    &err,
+                                    NULL, NULL, NULL, NULL, 0);
+      if (ldap_err == LDAP_SUCCESS)
+        ldap_err = err;
+#elif defined HAVE_LDAP_GET_LDERRNO
+      ldap_err = ldap_get_lderrno (ld, NULL, NULL);
+#elif defined HAVE_LDAP_RESULT2ERROR
+      ldap_err = ldap_result2error (ld, res, 0);
 #else
+      ldap_err = ld->ld_errno;
+#endif
+    }
   signal_simple_error ("LDAP error",
-                       build_string (ldap_err2string (ld->ld_errno)));
-#endif
+                       build_string (ldap_err2string (ldap_err)));
 }
 
 
@@ -113,7 +116,7 @@
 
   write_c_string ("#<ldap ", printcharfun);
   print_internal (ldap->host, printcharfun, 1);
-  if (!ldap->livep)
+  if (!ldap->ld)
     write_c_string ("(dead) ",printcharfun);
   sprintf (buf, " 0x%x>", (unsigned int)ldap);
   write_c_string (buf, printcharfun);
@@ -127,7 +130,6 @@
 
   ldap->ld = NULL;
   ldap->host = Qnil;
-  ldap->livep = 0;
   return ldap;
 }
 
@@ -140,8 +142,9 @@
     signal_simple_error ("Can't dump an emacs containing LDAP objects",
 			 make_ldap (ldap));
 
-  if (ldap->livep)
+  if (ldap->ld)
     ldap_unbind (ldap->ld);
+  ldap->ld = NULL;
 }
 
 DEFINE_LRECORD_IMPLEMENTATION ("ldap", ldap,
@@ -178,7 +181,7 @@
        (ldap))
 {
   CHECK_LDAP (ldap);
-  return (XLDAP (ldap))->livep ? Qt : Qnil;
+  return (XLDAP (ldap))->ld ? Qt : Qnil;
 }
 
 /************************************************************************/
@@ -299,16 +302,18 @@
 
 
 #ifdef HAVE_LDAP_SET_OPTION
-  if (ldap_set_option (ld, LDAP_OPT_DEREF, (void *)&ldap_deref) != LDAP_SUCCESS)
-    signal_ldap_error (ld);
-  if (ldap_set_option (ld, LDAP_OPT_TIMELIMIT,
-                       (void *)&ldap_timelimit) != LDAP_SUCCESS)
-    signal_ldap_error (ld);
-  if (ldap_set_option (ld, LDAP_OPT_SIZELIMIT,
-                       (void *)&ldap_sizelimit) != LDAP_SUCCESS)
-    signal_ldap_error (ld);
-  if (ldap_set_option (ld, LDAP_OPT_REFERRALS, LDAP_OPT_ON) != LDAP_SUCCESS)
-    signal_ldap_error (ld);
+  if ((err = ldap_set_option (ld, LDAP_OPT_DEREF,
+                              (void *)&ldap_deref)) != LDAP_SUCCESS)
+    signal_ldap_error (ld, NULL, err);
+  if ((err = ldap_set_option (ld, LDAP_OPT_TIMELIMIT,
+                              (void *)&ldap_timelimit)) != LDAP_SUCCESS)
+    signal_ldap_error (ld, NULL, err);
+  if ((err = ldap_set_option (ld, LDAP_OPT_SIZELIMIT,
+                              (void *)&ldap_sizelimit)) != LDAP_SUCCESS)
+    signal_ldap_error (ld, NULL, err);
+  if ((err = ldap_set_option (ld, LDAP_OPT_REFERRALS,
+                              LDAP_OPT_ON)) != LDAP_SUCCESS)
+    signal_ldap_error (ld, NULL, err);
 #else  /* not HAVE_LDAP_SET_OPTION */
   ld->ld_deref = ldap_deref;
   ld->ld_timelimit = ldap_timelimit;
@@ -331,7 +336,6 @@
   ldap = allocate_ldap ();
   ldap->ld = ld;
   ldap->host = host;
-  ldap->livep = 1;
 
   return make_ldap (ldap);
 }
@@ -347,7 +351,7 @@
   CHECK_LIVE_LDAP (ldap);
   lldap = XLDAP (ldap);
   ldap_unbind (lldap->ld);
-  lldap->livep = 0;
+  lldap->ld = NULL;
   return Qnil;
 }
 
@@ -401,7 +405,7 @@
   LDAPMessage *e;
   BerElement *ptr;
   char *a, *dn;
-  int i, rc;
+  int i, rc, rc2;
   int  matches;
   struct ldap_unwind_struct unwind;
 
@@ -476,9 +480,9 @@
                    NILP (filter) ? "" : (char *) XSTRING_DATA (filter),
                    ldap_attributes,
                    NILP (attrsonly) ? 0 : 1)
-       == -1)
+      == -1)
     {
-      signal_ldap_error (ld);
+      signal_ldap_error (ld, NULL, 0);
     }
 
   /* Ensure we don't exit without cleaning up */
@@ -508,9 +512,7 @@
         {
           dn = ldap_get_dn (ld, e);
           if (dn == NULL)
-            {
-              signal_ldap_error (ld);
-            }
+            signal_ldap_error (ld, e, 0);
           entry = Fcons (build_ext_string (dn, FORMAT_OS), Qnil);
         }
       for (a= ldap_first_attribute (ld, e, &ptr);
@@ -545,15 +547,22 @@
     }
 
   if (rc == -1)
-    {
-      signal_ldap_error (ld);
-    }
+    signal_ldap_error (ld, unwind.res, 0);
+
+  if (rc == 0)
+    signal_ldap_error (ld, NULL, LDAP_TIMELIMIT_EXCEEDED);
+
+#if defined HAVE_LDAP_PARSE_RESULT
+  rc2 = ldap_parse_result (ld, unwind.res,
+                           &rc,
+                           NULL, NULL, NULL, NULL, 0);
+  if (rc2 != LDAP_SUCCESS)
+    rc = rc2;
+#elif defined HAVE_LDAP_RESULT2ERROR
   rc = ldap_result2error (ld, unwind.res, 0);
-  if ((rc != LDAP_SUCCESS) &&
-      (rc != LDAP_SIZELIMIT_EXCEEDED))
-    {
-      signal_ldap_error (ld);
-    }
+#endif
+  if ((rc != LDAP_SUCCESS) && (rc != LDAP_SIZELIMIT_EXCEEDED))
+    signal_ldap_error (ld, NULL, rc);
 
   ldap_msgfree (unwind.res);
   unwind.res = (LDAPMessage *)NULL;
--- a/src/eldap.h	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/eldap.h	Mon Aug 13 11:23:13 2007 +0200
@@ -37,8 +37,6 @@
   LDAP *ld;
   /* Name of the host we connected to */
   Lisp_Object host;
-  /* Status of the LDAP connection.  */
-  int livep;
 };
 
 
@@ -52,7 +50,7 @@
 
 #define CHECK_LIVE_LDAP(ldap) do {					\
   CHECK_LDAP (ldap);							\
-  if (!XLDAP (ldap)->livep)						\
+  if (!XLDAP (ldap)->ld)						\
     signal_simple_error ("Attempting to access closed LDAP connection",	\
                          ldap);						\
 } while (0)
--- a/src/event-msw.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/event-msw.c	Mon Aug 13 11:23:13 2007 +0200
@@ -1327,6 +1327,7 @@
       
       if (active == 0)
 	{
+	  assert (!badly_p);
 	  return;		/* timeout */
 	}
       else if (active > 0)
@@ -1925,17 +1926,21 @@
 				       Qcancel_mode_internal, Qnil);
     break;
 
-#ifdef HAVE_TOOLBARS
   case WM_NOTIFY:
     {
-      LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam;
-      Lisp_Object btext;
-      if (tttext->hdr.code ==  TTN_NEEDTEXT)    
+      LPNMHDR nmhdr = (LPNMHDR)lParam;
+      int idCtrl = (int)wParam;
+
+      if (nmhdr->code ==  TTN_NEEDTEXT)
 	{
+#ifdef HAVE_TOOLBARS
+	  LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam;
+	  Lisp_Object btext;
+
 	  /* find out which toolbar */
 	  frame = XFRAME (mswindows_find_frame (hwnd));
 	  btext = mswindows_get_toolbar_button_text ( frame, 
-						      tttext->hdr.idFrom );
+						      nmhdr->idFrom );
 	  
 	  tttext->lpszText = NULL;
 	  tttext->hinst = NULL;
@@ -1947,13 +1952,28 @@
 	      GET_C_STRING_EXT_DATA_ALLOCA (btext, FORMAT_OS, 
 					    tttext->lpszText);
 	    }
-#if 0
-	  tttext->uFlags |= TTF_DI_SETITEM;
 #endif
-	}    
+	}
+      /* handle tree view callbacks */
+      else if (nmhdr->code == TVN_SELCHANGED)
+	{
+	  NM_TREEVIEW* ptree = (NM_TREEVIEW*)lParam;
+	  frame = XFRAME (mswindows_find_frame (hwnd));
+	  mswindows_handle_gui_wm_command (frame, 0, ptree->itemNew.lParam);
+	}
+      /* handle tab control callbacks */
+      else if (nmhdr->code == TCN_SELCHANGE)
+	{
+	  TC_ITEM item;
+	  int index = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0);
+	  frame = XFRAME (mswindows_find_frame (hwnd));
+	  SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)index,
+		       (LPARAM)&item);
+	  
+	  mswindows_handle_gui_wm_command (frame, 0, item.lParam);
+	}
     }
     break;
-#endif
     
   case WM_PAINT:
     {
@@ -2552,7 +2572,7 @@
 
   mswindows_need_event (1);
 
-  event = mswindows_dequeue_dispatch_event (!NILP(mswindows_u_dispatch_event_queue));
+  event = mswindows_dequeue_dispatch_event ();
   XSETEVENT (event2, emacs_event);
   Fcopy_event (event, event2);
   Fdeallocate_event (event);
--- a/src/file-coding.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/file-coding.c	Mon Aug 13 11:23:13 2007 +0200
@@ -2116,7 +2116,7 @@
       decode_coding_utf8 (decoding, src, dst, n);
       break;
     case CODESYS_CCL:
-      ccl_driver (&str->ccl, src, dst, n, 0);
+      ccl_driver (&str->ccl, src, dst, n, 0, CCL_MODE_DECODING);
       break;
     case CODESYS_ISO2022:
       decode_coding_iso2022 (decoding, src, dst, n);
@@ -2528,7 +2528,7 @@
       encode_coding_utf8 (encoding, src, dst, n);
       break;
     case CODESYS_CCL:
-      ccl_driver (&str->ccl, src, dst, n, 0);
+      ccl_driver (&str->ccl, src, dst, n, 0, CCL_MODE_ENCODING);
       break;
     case CODESYS_ISO2022:
       encode_coding_iso2022 (encoding, src, dst, n);
--- a/src/glyphs-msw.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/glyphs-msw.c	Mon Aug 13 11:23:13 2007 +0200
@@ -71,6 +71,8 @@
 DEFINE_DEVICE_IIFORMAT (mswindows, scrollbar);
 DEFINE_DEVICE_IIFORMAT (mswindows, combo);
 DEFINE_DEVICE_IIFORMAT (mswindows, progress);
+DEFINE_DEVICE_IIFORMAT (mswindows, tree);
+DEFINE_DEVICE_IIFORMAT (mswindows, tab);
 
 DEFINE_IMAGE_INSTANTIATOR_FORMAT (bmp);
 Lisp_Object Qbmp;
@@ -282,7 +284,7 @@
   struct device *d = XDEVICE (device);
   struct frame *f;
   void* bmp_buf=0;
-  int type;
+  int type = 0;
   HBITMAP bitmap;
   HDC hdc;
 
@@ -2041,7 +2043,7 @@
       /* buttons checked or otherwise */
       if ( EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qbutton))
 	{
-	  if (gui_item_selected_p (&IMAGE_INSTANCE_WIDGET_ITEM (p)))
+	  if (gui_item_selected_p (IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (p)))
 	    SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), 
 			 BM_SETCHECK, (WPARAM)BST_CHECKED, 0); 
 	  else
@@ -2055,19 +2057,26 @@
    callbacks. The hashtable is weak so deregistration is handled
    automatically */
 static int
-mswindows_register_widget_instance (Lisp_Object instance, Lisp_Object domain)
+mswindows_register_gui_item (Lisp_Object gui, Lisp_Object domain)
 {
   Lisp_Object frame = FW_FRAME (domain);
   struct frame* f = XFRAME (frame);
-  int id = gui_item_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f),
-			  &XIMAGE_INSTANCE_WIDGET_ITEM (instance),
-			  WIDGET_GLYPH_SLOT);
+  int id = gui_item_id_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f),
+			     gui,
+			     WIDGET_GLYPH_SLOT);
   Fputhash (make_int (id),
-	    XIMAGE_INSTANCE_WIDGET_CALLBACK (instance),
+	    XGUI_ITEM (gui)->callback,
 	    FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f));
   return id;
 }
 
+static int
+mswindows_register_widget_instance (Lisp_Object instance, Lisp_Object domain)
+{
+  return mswindows_register_gui_item (XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM (instance),
+				      domain);
+}
+
 static void
 mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 				 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -2164,7 +2173,6 @@
 /************************************************************************/
 /*                            widgets                            */
 /************************************************************************/
-
 static void
 mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 			      Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -2182,7 +2190,8 @@
   Extbyte* nm=0;
   HWND wnd;
   int id = 0xffff;
-  struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii);
+  Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
+  struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
 
   if (!DEVICE_MSWINDOWS_P (d))
     signal_simple_error ("Not an mswindows device", device);
@@ -2197,7 +2206,7 @@
       groupii = XIMAGE_INSTANCE (group);
     }
 #endif
-  if (!gui_item_active_p (pgui))
+  if (!gui_item_active_p (gui))
     flags |= WS_DISABLED;
 
   style = pgui->style;
@@ -2256,10 +2265,11 @@
   HWND wnd;
   int flags = BS_NOTIFY;
   Lisp_Object style;
-  struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii);
+  Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
+  struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
 
-  if (!gui_item_active_p (pgui))
+  if (!gui_item_active_p (gui))
     flags |= WS_DISABLED;
 
   if (!NILP (glyph))
@@ -2291,7 +2301,7 @@
 
   wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* set the checked state */
-  if (gui_item_selected_p (pgui))
+  if (gui_item_selected_p (gui))
     SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_CHECKED, 0); 
   else
     SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
@@ -2320,7 +2330,7 @@
 				WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT);
 }
 
-/* instantiate an edit control */
+/* instantiate a progress gauge */
 static void
 mswindows_progress_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 				Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -2352,6 +2362,178 @@
 #endif
 }
 
+/* instantiate a tree view widget */
+static HTREEITEM add_tree_item (Lisp_Object image_instance,
+				HWND wnd, HTREEITEM parent, Lisp_Object entry,
+				int children, Lisp_Object domain)
+{
+  TV_INSERTSTRUCT tvitem;
+  HTREEITEM ret;
+
+  tvitem.hParent = parent;
+  tvitem.hInsertAfter = TVI_LAST;
+  tvitem.item.mask = TVIF_TEXT | TVIF_CHILDREN;
+  tvitem.item.cChildren = children;
+      
+  if (VECTORP (entry))
+    {
+      /* we always maintain the real gui item at the head of the
+         list. We have to put them in the list in the first place
+         because the whole model assumes that the glyph instances have
+         references to all the associated data. If we didn't do this
+         GC would bite us badly. */
+      Lisp_Object gui = gui_parse_item_keywords_no_errors (entry);
+      if (CONSP (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance)))
+	{
+	  Lisp_Object rest = 
+	    Fcons (gui, XCDR (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance)));
+	  Fsetcdr (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), rest);
+	}
+      else
+	{
+	  XIMAGE_INSTANCE_WIDGET_ITEM (image_instance) = 
+	    Fcons (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), gui);
+	}
+
+      tvitem.item.lParam = mswindows_register_gui_item (gui, domain);
+      tvitem.item.mask |= TVIF_PARAM;
+      GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (gui)->name, 
+				   tvitem.item.pszText);
+    }
+  else
+    GET_C_STRING_OS_DATA_ALLOCA (entry, tvitem.item.pszText);
+
+  tvitem.item.cchTextMax = strlen (tvitem.item.pszText);
+
+  if ((ret = (HTREEITEM)SendMessage (wnd, TVM_INSERTITEM, 
+				     0, (LPARAM)&tvitem)) == 0)
+    signal_simple_error ("error adding tree view entry", entry);
+
+  return ret;
+}
+
+static void add_tree_item_list (Lisp_Object image_instance,
+				HWND wnd, HTREEITEM parent, Lisp_Object list,
+				Lisp_Object domain)
+{
+  Lisp_Object rest;
+
+  /* get the first item */
+  parent = add_tree_item (image_instance, wnd, parent, XCAR (list), TRUE, domain);
+  /* recursively add items to the tree view */
+  LIST_LOOP (rest, XCDR (list))
+    {
+      if (LISTP (XCAR (rest)))
+	add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain);
+      else
+	add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE, domain);
+    }
+}
+
+static void
+mswindows_tree_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+			    Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+			    int dest_mask, Lisp_Object domain)
+{
+  Lisp_Object rest;
+  HWND wnd;
+  HTREEITEM parent;
+  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
+				pointer_bg, dest_mask, domain, WC_TREEVIEW, 
+				WS_TABSTOP | WS_BORDER | PBS_SMOOTH
+				| TVS_HASLINES | TVS_HASBUTTONS,
+				WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT);
+
+  wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
+ 
+  /* define a root */
+  parent = add_tree_item (image_instance,
+			  wnd, NULL, IMAGE_INSTANCE_WIDGET_TEXT (ii), TRUE,
+			  domain);
+ 
+  /* recursively add items to the tree view */
+  LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil))
+    {
+      if (LISTP (XCAR (rest)))
+	add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain);
+      else
+	add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE, domain);
+    }
+}
+
+/* instantiate a tab control */
+static TC_ITEM* add_tab_item (Lisp_Object image_instance,
+			     HWND wnd, Lisp_Object entry,
+			     Lisp_Object domain, int index)
+{
+  TC_ITEM tvitem, *ret;
+
+  tvitem.mask = TCIF_TEXT;
+      
+  if (VECTORP (entry))
+    {
+      /* we always maintain the real gui item at the head of the
+         list. We have to put them in the list in the first place
+         because the whole model assumes that the glyph instances have
+         references to all the associated data. If we didn't do this
+         GC would bite us badly. */
+      Lisp_Object gui = gui_parse_item_keywords_no_errors (entry);
+      if (CONSP (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance)))
+	{
+	  Lisp_Object rest = 
+	    Fcons (gui, XCDR (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance)));
+	  Fsetcdr (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), rest);
+	}
+      else
+	{
+	  XIMAGE_INSTANCE_WIDGET_ITEM (image_instance) = 
+	    Fcons (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), gui);
+	}
+
+      tvitem.lParam = mswindows_register_gui_item (gui, domain);
+      tvitem.mask |= TCIF_PARAM;
+      GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (gui)->name, 
+				   tvitem.pszText);
+    }
+  else
+    GET_C_STRING_OS_DATA_ALLOCA (entry, tvitem.pszText);
+
+  tvitem.cchTextMax = strlen (tvitem.pszText);
+
+  if ((ret = (TC_ITEM*)SendMessage (wnd, TCM_INSERTITEM, 
+				    index, (LPARAM)&tvitem)) < 0)
+    signal_simple_error ("error adding tab entry", entry);
+
+  return ret;
+}
+
+static void
+mswindows_tab_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+			   Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+			   int dest_mask, Lisp_Object domain)
+{
+  Lisp_Object rest;
+  HWND wnd;
+  HTREEITEM parent;
+  int index = 0;
+  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
+				pointer_bg, dest_mask, domain, WC_TABCONTROL, 
+				/* borders don't suit tabs so well */
+				WS_TABSTOP,
+				WS_EX_CONTROLPARENT);
+
+  wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
+ 
+  /* add items to the tab */
+  LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil))
+    {
+      add_tab_item (image_instance, wnd, XCAR (rest), domain, index);
+      index++;
+    }
+}
+
 /* instantiate a static control possible for putting other things in */
 static void
 mswindows_label_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
@@ -2558,6 +2740,7 @@
   INITIALIZE_DEVICE_IIFORMAT (mswindows, xface);
   IIFORMAT_HAS_DEVMETHOD (mswindows, xface, instantiate);
 #endif
+  /* button widget */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, button);
   IIFORMAT_HAS_DEVMETHOD (mswindows, button, property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, button, instantiate);
@@ -2575,22 +2758,35 @@
   INITIALIZE_DEVICE_IIFORMAT (mswindows, group);
   IIFORMAT_HAS_DEVMETHOD (mswindows, group, instantiate);
 #endif
+  /* label */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, label);
   IIFORMAT_HAS_DEVMETHOD (mswindows, label, instantiate);
 
+  /* combo box */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, combo);
   IIFORMAT_HAS_DEVMETHOD (mswindows, combo, property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, combo, instantiate);
 
+  /* scrollbar */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, scrollbar);
   IIFORMAT_HAS_DEVMETHOD (mswindows, scrollbar, instantiate);
 
+  /* progress gauge */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, progress);
   IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, progress, instantiate);
 
+  /* tree view widget */
+  INITIALIZE_DEVICE_IIFORMAT (mswindows, tree);
+  /*  IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);*/
+  IIFORMAT_HAS_DEVMETHOD (mswindows, tree, instantiate);
+
+  /* tab control widget */
+  INITIALIZE_DEVICE_IIFORMAT (mswindows, tab);
+  IIFORMAT_HAS_DEVMETHOD (mswindows, tab, instantiate);
+
+  /* windows bitmap format */
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp");
-
   IIFORMAT_HAS_METHOD (bmp, validate);
   IIFORMAT_HAS_METHOD (bmp, normalize);
   IIFORMAT_HAS_METHOD (bmp, possible_dest_types);
@@ -2599,6 +2795,7 @@
   IIFORMAT_VALID_KEYWORD (bmp, Q_data, check_valid_string);
   IIFORMAT_VALID_KEYWORD (bmp, Q_file, check_valid_string);
 
+  /* mswindows resources */
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (mswindows_resource,
 					"mswindows-resource");
 
@@ -2630,6 +2827,8 @@
   Fprovide (Qscrollbar);
   Fprovide (Qlabel);
   Fprovide (Qprogress);
+  Fprovide (Qtree);
+  Fprovide (Qtab);
 }
 
 void
--- a/src/glyphs-widget.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/glyphs-widget.c	Mon Aug 13 11:23:13 2007 +0200
@@ -53,6 +53,10 @@
 Lisp_Object Qlabel;
 DEFINE_IMAGE_INSTANTIATOR_FORMAT (progress);
 Lisp_Object Qprogress;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (tree);
+Lisp_Object Qtree;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (tab);
+Lisp_Object Qtab;
 
 Lisp_Object Q_descriptor, Q_height, Q_width, Q_properties, Q_items;
 Lisp_Object Q_image, Q_text, Q_percent;
@@ -146,21 +150,35 @@
 }
 
 static void
-check_valid_item_list (Lisp_Object data)
+check_valid_item_list_1 (Lisp_Object items)
 {
   Lisp_Object rest;
-  Lisp_Object items;
-  Fcheck_valid_plist (data);
-  
-  items = Fplist_get (data, Q_items, Qnil);
 
   CHECK_LIST (items);
   EXTERNAL_LIST_LOOP (rest, items)
     {
-      CHECK_STRING (XCAR (rest));
+      if (STRINGP (XCAR (rest)))
+	CHECK_STRING (XCAR (rest));
+      else if (VECTORP (XCAR (rest)))
+	gui_parse_item_keywords (XCAR (rest));
+      else if (LISTP (XCAR (rest)))
+	check_valid_item_list_1 (XCAR (rest));
+      else
+	signal_simple_error ("Items must be vectors, lists or strings", items);
     }
 }
 
+static void
+check_valid_item_list (Lisp_Object data)
+{
+  Lisp_Object items;
+
+  Fcheck_valid_plist (data);
+  items = Fplist_get (data, Q_items, Qnil);
+
+  check_valid_item_list_1 (items);
+}
+
 /* wire widget property invocations to specific widgets ...  The
  problem we are solving here is that when instantiators get converted
  to instances they lose some type information (they just become
@@ -235,15 +253,15 @@
 widget_validate (Lisp_Object instantiator)
 {
   Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor);
-  struct gui_item gui;
+
   if (NILP (desc))
     signal_simple_error ("Must supply :descriptor", instantiator);
 
   if (VECTORP (desc))
-      gui_parse_item_keywords (desc, &gui);
+    gui_parse_item_keywords (desc);
 
   if (!NILP (find_keyword_in_vector (instantiator, Q_width))
-	     && !NILP (find_keyword_in_vector (instantiator, Q_pixel_width)))
+      && !NILP (find_keyword_in_vector (instantiator, Q_pixel_width)))
     signal_simple_error ("Must supply only one of :width and :pixel-width", instantiator);
 
   if (!NILP (find_keyword_in_vector (instantiator, Q_height))
@@ -300,23 +318,22 @@
   IMAGE_INSTANCE_WIDGET_TYPE (ii) = type;
   IMAGE_INSTANCE_WIDGET_PROPS (ii) = Qnil;
   IMAGE_INSTANCE_WIDGET_FACE (ii) = Vwidget_face;
-  gui_item_init (&IMAGE_INSTANCE_WIDGET_ITEM (ii));
+  IMAGE_INSTANCE_WIDGET_ITEM (ii) = allocate_gui_item ();
 }
 
 /* Instantiate a button widget. Unfortunately instantiated widgets are
    particular to a frame since they need to have a parent. It's not
    like images where you just select the image into the context you
-   want to display it in and BitBlt it. So images instances can have a
+   want to display it in and BitBlt it. So image instances can have a
    many-to-one relationship with things you see, whereas widgets can
    only be one-to-one (i.e. per frame) */
 static void
 widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
 		      Lisp_Object pointer_fg, Lisp_Object pointer_bg,
 		      int dest_mask, Lisp_Object domain, int default_textheight,
-		      int default_pixheight)
+		      int default_pixheight, int default_textwidth)
 {
   struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-  struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii);
   Lisp_Object face = find_keyword_in_vector (instantiator, Q_face);
   Lisp_Object height = find_keyword_in_vector (instantiator, Q_height);
   Lisp_Object width = find_keyword_in_vector (instantiator, Q_width);
@@ -349,11 +366,13 @@
   if (STRINGP (desc) || NILP (desc))
     {
       /* big cheat - we rely on the fact that a gui item looks like an instantiator */
-      gui_parse_item_keywords_no_errors (instantiator, pgui);
+      IMAGE_INSTANCE_WIDGET_ITEM (ii) = 
+	gui_parse_item_keywords_no_errors (instantiator);
       IMAGE_INSTANCE_WIDGET_TEXT (ii) = desc;
     }
   else
-    gui_parse_item_keywords_no_errors (desc, pgui);
+    IMAGE_INSTANCE_WIDGET_ITEM (ii) =
+      gui_parse_item_keywords_no_errors (desc);
 
   /* normalize size information */
   if (!NILP (width))
@@ -377,8 +396,14 @@
     }
 
   /* if we still don' t have sizes, guess from text size */
-  if (!tw && !pw && !NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
-    tw = XSTRING_LENGTH (IMAGE_INSTANCE_WIDGET_TEXT (ii));
+  if (!tw && !pw)
+    {
+      if (default_textwidth)
+	tw = default_textwidth;
+      else if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
+	tw = XSTRING_LENGTH (IMAGE_INSTANCE_WIDGET_TEXT (ii));
+    }
+
   if (!th && !ph)
     {
       if (default_textheight)
@@ -404,9 +429,10 @@
 		    int dest_mask, Lisp_Object domain)
 {
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
-			       pointer_bg, dest_mask, domain, 1, 0);
+			       pointer_bg, dest_mask, domain, 1, 0, 0);
 }
 
+/* combo-box generic instantiation - get he heigh right */
 static void
 combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 		   Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -417,7 +443,33 @@
   int len;
   GET_LIST_LENGTH (data, len);
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
-			pointer_bg, dest_mask, domain, len + 1, 0);
+			pointer_bg, dest_mask, domain, len + 1, 0, 0);
+}
+
+static void
+tab_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+		 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+		 int dest_mask, Lisp_Object domain)
+{
+  Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties),
+				 Q_items, Qnil);
+  Lisp_Object rest;
+  int len = 0;
+
+  LIST_LOOP (rest, data)
+    {
+      len += 3;			/* some bias */
+      if (STRINGP (XCAR (rest)))
+	len += XSTRING_LENGTH (XCAR (rest));
+      else if (VECTORP (XCAR (rest)))
+	{
+	  Lisp_Object gui = gui_parse_item_keywords (XCAR (rest));
+	  len += XSTRING_LENGTH (XGUI_ITEM (gui)->name);
+	}
+    }
+
+  widget_instantiate_1 (image_instance, instantiator, pointer_fg,
+			pointer_bg, dest_mask, domain, 0, 0, len);
 }
 
 /* Instantiate a static control */
@@ -427,7 +479,7 @@
 		    int dest_mask, Lisp_Object domain)
 {
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
-			pointer_bg, dest_mask, domain, 0, 4);
+			pointer_bg, dest_mask, domain, 0, 4, 0);
 }
 
 
@@ -445,7 +497,7 @@
   defkeyword (&Q_items, ":items");
   defkeyword (&Q_image, ":image");
   defkeyword (&Q_percent, ":percent");
-  defkeyword (&Q_text, "text");
+  defkeyword (&Q_text, ":text");
 }
 
 void
@@ -524,10 +576,28 @@
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress, "progress");
   IIFORMAT_HAS_SHARED_METHOD (progress, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress, possible_dest_types, widget);
-  IIFORMAT_HAS_SHARED_METHOD (progress, instantiate, widget);
+  IIFORMAT_HAS_SHARED_METHOD (progress, instantiate, combo);
   VALID_WIDGET_KEYWORDS (progress);
   VALID_GUI_KEYWORDS (progress);
 
+  /* tree view */
+  INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tree, "tree");
+  IIFORMAT_HAS_SHARED_METHOD (tree, validate, combo);
+  IIFORMAT_HAS_SHARED_METHOD (tree, possible_dest_types, widget);
+  IIFORMAT_HAS_SHARED_METHOD (tree, instantiate, combo);
+  VALID_WIDGET_KEYWORDS (tree);
+  VALID_GUI_KEYWORDS (tree);
+  IIFORMAT_VALID_KEYWORD (tree, Q_properties, check_valid_item_list);
+
+  /* tab control */
+  INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tab, "tab");
+  IIFORMAT_HAS_SHARED_METHOD (tab, validate, combo);
+  IIFORMAT_HAS_SHARED_METHOD (tab, possible_dest_types, widget);
+  IIFORMAT_HAS_METHOD (tab, instantiate);
+  VALID_WIDGET_KEYWORDS (tab);
+  VALID_GUI_KEYWORDS (tab);
+  IIFORMAT_VALID_KEYWORD (tab, Q_properties, check_valid_item_list);
+
   /* labels */
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (label, "label");
   IIFORMAT_HAS_SHARED_METHOD (label, possible_dest_types, widget);
--- a/src/glyphs.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/glyphs.c	Mon Aug 13 11:23:13 2007 +0200
@@ -600,7 +600,7 @@
       markobj (IMAGE_INSTANCE_WIDGET_TYPE (i));
       markobj (IMAGE_INSTANCE_WIDGET_PROPS (i));
       markobj (IMAGE_INSTANCE_WIDGET_FACE (i));
-      mark_gui_item (&IMAGE_INSTANCE_WIDGET_ITEM (i), markobj);
+      markobj (IMAGE_INSTANCE_WIDGET_ITEM (i));
     case IMAGE_SUBWINDOW:
       markobj (IMAGE_INSTANCE_SUBWINDOW_FRAME (i));
       break;
@@ -707,11 +707,13 @@
       break;
 
     case IMAGE_WIDGET:
+      /*
       if (!NILP (IMAGE_INSTANCE_WIDGET_CALLBACK (ii)))
 	{
 	  print_internal (IMAGE_INSTANCE_WIDGET_CALLBACK (ii), printcharfun, 0);
 	  write_c_string (", ", printcharfun);
 	}
+      */
       if (!NILP (IMAGE_INSTANCE_WIDGET_FACE (ii)))
 	{
 	  write_c_string (" (", printcharfun);
@@ -834,15 +836,14 @@
 
     case IMAGE_WIDGET:
       if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1),
-		IMAGE_INSTANCE_WIDGET_TYPE (i2)) &&
-	    EQ (IMAGE_INSTANCE_WIDGET_CALLBACK (i1),
-		IMAGE_INSTANCE_WIDGET_CALLBACK (i2))
+		IMAGE_INSTANCE_WIDGET_TYPE (i2))
+	    && internal_equal (IMAGE_INSTANCE_WIDGET_ITEM (i1),
+			       IMAGE_INSTANCE_WIDGET_ITEM (i2),
+			       depth + 1)
 	    && internal_equal (IMAGE_INSTANCE_WIDGET_PROPS (i1),
 			       IMAGE_INSTANCE_WIDGET_PROPS (i2),
 			       depth + 1)
-	    && internal_equal (IMAGE_INSTANCE_WIDGET_TEXT (i1),
-			       IMAGE_INSTANCE_WIDGET_TEXT (i2),
-			       depth + 1)))
+	    ))
 	return 0;
     case IMAGE_SUBWINDOW:
       if (!(IMAGE_INSTANCE_SUBWINDOW_WIDTH (i1) ==
@@ -892,7 +893,7 @@
       hash = HASH4 (hash, 
 		    internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1),
 		    internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1),
-		    internal_hash (IMAGE_INSTANCE_WIDGET_CALLBACK (i), depth + 1));
+		    internal_hash (IMAGE_INSTANCE_WIDGET_ITEM (i), depth + 1));
     case IMAGE_SUBWINDOW:
       hash = HASH4 (hash, IMAGE_INSTANCE_SUBWINDOW_WIDTH (i),
 		    IMAGE_INSTANCE_SUBWINDOW_HEIGHT (i),
--- a/src/glyphs.h	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/glyphs.h	Mon Aug 13 11:23:13 2007 +0200
@@ -432,7 +432,7 @@
 	Lisp_Object face; /* foreground and background colors */
 	Lisp_Object type;
 	Lisp_Object props;	/* properties */
-	struct gui_item gui_item;
+	Lisp_Object gui_item;	/* a list of gui_items */
       } widget;			/* widgets are subwindows */
     } subwindow;
   } u;
@@ -472,13 +472,15 @@
   IMAGE_INSTANCE_SUBWINDOW_WIDTH(i)
 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
   IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i)
-#define IMAGE_INSTANCE_WIDGET_CALLBACK(i) \
-  ((i)->u.subwindow.widget.gui_item.callback)
 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.widget.type)
 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.widget.props)
 #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.widget.face)
-#define IMAGE_INSTANCE_WIDGET_TEXT(i) ((i)->u.subwindow.widget.gui_item.name)
 #define IMAGE_INSTANCE_WIDGET_ITEM(i) ((i)->u.subwindow.widget.gui_item)
+#define IMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \
+(CONSP (IMAGE_INSTANCE_WIDGET_ITEM (i)) ? \
+XCAR (IMAGE_INSTANCE_WIDGET_ITEM (i)) : \
+  IMAGE_INSTANCE_WIDGET_ITEM (i))
+#define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name
 
 #define XIMAGE_INSTANCE_DEVICE(i) \
   IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
@@ -513,18 +515,18 @@
   IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \
   IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i))
-#define XIMAGE_INSTANCE_WIDGET_CALLBACK(i) \
-  IMAGE_INSTANCE_WIDGET_CALLBACK (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_TYPE(i) \
   IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \
   IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \
   IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_WIDGET_ITEM(i) \
+  IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \
+  IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \
   IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i))
-#define XIMAGE_INSTANCE_WIDGET_ITEM(i) \
-  IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i))
 
 #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \
   IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i))
@@ -623,6 +625,7 @@
 extern Lisp_Object Qxpm, Qxface;
 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable;
 extern Lisp_Object Qxbm, Qedit, Qgroup, Qlabel, Qcombo, Qscrollbar, Qprogress;
+extern Lisp_Object Qtree, Qtab;
 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y;
 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group;
 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text;
--- a/src/gui.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/gui.c	Mon Aug 13 11:23:13 2007 +0200
@@ -97,35 +97,17 @@
 }
 
 /*
- * Initialize the gui_item structure by setting all (GC-protected)
- * fields to their default values. The defaults are t for :active and
- * :included values, and nil for others.
- */
-void
-gui_item_init (struct gui_item *pgui_item)
-{
-  pgui_item->name     = Qnil;
-  pgui_item->callback = Qnil;
-  pgui_item->suffix   = Qnil;
-  pgui_item->active   = Qt;
-  pgui_item->included = Qt;
-  pgui_item->config   = Qnil;
-  pgui_item->filter   = Qnil;
-  pgui_item->style    = Qnil;
-  pgui_item->selected = Qnil;
-  pgui_item->keys     = Qnil;
-}
-
-/*
  * Add a value VAL associated with keyword KEY into PGUI_ITEM
  * structure. If KEY is not a keyword, or is an unknown keyword, then
  * error is signaled.
  */
 void
-gui_item_add_keyval_pair (struct gui_item *pgui_item,
+gui_item_add_keyval_pair (Lisp_Object gui_item,
 			  Lisp_Object key, Lisp_Object val, 
 			  Error_behavior errb)
 {
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+
   if (!KEYWORDP (key))
     signal_simple_error_2 ("Non-keyword in gui item", key, pgui_item->name);
 
@@ -144,17 +126,51 @@
     signal_simple_error_2 ("Unknown keyword in gui item", key, pgui_item->name);
 }
 
+void
+gui_item_init (Lisp_Object gui_item)
+{
+  struct Lisp_Gui_Item *lp = XGUI_ITEM (gui_item);
+
+  lp->name     = Qnil;
+  lp->callback = Qnil;
+  lp->suffix   = Qnil;
+  lp->active   = Qt;
+  lp->included = Qt;
+  lp->config   = Qnil;
+  lp->filter   = Qnil;
+  lp->style    = Qnil;
+  lp->selected = Qnil;
+  lp->keys     = Qnil;
+}
+
+Lisp_Object
+allocate_gui_item ()
+{
+  struct Lisp_Gui_Item *lp =
+    alloc_lcrecord_type (struct Lisp_Gui_Item, &lrecord_gui_item);
+  Lisp_Object val;
+
+  zero_lcrecord (lp);
+  XSETGUI_ITEM (val, lp);
+
+  gui_item_init (val);
+
+  return val;
+}
+
 /*
  * ITEM is a lisp vector, describing a menu item or a button. The
  * function extracts the description of the item into the PGUI_ITEM
  * structure.
  */
-static void
-gui_parse_item_keywords_internal (Lisp_Object item, struct gui_item *pgui_item,
-				  Error_behavior errb)
+static Lisp_Object
+make_gui_item_from_keywords_internal (Lisp_Object item,
+				      Error_behavior errb)
 {
   int length, plist_p, start;
   Lisp_Object *contents;
+  Lisp_Object gui_item = allocate_gui_item ();
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   CHECK_VECTOR (item);
   length = XVECTOR_LENGTH (item);
@@ -204,21 +220,48 @@
 	{
 	  Lisp_Object key = contents [i++];
 	  Lisp_Object val = contents [i++];
-	  gui_item_add_keyval_pair (pgui_item, key, val, errb);
+	  gui_item_add_keyval_pair (gui_item, key, val, errb);
 	}
     }
+  return gui_item;
+}
+
+Lisp_Object
+gui_parse_item_keywords (Lisp_Object item)
+{
+  return make_gui_item_from_keywords_internal (item, ERROR_ME);
+}
+
+Lisp_Object
+gui_parse_item_keywords_no_errors (Lisp_Object item)
+{
+  return make_gui_item_from_keywords_internal (item, ERROR_ME_NOT);
 }
 
+/* convert a gui item into plist properties */
 void
-gui_parse_item_keywords (Lisp_Object item, struct gui_item *pgui_item)
+gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item)
 {
-  gui_parse_item_keywords_internal (item, pgui_item, ERROR_ME);
-}
-
-void
-gui_parse_item_keywords_no_errors (Lisp_Object item, struct gui_item *pgui_item)
-{
-  gui_parse_item_keywords_internal (item, pgui_item, ERROR_ME_NOT);
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  
+  if (!NILP (pgui_item->callback))
+    Fplist_put (plist, Q_callback, pgui_item->callback);
+  if (!NILP (pgui_item->suffix))
+    Fplist_put (plist, Q_suffix, pgui_item->suffix);
+  if (!NILP (pgui_item->active))
+    Fplist_put (plist, Q_active, pgui_item->active);
+  if (!NILP (pgui_item->included))
+    Fplist_put (plist, Q_included, pgui_item->included);
+  if (!NILP (pgui_item->config))
+    Fplist_put (plist, Q_config, pgui_item->config);
+  if (!NILP (pgui_item->filter))
+    Fplist_put (plist, Q_filter, pgui_item->filter);
+  if (!NILP (pgui_item->style))
+    Fplist_put (plist, Q_style, pgui_item->style);
+  if (!NILP (pgui_item->selected))
+    Fplist_put (plist, Q_selected, pgui_item->selected);
+  if (!NILP (pgui_item->keys))
+    Fplist_put (plist, Q_keys, pgui_item->keys);
 }
 
 /*
@@ -226,13 +269,13 @@
  * if any
  */
 int
-gui_item_active_p (CONST struct gui_item *pgui_item)
+gui_item_active_p (Lisp_Object gui_item)
 {
   /* This function can call lisp */
 
   /* Shortcut to avoid evaluating Qt each time */
-  return (EQ (pgui_item->active, Qt)
-	  || !NILP (Feval (pgui_item->active)));
+  return (EQ (XGUI_ITEM (gui_item)->active, Qt)
+	  || !NILP (Feval (XGUI_ITEM (gui_item)->active)));
 }
 
 /*
@@ -240,13 +283,13 @@
  * if any
  */
 int
-gui_item_selected_p (CONST struct gui_item *pgui_item)
+gui_item_selected_p (Lisp_Object gui_item)
 {
   /* This function can call lisp */
 
   /* Shortcut to avoid evaluating Qt each time */
-  return (EQ (pgui_item->selected, Qt)
-	  || !NILP (Feval (pgui_item->selected)));
+  return (EQ (XGUI_ITEM (gui_item)->selected, Qt)
+	  || !NILP (Feval (XGUI_ITEM (gui_item)->selected)));
 }
 
 /*
@@ -255,9 +298,10 @@
  * configuration variable
  */
 int
-gui_item_included_p (CONST struct gui_item *pgui_item, Lisp_Object conflist)
+gui_item_included_p (Lisp_Object gui_item, Lisp_Object conflist)
 {
   /* This function can call lisp */
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   /* Evaluate :included first. Shortcut to avoid evaluating Qt each time */
   if (!EQ (pgui_item->included, Qt)
@@ -289,11 +333,12 @@
  * buffer.
  */
 unsigned int
-gui_item_display_flush_left  (CONST struct gui_item *pgui_item,
+gui_item_display_flush_left  (Lisp_Object gui_item,
 			      char* buf, Bytecount buf_len)
 {
   char *p = buf;
   Bytecount len;
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   /* Copy item name first */
   CHECK_STRING (pgui_item->name);
@@ -336,9 +381,10 @@
  * buffer.
  */
 unsigned int
-gui_item_display_flush_right (CONST struct gui_item *pgui_item,
+gui_item_display_flush_right (Lisp_Object gui_item,
 			      char* buf, Bytecount buf_len)
 {
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
   *buf = 0;
 
   /* Have keys? */
@@ -374,9 +420,11 @@
 }
 #endif /* HAVE_WINDOW_SYSTEM */
 
-Lisp_Object
-mark_gui_item (struct gui_item* p, void (*markobj) (Lisp_Object))
+static Lisp_Object
+mark_gui_item (Lisp_Object obj, void (*markobj) (Lisp_Object))
 {
+  struct Lisp_Gui_Item *p = XGUI_ITEM (obj);
+
   markobj (p->name);
   markobj (p->callback);
   markobj (p->suffix);
@@ -391,10 +439,27 @@
   return Qnil;
 }
 
+static unsigned long
+gui_item_hash (Lisp_Object obj, int depth)
+{
+  struct Lisp_Gui_Item *p = XGUI_ITEM (obj);
+
+  return HASH2 (HASH5 (internal_hash (p->name, depth + 1),
+		       internal_hash (p->callback, depth + 1),
+		       internal_hash (p->suffix, depth + 1),
+		       internal_hash (p->active, depth + 1),
+		       internal_hash (p->included, depth + 1)),
+		HASH5 (internal_hash (p->config, depth + 1),
+		       internal_hash (p->filter, depth + 1),
+		       internal_hash (p->style, depth + 1),
+		       internal_hash (p->selected, depth + 1),
+		       internal_hash (p->keys, depth + 1)));
+}
+
 int
-gui_item_hash (Lisp_Object hashtable, struct gui_item* g, int slot)
+gui_item_id_hash (Lisp_Object hashtable, Lisp_Object gitem, int slot)
 {
-  int hashid = HASH2 (internal_hash (g->callback, 0), internal_hash (g->name, 0));
+  int hashid = gui_item_hash (gitem, 0);
   int id = GUI_ITEM_ID_BITS (hashid, slot);
   while (!NILP (Fgethash (make_int (id),
 			  hashtable, Qnil)))
@@ -404,6 +469,55 @@
   return id;
 }
 
+static int
+gui_item_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  struct Lisp_Gui_Item *p1 = XGUI_ITEM (obj1);
+  struct Lisp_Gui_Item *p2 = XGUI_ITEM (obj2);
+
+  if (!(internal_equal (p1->name, p2->name, depth + 1)
+	&&
+	internal_equal (p1->callback, p2->callback, depth + 1)
+	&&
+	EQ (p1->suffix, p2->suffix)
+	&&
+	EQ (p1->active, p2->active)
+	&&
+	EQ (p1->included, p2->included)
+	&&
+	EQ (p1->config, p2->config)
+	&&
+	EQ (p1->filter, p2->filter)
+	&&
+	EQ (p1->style, p2->style)
+	&&
+	EQ (p1->selected, p2->selected)
+	&&
+	EQ (p1->keys, p2->keys)))
+    return 0;
+  return 1;
+}
+
+static void
+print_gui_item (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  struct Lisp_Gui_Item *g = XGUI_ITEM (obj);
+  char buf[20];
+
+  if (print_readably)
+    error ("printing unreadable object #<gui-item 0x%x>", g->header.uid);
+
+  write_c_string ("#<gui-item ", printcharfun);
+  sprintf (buf, "0x%x>", g->header.uid);
+  write_c_string (buf, printcharfun);
+}
+
+DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item,
+			       mark_gui_item, print_gui_item,
+			       0, gui_item_equal,
+			       gui_item_hash,
+			       struct Lisp_Gui_Item);
+
 void
 syms_of_gui (void)
 {
--- a/src/gui.h	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/gui.h	Mon Aug 13 11:23:13 2007 +0200
@@ -32,10 +32,24 @@
 
 extern int popup_up_p;
 
+/************************************************************************/
+/*			Image Instance Object				*/
+/************************************************************************/
+
+DECLARE_LRECORD (gui_item, struct Lisp_Gui_Item);
+#define XGUI_ITEM(x) \
+  XRECORD (x, gui_item, struct Lisp_Gui_Item)
+#define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item)
+#define GUI_ITEMP(x) RECORDP (x, gui_item)
+#define GC_GUI_ITEMP(x) GC_RECORDP (x, gui_item)
+#define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item)
+#define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item)
+
 /* This structure describes gui button,
    menu item or submenu properties */
-struct gui_item
+struct Lisp_Gui_Item
 {
+  struct lcrecord_header header;
   Lisp_Object name;		/* String */
   Lisp_Object callback;		/* Symbol or form */
   Lisp_Object suffix;		/* String */
@@ -47,45 +61,28 @@
   Lisp_Object selected;		/* Form */
   Lisp_Object keys;		/* String */
 };
-#define GUI_ITEM_LAST_GCPROED keys
-#define GUI_ITEM_GCPRO_COUNT \
-  (slot_offset(struct gui_item, GUI_ITEM_LAST_GCPROED) / sizeof(Lisp_Object) + 1)
-
-/*
- * gui_item is a struct containing a bunch of Lisp_Object
- * members.  We need to GC-protect all the member slots.
- * Rather than build a long chain of individual gcpro structs
- * that protect the slots individually, we protect all the
- * member slots by pretending the struct is an array.  ANSI C
- * requires this hack to work, ugly though it is.
- */
-#define GCPRO_GUI_ITEM(pgui_item)					\
-	do {								\
-	  Lisp_Object *gui_item_array = (Lisp_Object *) pgui_item;	\
-	  GCPRO1 (gui_item_array[0]);					\
-	  gcpro1.nvars = GUI_ITEM_GCPRO_COUNT;				\
-	} while (0);
 
 extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
 extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
 extern Lisp_Object Q_key_sequence, Q_label, Q_callback;
 
-void gui_item_init (struct gui_item *pgui_item);
-void gui_item_add_keyval_pair (struct gui_item *pgui_item,
+void gui_item_add_keyval_pair (Lisp_Object,
 			       Lisp_Object key, Lisp_Object val,
 			       Error_behavior errb);
-void gui_parse_item_keywords (Lisp_Object item, struct gui_item *pgui_item);
-void gui_parse_item_keywords_no_errors (Lisp_Object item, struct gui_item *pgui_item);
-int  gui_item_active_p (CONST struct gui_item *pgui_item);
-int  gui_item_selected_p (CONST struct gui_item *pgui_item);
-int  gui_item_included_p (CONST struct gui_item *pgui_item, Lisp_Object into);
-int  gui_item_hash (Lisp_Object, struct gui_item*, int);
-Lisp_Object mark_gui_item (struct gui_item* p, void (*markobj) (Lisp_Object));
-unsigned int gui_item_display_flush_left  (CONST struct gui_item *pgui_item,
+Lisp_Object gui_parse_item_keywords (Lisp_Object item);
+Lisp_Object gui_parse_item_keywords_no_errors (Lisp_Object item);
+int  gui_item_active_p (Lisp_Object);
+int  gui_item_selected_p (Lisp_Object);
+int  gui_item_included_p (Lisp_Object, Lisp_Object into);
+int  gui_item_id_hash (Lisp_Object, Lisp_Object gui_item, int);
+unsigned int gui_item_display_flush_left  (Lisp_Object pgui_item,
 					   char* buf, Bytecount buf_len);
-unsigned int gui_item_display_flush_right (CONST struct gui_item *pgui_item,
+unsigned int gui_item_display_flush_right (Lisp_Object gui_item,
 					   char* buf, Bytecount buf_len);
 
+Lisp_Object allocate_gui_item ();
+void gui_item_init (Lisp_Object gui_item);
+
 /* this is mswindows biased but reasonably safe I think */
 #define GUI_ITEM_ID_SLOTS 8
 #define GUI_ITEM_ID_MIN(s) (s * 0x2000)
--- a/src/lisp.h	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/lisp.h	Mon Aug 13 11:23:13 2007 +0200
@@ -336,6 +336,8 @@
 typedef struct Lisp_Font_Instance Lisp_Font_Instance;
 struct Lisp_Image_Instance;
 typedef struct Lisp_Image_Instance Lisp_Image_Instance;
+struct Lisp_Gui_Item;
+typedef struct Lisp_Gui_Item Lisp_Gui_Item;
 struct display_line;
 struct redisplay_info;
 struct window_mirror;
--- a/src/menubar-msw.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/menubar-msw.c	Mon Aug 13 11:23:13 2007 +0200
@@ -123,7 +123,7 @@
  * "Left Flush\tRight Flush"
  */
 static char*
-displayable_menu_item (struct gui_item* pgui_item, int bar_p)
+displayable_menu_item (Lisp_Object gui_item, int bar_p)
 {
   /* We construct the name in a static buffer. That's fine, because
      menu items longer than 128 chars are probably programming errors,
@@ -134,7 +134,7 @@
   unsigned int ll, lr;
 
   /* Left flush part of the string */
-  ll = gui_item_display_flush_left (pgui_item, buf, MAX_MENUITEM_LENGTH);
+  ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH);
 
   /* Escape '&' as '&&' */
   ptr = buf;
@@ -142,7 +142,7 @@
     {
       if (ll+2 >= MAX_MENUITEM_LENGTH)
 	signal_simple_error ("Menu item produces too long displayable string",
-			     pgui_item->name);
+			     XGUI_ITEM (gui_item)->name);
       memmove (ptr+1, ptr, (ll-(ptr-buf))+1);
       ll++;
       ptr+=2;
@@ -165,7 +165,7 @@
   if (!bar_p)
     {
       assert (MAX_MENUITEM_LENGTH > ll + 1);
-      lr = gui_item_display_flush_right (pgui_item, buf + ll + 1,
+      lr = gui_item_display_flush_right (gui_item, buf + ll + 1,
 					 MAX_MENUITEM_LENGTH - ll - 1);
       if (lr)
 	buf [ll] = '\t';
@@ -279,21 +279,21 @@
     {
       /* Submenu */
       HMENU submenu;
-      struct gui_item gui_item;
+      Lisp_Object gui_item = allocate_gui_item ();
+      struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
       struct gcpro gcpro1;
 
-      gui_item_init (&gui_item);
-      GCPRO_GUI_ITEM (&gui_item);
+      GCPRO1 (gui_item);
 
-      menu_parse_submenu_keywords (item, &gui_item);
+      menu_parse_submenu_keywords (item, gui_item);
 
-      if (!STRINGP (gui_item.name))
+      if (!STRINGP (pgui_item->name))
 	signal_simple_error ("Menu name (first element) must be a string", item);
 
-      if (!gui_item_included_p (&gui_item, Vmenubar_configuration))
+      if (!gui_item_included_p (gui_item, Vmenubar_configuration))
 	return;
 
-      if (!gui_item_active_p (&gui_item))
+      if (!gui_item_active_p (gui_item))
 	item_info.fState = MFS_GRAYED;
       /* Temptation is to put 'else' right here. Although, the
 	 displayed item won't have an arrow indicating that it is a
@@ -301,7 +301,7 @@
       submenu = create_empty_popup_menu();
 
       item_info.fMask |= MIIM_SUBMENU;
-      item_info.dwTypeData = displayable_menu_item (&gui_item, bar_p);
+      item_info.dwTypeData = displayable_menu_item (gui_item, bar_p);
       item_info.hSubMenu = submenu;
 
       if (!(item_info.fState & MFS_GRAYED))
@@ -310,12 +310,12 @@
 	     keyed by menu handle */
 	  if (NILP(path))
 	    /* list1 cannot GC */
-	    path = list1 (gui_item.name);
+	    path = list1 (pgui_item->name);
 	  else
 	    {
 	      Lisp_Object arg[2];
 	      arg[0] = path;
-	      arg[1] = list1 (gui_item.name);
+	      arg[1] = list1 (pgui_item->name);
 	      /* Fappend gcpro'es its arg */
 	      path = Fappend (2, arg);
 	    }
@@ -329,22 +329,20 @@
     {
       /* An ordinary item */
       Lisp_Object style, id;
-      struct gui_item gui_item;
+      Lisp_Object gui_item = gui_parse_item_keywords (item);
+      struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
       struct gcpro gcpro1;
 
-      gui_item_init (&gui_item);
-      GCPRO_GUI_ITEM (&gui_item);
+      GCPRO1 (gui_item);
 
-      gui_parse_item_keywords (item, &gui_item);
-
-      if (!gui_item_included_p (&gui_item, Vmenubar_configuration))
+      if (!gui_item_included_p (gui_item, Vmenubar_configuration))
 	return;
 
-      if (!gui_item_active_p (&gui_item))
+      if (!gui_item_active_p (gui_item))
 	item_info.fState = MFS_GRAYED;
 
-      style = (NILP (gui_item.selected) || NILP (Feval (gui_item.selected))
-	       ? Qnil : gui_item.style);
+      style = (NILP (pgui_item->selected) || NILP (Feval (pgui_item->selected))
+	       ? Qnil : pgui_item->style);
 
       if (EQ (style, Qradio))
 	{
@@ -356,13 +354,13 @@
 	  item_info.fState |= MFS_CHECKED;
 	}
 
-      id = allocate_menu_item_id (path, gui_item.name,
-				  gui_item.suffix);
-      Fputhash (id, gui_item.callback, hash_tab);
+      id = allocate_menu_item_id (path, pgui_item->name,
+				  pgui_item->suffix);
+      Fputhash (id, pgui_item->callback, hash_tab);
 
       item_info.wID = (UINT) XINT(id);
       item_info.fType |= MFT_STRING;
-      item_info.dwTypeData = displayable_menu_item (&gui_item, bar_p);
+      item_info.dwTypeData = displayable_menu_item (gui_item, bar_p);
 
       UNGCPRO; /* gui_item */
     }
@@ -396,10 +394,9 @@
   int deep_p, flush_right;
   struct gcpro gcpro1;
   unsigned long checksum;
-  struct gui_item gui_item;
-
-  gui_item_init (&gui_item);
-  GCPRO_GUI_ITEM (&gui_item);
+  Lisp_Object gui_item = allocate_gui_item ();
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  GCPRO1 (gui_item);
 
   /* We are sometimes called with the menubar unchanged, and with changed
      right flush. We have to update the menubar in this case,
@@ -414,15 +411,15 @@
   deep_p = !NILP (path);
 
   /* Fetch keywords prepending the item list */
-  desc = menu_parse_submenu_keywords (desc, &gui_item);
+  desc = menu_parse_submenu_keywords (desc, gui_item);
 
   /* Check that menu name is specified when expected */
-  if (NILP (gui_item.name) && deep_p)
+  if (NILP (pgui_item->name) && deep_p)
     signal_simple_error ("Menu must have a name", desc);
 
   /* Apply filter if specified */
-  if (!NILP (gui_item.filter))
-    desc = call1 (gui_item.filter, desc);
+  if (!NILP (pgui_item->filter))
+    desc = call1 (pgui_item->filter, desc);
 
   /* Loop thru the desc's CDR and add items for each entry */
   flush_right = 0;
@@ -453,11 +450,11 @@
       /* Add the header to the popup, if told so. The same as in X - an
 	 insensitive item, and a separator (Seems to me, there were
 	 two separators in X... In Windows this looks ugly, anyways. */
-      if (!bar_p && !deep_p && popup_menu_titles && !NILP(gui_item.name))
+      if (!bar_p && !deep_p && popup_menu_titles && !NILP(pgui_item->name))
 	{
-	  CHECK_STRING (gui_item.name);
+	  CHECK_STRING (pgui_item->name);
 	  InsertMenu (menu, 0, MF_BYPOSITION | MF_STRING | MF_DISABLED,
-		      0, XSTRING_DATA(gui_item.name));
+		      0, XSTRING_DATA(pgui_item->name));
 	  InsertMenu (menu, 1, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
 	  SetMenuDefaultItem (menu, 0, MF_BYPOSITION);
 	}
--- a/src/menubar.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/menubar.c	Mon Aug 13 11:23:13 2007 +0200
@@ -102,8 +102,10 @@
 }
 
 Lisp_Object
-menu_parse_submenu_keywords (Lisp_Object desc, struct gui_item* pgui_item)
+menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item)
 {
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+
   /* Menu descriptor should be a list */
   CHECK_CONS (desc);
 
@@ -130,7 +132,7 @@
       desc = XCDR (desc);
       if (!NILP (desc))
 	CHECK_CONS (desc);
-      gui_item_add_keyval_pair (pgui_item, key, val, ERROR_ME);
+      gui_item_add_keyval_pair (gui_item, key, val, ERROR_ME);
     }
 
   /* Return the rest - supposed to be a list of items */
@@ -152,10 +154,10 @@
 {
   Lisp_Object path_entry, submenu_desc, submenu;
   struct gcpro gcpro1;
-  struct gui_item gui_item;
+  Lisp_Object gui_item = allocate_gui_item ();
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
-  gui_item_init (&gui_item);
-  GCPRO_GUI_ITEM (&gui_item);
+  GCPRO1 (gui_item);
 
   EXTERNAL_LIST_LOOP (path_entry, path)
     {
@@ -164,15 +166,15 @@
 	RETURN_UNGCPRO (Qnil);
 
       /* Parse this menu */
-      desc = menu_parse_submenu_keywords (desc, &gui_item);
+      desc = menu_parse_submenu_keywords (desc, gui_item);
 
       /* Check that this (sub)menu is active */
-      if (!gui_item_active_p (&gui_item))
+      if (!gui_item_active_p (gui_item))
 	RETURN_UNGCPRO (Qnil);
 
       /* Apply :filter */
-      if (!NILP (gui_item.filter))
-	desc = call1 (gui_item.filter, desc);
+      if (!NILP (pgui_item->filter))
+	desc = call1 (pgui_item->filter, desc);
 
       /* Find the next menu on the path inside this one */
       EXTERNAL_LIST_LOOP (submenu_desc, desc)
@@ -191,7 +193,7 @@
 
     descend:
       /* Prepare for the next iteration */
-      gui_item_init (&gui_item);
+      gui_item_init (gui_item);
     }
 
   /* We have successfully descended down the end of the path */
--- a/src/menubar.h	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/menubar.h	Mon Aug 13 11:23:13 2007 +0200
@@ -30,7 +30,7 @@
 void update_frame_menubars (struct frame *f);
 void free_frame_menubars (struct frame *f);
 Lisp_Object menu_parse_submenu_keywords (Lisp_Object desc,
-					 struct gui_item* pgui_item);
+					 Lisp_Object gui_item);
 Lisp_Object current_frame_menubar (CONST struct frame* f);
 
 EXFUN (Fmenu_find_real_submenu, 2);
--- a/src/mule-ccl.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/mule-ccl.c	Mon Aug 13 11:23:13 2007 +0200
@@ -447,7 +447,8 @@
   else							\
     {							\
       Bufbyte work[MAX_EMCHAR_LEN];			\
-      int len = ( ch < 256 ) ?				\
+      int len = ( ch < ( conversion_mode == CCL_MODE_ENCODING ? \
+                         256 : 128 ) ) ?			\
 	simple_set_charptr_emchar (work, ch) :		\
 	non_ascii_set_charptr_emchar (work, ch);	\
       Dynarr_add_many (destination, work, len);		\
@@ -517,7 +518,7 @@
   };
 
 int
-ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_dynarr *destination, int src_bytes, int *consumed)
+ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_dynarr *destination, int src_bytes, int *consumed, int conversion_mode)
 {
   int *reg = ccl->reg;
   int ic = ccl->ic;
@@ -978,7 +979,7 @@
 		  : 0);
 
   ccl_driver (&ccl, (CONST unsigned char *)0, (unsigned_char_dynarr *)0,
-	      0, (int *)0);
+	      0, (int *)0, CCL_MODE_ENCODING);
   QUIT;
   if (ccl.status != CCL_STAT_SUCCESS)
     error ("Error in CCL program at %dth code", ccl.ic);
@@ -1035,7 +1036,7 @@
   outbuf = Dynarr_new (unsigned_char);
   ccl.last_block = NILP (contin);
   produced = ccl_driver (&ccl, XSTRING_DATA (str), outbuf,
-			 XSTRING_LENGTH (str), (int *)0);
+			 XSTRING_LENGTH (str), (int *)0, CCL_MODE_ENCODING);
   for (i = 0; i < 8; i++)
     XVECTOR_DATA (status)[i] = make_int(ccl.reg[i]);
   XSETINT (XVECTOR_DATA (status)[8], ccl.ic);
--- a/src/mule-ccl.h	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/mule-ccl.h	Mon Aug 13 11:23:13 2007 +0200
@@ -43,8 +43,13 @@
 				   should be than the input buffer.  */
 };
 
+
+#define CCL_MODE_ENCODING 0
+#define CCL_MODE_DECODING 1
+
 int ccl_driver (struct ccl_program *ccl, CONST unsigned char *source,
-		unsigned_char_dynarr *destination, int src_bytes, int *consumed);
+		unsigned_char_dynarr *destination, int src_bytes,
+		int *consumed, int conversion_mode);
 void setup_ccl_program (struct ccl_program *ccl, Lisp_Object val);
 
 /* Alist of fontname patterns vs corresponding CCL program.  */
--- a/src/mule-charset.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/mule-charset.c	Mon Aug 13 11:23:13 2007 +0200
@@ -1105,27 +1105,33 @@
 			(CHAR_LEADING_BYTE (XCHAR (ch))));
 }
 
-DEFUN ("char-octet", Fchar_octet, 1, 2, 0, /*
-Return the octet numbered N (should be 0 or 1) of char CH.
-N defaults to 0 if omitted.
+DEFUN ("split-char", Fsplit_char, 1, 1, 0, /*
+Return list of charset and one or two position-codes of CHAR.
 */
-       (ch, n))
+       (character))
 {
-  Lisp_Object charset;
-  int c1, c2, int_n;
+  /* This function can GC */
+  struct gcpro gcpro1, gcpro2;
+  Lisp_Object charset = Qnil;
+  Lisp_Object rc = Qnil;
+  int c1, c2;
 
-  CHECK_CHAR_COERCE_INT (ch);
-  if (NILP (n))
-    int_n = 0;
+  GCPRO2 (charset, rc);
+  CHECK_CHAR_COERCE_INT (character);
+
+  BREAKUP_CHAR (XCHAR (character), charset, c1, c2);
+
+  if (XCHARSET_DIMENSION (Fget_charset (charset)) == 2)
+    {
+      rc = list3 (XCHARSET_NAME (charset), make_int (c1), make_int (c2));
+    }
   else
     {
-      CHECK_INT (n);
-      int_n = XINT (n);
-      if (int_n != 0 && int_n != 1)
-	signal_simple_error ("Octet number must be 0 or 1", n);
+      rc = list2 (XCHARSET_NAME (charset), make_int (c1));
     }
-  BREAKUP_CHAR (XCHAR (ch), charset, c1, c2);
-  return make_int (int_n == 0 ? c1 : c2);
+  UNGCPRO;
+
+  return rc;
 }
 
 
@@ -1230,7 +1236,7 @@
 
   DEFSUBR (Fmake_char);
   DEFSUBR (Fchar_charset);
-  DEFSUBR (Fchar_octet);
+  DEFSUBR (Fsplit_char);
 
 #ifdef ENABLE_COMPOSITE_CHARS
   DEFSUBR (Fmake_composite_char);
--- a/src/redisplay-msw.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/redisplay-msw.c	Mon Aug 13 11:23:13 2007 +0200
@@ -165,7 +165,7 @@
 	  char_converter.reg[1] = byte1;
 	  char_converter.reg[2] = byte2;
 	  char_converter.ic = 0; /* start at beginning each time */
-	  ccl_driver (&char_converter, 0, 0, 0, 0);
+	  ccl_driver (&char_converter, 0, 0, 0, 0, CCL_MODE_ENCODING);
 	  byte1 = char_converter.reg[1];
 	  byte2 = char_converter.reg[2];
 	}
--- a/src/redisplay-x.c	Mon Aug 13 11:22:24 2007 +0200
+++ b/src/redisplay-x.c	Mon Aug 13 11:23:13 2007 +0200
@@ -195,7 +195,7 @@
 	  char_converter.reg[0] = XCHARSET_ID (charset);
 	  char_converter.reg[1] = byte1;
 	  char_converter.reg[2] = byte2;
-	  ccl_driver (&char_converter, 0, 0, 0, 0);
+	  ccl_driver (&char_converter, 0, 0, 0, 0, CCL_MODE_ENCODING);
 	  byte1 = char_converter.reg[1];
 	  byte2 = char_converter.reg[2];
 	}
--- a/tests/ChangeLog	Mon Aug 13 11:22:24 2007 +0200
+++ b/tests/ChangeLog	Mon Aug 13 11:23:13 2007 +0200
@@ -1,3 +1,7 @@
+1999-06-22  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.17 is released
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.16 is released
--- a/tests/automated/base64-tests.el	Mon Aug 13 11:22:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-;; Copyright (C) 1999 Free Software Foundation, Inc.
-
-;; Author: Hrvoje Niksic <hniksic@srce.hr>
-;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
-;; Created: 1999
-;; Keywords: tests
-
-;; This file is part of XEmacs.
-
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
-
-;;; Synched up with: Not in FSF.
-
-;;; Commentary:
-
-;; Test base64 functions.
-;; See test-harness.el for instructions on how to run these tests.
-
-(eval-when-compile
-  (condition-case nil
-      (require 'test-harness)
-    (file-error
-     (push "." load-path)
-     (when (and (boundp 'load-file-name) (stringp load-file-name))
-       (push (file-name-directory load-file-name) load-path))
-     (require 'test-harness))))
-
-;; We need to test the buffer and string functions.  We do it by
-;; testing them in various circumstances, asserting the same result,
-;; and returning that result.
-
-(defvar bt-test-buffer (get-buffer-create " *base64-workhorse*"))
-
-(defun bt-base64-encode-string (string &optional no-line-break)
-  (let ((string-result (base64-encode-string string no-line-break))
-	length)
-    (with-current-buffer bt-test-buffer
-      ;; the whole buffer
-      (erase-buffer)
-      (insert string)
-      (setq length (base64-encode-region (point-min) (point-max) no-line-break))
-      (Assert (eq length (- (point-max) (point-min))))
-      (Assert (equal (buffer-string) string-result))
-      ;; partial
-      (erase-buffer)
-      (insert "random junk........\0\0';'eqwrkw[erpqf")
-      (let ((p1 (point)) p2)
-	(insert string)
-	(setq p2 (point-marker))
-	(insert "...more random junk.q,f3/.qrm314.r,m2typ' 2436T@W$^@$#^T@")
-	(setq length (base64-encode-region p1 p2 no-line-break))
-	(Assert (eq length (- p2 p1)))
-	(Assert (equal (buffer-substring p1 p2) string-result))))
-    string-result))
-
-(defun bt-base64-decode-string (string)
-  (let ((string-result (base64-decode-string string))
-	length)
-    (with-current-buffer bt-test-buffer
-      ;; the whole buffer
-      (erase-buffer)
-      (insert string)
-      (setq length (base64-decode-region (point-min) (point-max)))
-      (cond (string-result
-	     (Assert (eq length (- (point-max) (point-min))))
-	     (Assert (equal (buffer-string) string-result)))
-	    (t
-	     (Assert (null length))
-	     ;; The buffer should not have been modified.
-	     (Assert (equal (buffer-string) string))))
-      ;; partial
-      (erase-buffer)
-      (insert "random junk........\0\0';'eqwrkw[erpqf")
-      (let ((p1 (point)) p2)
-	(insert string)
-	(setq p2 (point-marker))
-	(insert "...more random junk.q,f3/.qrm314.\0\0r,m2typ' 2436T@W$^@$#T@")
-	(setq length (base64-decode-region p1 p2))
-	(cond (string-result
-	       (Assert (eq length (- p2 p1)))
-	       (Assert (equal (buffer-substring p1 p2) string-result)))
-	      (t
-	       (Assert (null length))
-	       ;; The buffer should not have been modified.
-	       (Assert (equal (buffer-substring p1 p2) string))))))
-    string-result))
-
-(defun bt-remove-newlines (str)
-  (apply #'string (delete ?\n (mapcar #'identity str))))
-
-(defconst bt-allchars
-  (let ((str (make-string 256 ?\0)))
-    (dotimes (i 256)
-      (aset str i (int-char i)))
-    str))
-
-(defconst bt-test-strings
-  `(("" "")
-    ("foo" "Zm9v")
-    ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-     "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAx
-MjM0NTY3ODk=")
-    (,bt-allchars
-     "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1
-Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWpr
-bG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6Ch
-oqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX
-2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==")
-    ))
-
-;;-----------------------------------------------------
-;; Encoding base64
-;;-----------------------------------------------------
-
-(loop for (raw encoded) in bt-test-strings do
-  (Assert (equal (bt-base64-encode-string raw) encoded))
-  ;; test the NO-LINE-BREAK flag
-  (Assert (equal (bt-base64-encode-string raw t) (bt-remove-newlines encoded))))
-
-;; When Mule is around, Lisp programmers should make sure that the
-;; buffer contains only characters whose `char-int' is in the [0, 256)
-;; range.  If this condition is not satisfied for any character, an
-;; error is signaled.
-(when (featurep 'mule)
-  ;; #### remove subtraction of 128 -- no longer needed with make-char
-  ;; patch!
-  (let* ((mule-string (format "Hrvoje Nik%ci%c"
-			      ;; scaron == 185 in Latin 2
-			      (make-char 'latin-iso8859-2 (- 185 128))
-			      ;; cacute == 230 in Latin 2
-			      (make-char 'latin-iso8859-2 (- 230 128)))))
-    (Check-Error-Message error "Non-ascii character in base64 input"
-      (bt-base64-encode-string mule-string))))
-
-;;-----------------------------------------------------
-;; Decoding base64
-;;-----------------------------------------------------
-
-(loop for (raw encoded) in bt-test-strings do
-  (Assert (equal (bt-base64-decode-string encoded) raw))
-  (Assert (equal (bt-base64-decode-string (bt-remove-newlines encoded)) raw)))
-
-;; Test errors
-(dolist (str `("foo" "AAC" "foo\0bar" "====" "Zm=9v" ,bt-allchars))
-  (Check-Error error (base64-decode-string str)))
-
-;; base64-decode-string should ignore non-base64 characters anywhere
-;; in the string.  We test this in the cheesiest manner possible, by
-;; inserting non-base64 chars at the beginning, at the end, and in the
-;; middle of the string.
-
-(defconst bt-base64-chars '(?A ?B ?C ?D ?E ?F ?G ?H ?I ?J
-			       ;; sometimes I hate Emacs indentation.
-			       ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T
-			       ?U ?V ?W ?X ?Y ?Z ?a ?b ?c ?d
-			       ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n
-			       ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x
-			       ?y ?z ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7
-			       ?8 ?9 ?+ ?/ ?=))
-
-(defconst bt-nonbase64-chars (set-difference (mapcar #'identity bt-allchars)
-					     bt-base64-chars))
-
-(when nil
-  ;; This code crashes XEmacs!  This requires further investigation.
-  ;; I'm running Linux, and for me, XEmacs crashes in
-  ;; Fmapconcat()->mapcar1(), after a GC that thrashes the stack.
-  ;; Raymond Toy reports a similar crash under Solaris.
-  (loop for (raw encoded) in bt-test-strings do
-    (unless (equal raw "")
-      (let* ((middlepos (/ (1+ (length encoded)) 2))
-	     (left (substring encoded 0 middlepos))
-	     (right (substring encoded middlepos)))
-	;; Whitespace at the beginning, end, and middle.
-	(let ((mangled (concat bt-nonbase64-chars left bt-nonbase64-chars right
-			       bt-nonbase64-chars)))
-	  (Assert (equal (bt-base64-decode-string mangled) raw)))
-
-	;; Whitespace between every char.
-	(let ((mangled (concat bt-nonbase64-chars
-			       ;; ENCODED with bt-nonbase64-chars
-			       ;; between every character.
-			       (mapconcat #'char-to-string encoded
-					  (apply #'string bt-nonbase64-chars))
-			       bt-nonbase64-chars)))
-	  (Assert (equal (bt-base64-decode-string mangled) raw))))))
-  )
-
-;;-----------------------------------------------------
-;; Mixed...
-;;-----------------------------------------------------
-
-;; The whole point of base64 is to ensure that an arbitrary sequence
-;; of bytes passes through gateway hellfire unscathed, protected by
-;; the asbestos suit of base64.  Here we test that
-;; (base64-decode-string (base64-decode-string FOO)) equals FOO for
-;; any FOO we can think of.  The following stunts stress-test
-;; practically all aspects of the encoding and decoding process.
-
-(loop for (raw ignored) in bt-test-strings do
-  (Assert (equal (bt-base64-decode-string
-		  (bt-base64-encode-string raw))
-		 raw))
-  (Assert (equal (bt-base64-decode-string
-		  (bt-base64-decode-string
-		   (bt-base64-encode-string
-		    (bt-base64-encode-string raw))))
-		 raw))
-  (Assert (equal (bt-base64-decode-string
-		  (bt-base64-decode-string
-		   (bt-base64-decode-string
-		    (bt-base64-encode-string
-		     (bt-base64-encode-string
-		      (bt-base64-encode-string raw))))))
-		 raw))
-  (Assert (equal (bt-base64-decode-string
-		  (bt-base64-decode-string
-		   (bt-base64-decode-string
-		    (bt-base64-decode-string
-		     (bt-base64-encode-string
-		      (bt-base64-encode-string
-		       (bt-base64-encode-string
-			(bt-base64-encode-string raw))))))))
-		 raw))
-  (Assert (equal (bt-base64-decode-string
-		  (bt-base64-decode-string
-		   (bt-base64-decode-string
-		    (bt-base64-decode-string
-		     (bt-base64-decode-string
-		      (bt-base64-encode-string
-		       (bt-base64-encode-string
-			(bt-base64-encode-string
-			 (bt-base64-encode-string
-			  (bt-base64-encode-string raw))))))))))
-		 raw)))
--- a/tests/glyph-test.el	Mon Aug 13 11:22:24 2007 +0200
+++ b/tests/glyph-test.el	Mon Aug 13 11:23:13 2007 +0200
@@ -25,6 +25,29 @@
 			:face modeline-mousable
 			:descriptor "ok" :callback foo 
 			:selected t])))
+
+;; tree view
+(set-extent-begin-glyph 
+ (make-extent (point) (point))
+ (setq tree (make-glyph 
+	       [tree :width 10
+		     :descriptor "My Tree"
+		     :properties (:items (["One" foo]
+					  (["Two" foo]
+					   ["Four" foo]
+					   "Six")
+					  "Three"))])))
+
+;; tab control
+(set-extent-begin-glyph 
+ (make-extent (point) (point))
+ (setq tab (make-glyph 
+	    [tab :descriptor "My Tab"
+		 :face default
+		 :properties (:items (["One" foo]
+				      ["Two" foo]
+				      ["Three" foo]))])))
+
 ;; progress gauge
 (set-extent-begin-glyph 
  (make-extent (point) (point))
@@ -63,6 +86,7 @@
 (set-extent-begin-glyph 
  (make-extent (point) (point))
  (make-glyph [button :descriptor ["A Big Button" foo ]]))
+
 ;; edit box
 (set-extent-begin-glyph 
  (make-extent (point) (point)) 
--- a/version.sh	Mon Aug 13 11:22:24 2007 +0200
+++ b/version.sh	Mon Aug 13 11:23:13 2007 +0200
@@ -2,8 +2,8 @@
 emacs_is_beta=t
 emacs_major_version=21
 emacs_minor_version=2
-emacs_beta_version=16
-xemacs_codename="Sumida"
+emacs_beta_version=17
+xemacs_codename="Chiyoda"
 infodock_major_version=4
 infodock_minor_version=0
 infodock_build_version=7