# ------------------------------------------------------------------------------
 # Makefile.in    |    1 
 # aclocal.m4     |    5 
 # charproc.c     |   19 +
 # config.guess   |  638 ++++++++++++++++++++++++++++++++++++++++---------------
 # config.sub     |  469 ++++++++++++++++++++++++++++++++++------
 # configure      |  151 ++++++-------
 # ctlseqs.ms     |   15 +
 # input.c        |   99 ++++++++
 # main.c         |   11 
 # misc.c         |  164 +++++++++-----
 # ptyx.h         |    7 
 # version.h      |    4 
 # xterm.h        |    4 
 # xterm.log.html |   26 ++
 # xterm.man      |   10 
 # xtermcfg.hin   |    1 
 # 16 files changed, 1240 insertions(+), 384 deletions(-)
 # ------------------------------------------------------------------------------
 Index: Makefile.in
--- xterm-139+/Makefile.in      Wed Jun 14 15:50:37 2000
 +++ xterm-140/Makefile.in       Sun Jul 23 20:18:40 2000
 @@ -112,6 +112,7 @@
  install-man \
 install-full \
 install-dirs :: $(INSTALL_DIRS)
+       @echo $@ built
  
 install \
 install-bin \
Index: aclocal.m4
--- xterm-139+/aclocal.m4       Wed Jun 14 15:50:37 2000
 +++ xterm-140/aclocal.m4        Thu Jul 20 22:05:52 2000
 @@ -154,7 +154,7 @@
  #include <errno.h> ],
     [long x = (long) $1],
     [eval 'cf_cv_dcl_'$1'=yes'],
-    [eval 'cf_cv_dcl_'$1'=no]')
 +    [eval 'cf_cv_dcl_'$1'=no'])
  ])
 
 eval 'cf_result=$cf_cv_dcl_'$1
@@ -1115,7 +1115,8 @@
 for cf_path in default \
        /usr/contrib/X11R6 \
        /usr/contrib/X11R5 \
-       /usr/lib/X11R5
 +       /usr/lib/X11R5 \
 +       /usr/local
  do
 
        if test -z "$cf_x_athena_include" ; then
Index: charproc.c
--- xterm-139+/charproc.c       Wed Jun 14 15:50:37 2000
 +++ xterm-140/charproc.c        Sun Jul 23 16:08:11 2000
 @@ -3614,6 +3614,22 @@
  #ifdef AMOEBA
        if (ttypreprocess(c)) return;
 #endif
+#if OPT_TCAP_QUERY
+       /*
+        * If we're returning a termcap string, it has to be translated since
 +        * a DCS must not contain any characters except for the normal 7-bit
 +        * printable ASCII (counting tab, carriage return, etc).  For now,
 +        * just use hexadecimal for the whole thing.
 +        */
+       if (screen->tc_query >= 0) {
 +               char tmp[3];
 +               sprintf(tmp, "%02X", c & 0xFF);
 +               buf[0] = tmp[0];
 +               buf[1] = tmp[1];
 +               i = 2;
 +       }
+       else
 +#endif
        if((buf[0] = c) == '\r' && (term->flags & LINEFEED)) {
                buf[1] = '\n';
                i++;
@@ -4102,6 +4118,9 @@
    wnew->misc.tekInhibit = request->misc.tekInhibit;
    wnew->misc.tekSmall = request->misc.tekSmall;
    wnew->screen.TekEmu = request->screen.TekEmu;
+#endif
+#if OPT_TCAP_QUERY
+   wnew->screen.tc_query = -1;
  #endif
    wnew->misc.re_verse0 =
    wnew->misc.re_verse = request->misc.re_verse;
Index: config.guess
--- xterm-139+/config.guess     Sat Jun 10 12:56:44 2000
 +++ xterm-140/config.guess      Sun Jun 18 15:12:00 2000
 @@ -1,7 +1,10 @@
  #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
 -#
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 +#   Free Software Foundation, Inc.
 +
+version='2000-06-13'
+
 # This file 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 of the License, or
@@ -22,7 +25,7 @@
 # the same distribution terms that you use for the rest of that program.
 
 # Written by Per Bothner <bothner@cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
 +# Please send patches to <config-patches@gnu.org>.
  #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
@@ -35,6 +38,60 @@
 # (but try to keep the structure clean).
 #
 
+me=`echo "$0" | sed -e 's,.*/,,'`
 +
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of this system.
 +
+Operation modes:
+  -h, --help               print this help, then exit
 +  -V, --version            print version number, then exit"
 +
+help="
+Try \`$me --help' for more information."
 +
+# Parse command line
+while test $# -gt 0 ; do
 +  case "$1" in
+    --version | --vers* | -V )
 +       echo "$version" ; exit 0 ;;
 +    --help | --h* | -h )
 +       echo "$usage"; exit 0 ;;
 +    -- )     # Stop option processing
 +       shift; break ;;
 +    - )        # Use stdin as input.
 +       break ;;
 +    -* )
+       exec >&2
 +       echo "$me: invalid option $1"
 +       echo "$help"
 +       exit 1 ;;
 +    * )
+       break ;;
 +  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
 +  exit 1
+fi
+
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
 +if test x"$CC_FOR_BUILD" = x; then
 +  if test x"$HOST_CC" != x; then
 +    CC_FOR_BUILD="$HOST_CC"
+  else
 +    if test x"$CC" != x; then
 +      CC_FOR_BUILD="$CC"
 +    else
+      CC_FOR_BUILD=cc
+    fi
 +  fi
+fi
+
+
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 8/24/94.)
 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
@@ -46,11 +103,49 @@
 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
 +dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
  
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # Netbsd (nbsd) targets should (where applicable) match one or
 +       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
 +       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 +       # switched to ELF, *-*-netbsd* would select the old
 +       # object file format.  This provides both forward
 +       # compatibility and a consistent mechanism for selecting the
 +       # object file format.
 +       # Determine the machine/vendor (is the vendor relevant).
 +       case "${UNAME_MACHINE}" in
 +           amiga) machine=m68k-cbm ;;
 +           arm32) machine=arm-unknown ;;
 +           atari*) machine=m68k-atari ;;
 +           sun3*) machine=m68k-sun ;;
 +           mac68k) machine=m68k-apple ;;
 +           macppc) machine=powerpc-apple ;;
 +           hp3[0-9][05]) machine=m68k-hp ;;
 +           ibmrt|romp-ibm) machine=romp-ibm ;;
 +           *) machine=${UNAME_MACHINE}-unknown ;;
 +       esac
+       # The Operating System including object format.
 +       if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 +               | grep __ELF__ >/dev/null
 +       then
+           # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 +           # Return netbsd for either.  FIX?
 +           os=netbsd
 +       else
+           os=netbsdelf
 +       fi
+       # The OS release
 +       release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 +       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 +       # contains redundant information, the shorter form:
 +       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 +       echo "${machine}-${os}${release}"
 +       exit 0 ;;
      alpha:OSF1:*:*)
        if test $UNAME_RELEASE = "V4.0"; then
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -59,46 +154,62 @@
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       cat <<EOF >dummy.s
 +       cat <<EOF >$dummy.s
 +       .data
+\$Lformat:
 +       .byte 37,100,45,37,120,10,0     # "%d-%x\n"
 +
+       .text
        .globl main
+       .align 4
         .ent main
 main:
-       .frame \$30,0,\$26,0
 -       .prologue 0
 -       .long 0x47e03d80 # implver $0
 -       lda \$2,259
 -       .long 0x47e20c21 # amask $2,$1
 -       srl \$1,8,\$2
 -       sll \$2,2,\$2
 -       sll \$0,3,\$0
 -       addl \$1,\$0,\$0
 -       addl \$2,\$0,\$0
 -       ret \$31,(\$26),1
 +       .frame \$30,16,\$26,0
 +       ldgp \$29,0(\$27)
 +       .prologue 1
 +       .long 0x47e03d80 # implver \$0
 +       lda \$2,-1
 +       .long 0x47e20c21 # amask \$2,\$1
 +       lda \$16,\$Lformat
 +       mov \$0,\$17
 +       not \$1,\$18
 +       jsr \$26,printf
 +       ldgp \$29,0(\$26)
 +       mov 0,\$16
 +       jsr \$26,exit
         .end main
 EOF
-       ${CC-cc} dummy.s -o dummy 2>/dev/null
 +       $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
         if test "$?" = 0 ; then
-               ./dummy
 -               case "$?" in
 -                       7)
 +               case `./$dummy` in
 +                       0-0)
                                 UNAME_MACHINE="alpha"
                                ;;
-                       15)
 +                       1-0)
                                 UNAME_MACHINE="alphaev5"
                                ;;
-                       14)
 +                       1-1)
                                 UNAME_MACHINE="alphaev56"
                                ;;
-                       10)
 +                       1-101)
                                 UNAME_MACHINE="alphapca56"
                                ;;
-                       16)
 +                       2-303)
                                 UNAME_MACHINE="alphaev6"
                                ;;
+                       2-307)
 +                               UNAME_MACHINE="alphaev67"
 +                               ;;
                 esac
        fi
-       rm -f dummy.s dummy
 -       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
 +       rm -f $dummy.s $dummy
 +       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 +       exit 0 ;;
 +    Alpha\ *:Windows_NT*:*)
 +       # How do we know it's Interix rather than the generic POSIX subsystem?
 +       # Should we change UNAME_MACHINE based on the output of uname instead
 +       # of the specific Alpha model?
 +       echo alpha-pc-interix
         exit 0 ;;
     21064:Windows_NT:50:3)
        echo alpha-dec-winnt3.5
@@ -106,9 +217,6 @@
     Amiga*:UNIX_System_V:4.0:*)
        echo m68k-cbm-sysv4
        exit 0;;
-    amiga:NetBSD:*:*)
-      echo m68k-cbm-netbsd${UNAME_RELEASE}
 -      exit 0 ;;
      amiga:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
@@ -133,16 +241,16 @@
     wgrisc:OpenBSD:*:*)
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
 +       exit 0 ;;
      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit 0;;
-    arm32:NetBSD:*:*)
-       echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 -       exit 0 ;;
      SR2?01:HI-UX/MPP:*:*)
        echo hppa1.1-hitachi-hiuxmpp
        exit 0;;
-    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
 +    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
         # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
        if test "`(/bin/universe) 2>/dev/null`" = att ; then
                echo pyramid-pyramid-sysv3
@@ -150,10 +258,7 @@
                echo pyramid-pyramid-bsd
        fi
        exit 0 ;;
-    "Power Macintosh":Rhapsody:*:*)
 -       echo powerpc-apple-rhapsody`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 -       exit 0 ;;
 -    NILE:*:*:dcosx)
+    NILE*:*:*:dcosx)
         echo pyramid-pyramid-svr4
        exit 0 ;;
     sun4H:SunOS:5.*:*)
@@ -198,21 +303,38 @@
     aushp:SunOS:*:*)
        echo sparc-auspex-sunos${UNAME_RELEASE}
        exit 0 ;;
-    atari*:NetBSD:*:*)
-       echo m68k-atari-netbsd${UNAME_RELEASE}
 -       exit 0 ;;
      atari*:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
-    sun3*:NetBSD:*:*)
-       echo m68k-sun-netbsd${UNAME_RELEASE}
 +    # The situation for MiNT is a little confusing.  The machine name
 +    # can be virtually everything (everything which is not
 +    # "atarist" or "atariste" at least should have a processor
 +    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
 +    # to the lowercase version "mint" (or "freemint").  Finally
 +    # the system name "TOS" denotes a system which is actually not
 +    # MiNT.  But MiNT is downward compatible to TOS, so this should
 +    # be no problem.
 +    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
 +        echo m68k-atari-mint${UNAME_RELEASE}
 +       exit 0 ;;
 +    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 +       echo m68k-atari-mint${UNAME_RELEASE}
 +        exit 0 ;;
 +    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
 +        echo m68k-atari-mint${UNAME_RELEASE}
         exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
 +        echo m68k-milan-mint${UNAME_RELEASE}
 +        exit 0 ;;
 +    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
 +        echo m68k-hades-mint${UNAME_RELEASE}
 +        exit 0 ;;
 +    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
 +        echo m68k-unknown-mint${UNAME_RELEASE}
 +        exit 0 ;;
      sun3*:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
-    mac68k:NetBSD:*:*)
-       echo m68k-apple-netbsd${UNAME_RELEASE}
 -       exit 0 ;;
      mac68k:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
@@ -225,9 +347,6 @@
     powerpc:machten:*:*)
        echo powerpc-apple-machten${UNAME_RELEASE}
        exit 0 ;;
-    macppc:NetBSD:*:*)
-        echo powerpc-apple-netbsd${UNAME_RELEASE}
 -        exit 0 ;;
      RISC*:Mach:*:*)
        echo mips-dec-mach_bsd4.3
        exit 0 ;;
@@ -241,8 +360,13 @@
        echo clipper-intergraph-clix${UNAME_RELEASE}
        exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-       sed 's/^        //' << EOF >dummy.c
 -       int main (argc, argv) int argc; char **argv; {
 +       sed 's/^        //' << EOF >$dummy.c
 +#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
 +       int main (int argc, char *argv[]) {
 +#else
+       int main (argc, argv) int argc; char *argv[]; {
 +#endif
        #if defined (host_mips) && defined (MIPSEB)
        #if defined (SYSTYPE_SYSV)
          printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@@ -257,10 +381,10 @@
          exit (-1);
        }
 EOF
-       ${CC-cc} dummy.c -o dummy \
 -         && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 -         && rm dummy.c dummy && exit 0
 -       rm -f dummy.c dummy
 +       $CC_FOR_BUILD $dummy.c -o $dummy \
 +         && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 +         && rm $dummy.c $dummy && exit 0
 +       rm -f $dummy.c $dummy
         echo mips-mips-riscos${UNAME_RELEASE}
        exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
@@ -278,15 +402,18 @@
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
-        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
 -       if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
 -            -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
 +       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 +       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
 +              [ ${TARGET_BINARY_INTERFACE}x = x ]
 +           then
                 echo m88k-dg-dgux${UNAME_RELEASE}
-       else
+           else
                 echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
 +       else
+           echo i586-dg-dgux${UNAME_RELEASE}
         fi
-        else echo i586-dg-dgux${UNAME_RELEASE}
 -        fi
        exit 0 ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
@@ -310,13 +437,9 @@
     i?86:AIX:*:*)
        echo i386-ibm-aix
        exit 0 ;;
-    *:MVS:*:* | *:OS390:*:*|*:OS/390:*:*)
 -                              # uname -m gives a processor model number  /* S/390 -- gil -- 1389 */
 -       echo s390-ibm-os390    # on R1 and R2, uname -s reports OS390
 -       exit 0 ;;              # on R3, uname -s reports OS/390
      *:AIX:2:3)
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               sed 's/^                //' << EOF >dummy.c
 +               sed 's/^                //' << EOF >$dummy.c
                 #include <sys/systemcfg.h>
 
                main()
@@ -327,8 +450,8 @@
                        exit(0);
                        }
 EOF
-               ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
 -               rm -f dummy.c dummy
 +               $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
 +               rm -f $dummy.c $dummy
                 echo rs6000-ibm-aix3.2.5
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
                echo rs6000-ibm-aix3.2.4
@@ -356,7 +479,7 @@
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
        echo romp-ibm-bsd4.4
        exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
         echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
        exit 0 ;;                           # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
@@ -375,8 +498,10 @@
        case "${UNAME_MACHINE}" in
            9000/31? )            HP_ARCH=m68000 ;;
            9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[13679] | 9000/892 )
 -              sed 's/^              //' << EOF >dummy.c
 +           9000/[678][0-9][0-9])
 +              sed 's/^              //' << EOF >$dummy.c
 +
+              #define _HPUX_SOURCE
                #include <stdlib.h>
               #include <unistd.h>
 
@@ -407,14 +532,14 @@
                   exit (0);
               }
 EOF
-       (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
 -       rm -f dummy.c dummy
 +       (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
 +       rm -f $dummy.c $dummy
         esac
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
        exit 0 ;;
     3050*:HI-UX:*:*)
-       sed 's/^        //' << EOF >dummy.c
 +       sed 's/^        //' << EOF >$dummy.c
         #include <unistd.h>
        int
        main ()
@@ -439,8 +564,8 @@
          exit (0);
        }
 EOF
-       ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
 -       rm -f dummy.c dummy
 +       $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
 +       rm -f $dummy.c $dummy
         echo unknown-hitachi-hiuxwe2
        exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -449,6 +574,9 @@
     9000/8??:4.3bsd:*:*)
        echo hppa1.0-hp-bsd
        exit 0 ;;
+    *9??*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
 +       exit 0 ;;
      hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
        echo hppa1.1-hp-osf
        exit 0 ;;
@@ -465,6 +593,9 @@
     parisc*:Lites*:*:*)
        echo hppa1.1-hp-lites
        exit 0 ;;
+    hppa*:OpenBSD:*:*)
+       echo hppa-unknown-openbsd
 +       exit 0 ;;
      C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
         exit 0 ;;
@@ -495,37 +626,40 @@
              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
        exit 0 ;;
     CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE}
 +       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 +       exit 0 ;;
 +    CRAY*T3E:*:*:*)
+       echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 +       exit 0 ;;
 +    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
         exit 0 ;;
     CRAY-2:*:*:*)
        echo cray2-cray-unicos
         exit 0 ;;
     F300:UNIX_System_V:*:*)
-        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
          FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
     F301:UNIX_System_V:*:*)
        echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
        exit 0 ;;
-    hp3[0-9][05]:NetBSD:*:*)
-       echo m68k-hp-netbsd${UNAME_RELEASE}
 -       exit 0 ;;
      hp300:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
+    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 +       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 +       exit 0 ;;
      sparc*:BSD/OS:*:*)
        echo sparc-unknown-bsdi${UNAME_RELEASE}
        exit 0 ;;
-    i?86:BSD/386:*:* | *:BSD/OS:*:*)
 -       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 +    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
         exit 0 ;;
     *:FreeBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit 0 ;;
-    *:NetBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 -       exit 0 ;;
      *:OpenBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
        exit 0 ;;
@@ -535,6 +669,15 @@
     i*:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 +       # How do we know it's Interix rather than the generic POSIX subsystem?
 +       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
 +       # UNAME_MACHINE based on the output of uname instead of i386?
 +       echo i386-pc-interix
 +       exit 0 ;;
 +    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
 +       exit 0 ;;
      p*:CYGWIN*:*)
        echo powerpcle-unknown-cygwin
        exit 0 ;;
@@ -544,16 +687,15 @@
     *:GNU:*:*)
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
 +       exit 0 ;;
      *:Linux:*:*)
-       # uname on the ARM produces all sorts of strangeness, and we need to
 -       # filter it out.
 -       case "$UNAME_MACHINE" in
 -         arm* | sa110*)              UNAME_MACHINE="arm" ;;
 -       esac
 
        # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us.
 -       ld_help_string=`ld --help 2>&1`
 +       # first see if it will tell us. cd to the root directory to prevent
 +       # problems with other programs or directories called `ld' in the path.
 +       ld_help_string=`cd /; ld --help 2>&1`
         ld_supported_emulations=`echo $ld_help_string \
                         | sed -ne '/supported emulations:/!d
                                    s/[         ][      ]*/ /g
@@ -561,69 +703,146 @@
                                    s/ .*//
                                    p'`
         case "$ld_supported_emulations" in
-         i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
 -         i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
 -         sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
 -         armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
 -         m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
 -         elf32ppc*)  echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
 -         elf64_ia64) echo "${UNAME_MACHINE}-unknown-linux-gnu"     ; exit 0 ;;
 +         *ia64)
 +               echo "${UNAME_MACHINE}-unknown-linux"
 +               exit 0
 +               ;;
 +         i?86linux)
 +               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
 +               exit 0
 +               ;;
 +         elf_i?86)
 +               echo "${UNAME_MACHINE}-pc-linux"
 +               exit 0
 +               ;;
 +         i?86coff)
 +               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
 +               exit 0
 +               ;;
 +         sparclinux)
 +               echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
 +               exit 0
 +               ;;
 +         armlinux)
 +               echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
 +               exit 0
 +               ;;
 +         elf32arm*)
 +               echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
 +               exit 0
 +               ;;
 +         armelf_linux*)
 +               echo "${UNAME_MACHINE}-unknown-linux-gnu"
 +               exit 0
 +               ;;
 +         m68klinux)
 +               echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
 +               exit 0
 +               ;;
 +         elf32ppc | elf32ppclinux)
 +               # Determine Lib Version
 +               cat >$dummy.c <<EOF
 +#include <features.h>
+#if defined(__GLIBC__)
 +extern char __libc_version[];
+extern char __libc_release[];
 +#endif
+main(argc, argv)
+     int argc;
+     char *argv[];
 +{
+#if defined(__GLIBC__)
+  printf("%s %s\n", __libc_version, __libc_release);
 +#else
+  printf("unkown\n");
+#endif
+  return 0;
+}
+EOF
+               LIBC=""
 +               $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
 +               if test "$?" = 0 ; then
 +                       ./$dummy | grep 1\.99 > /dev/null
 +                       if test "$?" = 0 ; then
 +                               LIBC="libc1"
 +                       fi
 +               fi
 +               rm -f $dummy.c $dummy
 +               echo powerpc-unknown-linux-gnu${LIBC}
 +               exit 0
 +               ;;
 +         shelf_linux)
 +               echo "${UNAME_MACHINE}-unknown-linux-gnu"
 +               exit 0
 +               ;;
         esac
 
        if test "${UNAME_MACHINE}" = "alpha" ; then
-               sed 's/^        //'  <<EOF >dummy.s
 -               .globl main
 -               .ent main
 -       main:
-               .frame \$30,0,\$26,0
 -               .prologue 0
 -               .long 0x47e03d80 # implver $0
 -               lda \$2,259
 -               .long 0x47e20c21 # amask $2,$1
 -               srl \$1,8,\$2
 -               sll \$2,2,\$2
 -               sll \$0,3,\$0
 -               addl \$1,\$0,\$0
 -               addl \$2,\$0,\$0
 -               ret \$31,(\$26),1
 -               .end main
 +               cat <<EOF >$dummy.s
 +                       .data
 +               \$Lformat:
 +                       .byte 37,100,45,37,120,10,0     # "%d-%x\n"
 +
+                       .text
 +                       .globl main
 +                       .align 4
 +                       .ent main
 +               main:
 +                       .frame \$30,16,\$26,0
 +                       ldgp \$29,0(\$27)
 +                       .prologue 1
 +                       .long 0x47e03d80 # implver \$0
 +                       lda \$2,-1
 +                       .long 0x47e20c21 # amask \$2,\$1
 +                       lda \$16,\$Lformat
 +                       mov \$0,\$17
 +                       not \$1,\$18
 +                       jsr \$26,printf
 +                       ldgp \$29,0(\$26)
 +                       mov 0,\$16
 +                       jsr \$26,exit
 +                       .end main
  EOF
                LIBC=""
-               ${CC-cc} dummy.s -o dummy 2>/dev/null
 +               $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
                 if test "$?" = 0 ; then
-                       ./dummy
 -                       case "$?" in
 -                       7)
 +                       case `./$dummy` in
 +                       0-0)
                                 UNAME_MACHINE="alpha"
                                ;;
-                       15)
 +                       1-0)
                                 UNAME_MACHINE="alphaev5"
                                ;;
-                       14)
 +                       1-1)
                                 UNAME_MACHINE="alphaev56"
                                ;;
-                       10)
 +                       1-101)
                                 UNAME_MACHINE="alphapca56"
                                ;;
-                       16)
 +                       2-303)
                                 UNAME_MACHINE="alphaev6"
                                ;;
+                       2-307)
 +                               UNAME_MACHINE="alphaev67"
 +                               ;;
                         esac
 
-                       objdump --private-headers dummy | \
 +                       objdump --private-headers $dummy | \
                           grep ld.so.1 > /dev/null
                        if test "$?" = 0 ; then
                                LIBC="libc1"
                        fi
                fi
-               rm -f dummy.s dummy
 +               rm -f $dummy.s $dummy
                 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
        elif test "${UNAME_MACHINE}" = "mips" ; then
-         cat >dummy.c <<EOF
 -main(argc, argv)
-     int argc;
-     char *argv[];
 -{
+         cat >$dummy.c <<EOF
 +#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
 +       int main (int argc, char *argv[]) {
 +#else
+       int main (argc, argv) int argc; char *argv[]; {
 +#endif
 #ifdef __MIPSEB__
   printf ("%s-unknown-linux-gnu\n", argv[1]);
 #endif
@@ -633,8 +852,10 @@
   return 0;
 }
 EOF
-         ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
 -         rm -f dummy.c dummy
 +         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
 +         rm -f $dummy.c $dummy
 +       elif test "${UNAME_MACHINE}" = "s390"; then
 +         echo s390-ibm-linux && exit 0
         else
          # Either a pre-BFD a.out linker (linux-gnuoldld)
          # or one that does not give us useful --help.
@@ -653,15 +874,17 @@
            ;;
          esac
          # Determine whether the default compiler is a.out or elf
-         cat >dummy.c <<EOF
 +         cat >$dummy.c <<EOF
  #include <features.h>
-main(argc, argv)
-     int argc;
-     char *argv[];
 -{
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
 +       int main (int argc, char *argv[]) {
 +#else
+       int main (argc, argv) int argc; char *argv[]; {
 +#endif
 #ifdef __ELF__
 # ifdef __GLIBC__
-#  if (__GLIBC__ >= 2)
+#  if __GLIBC__ >= 2
      printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
 #  else
     printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
@@ -675,8 +898,8 @@
   return 0;
 }
 EOF
-         ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
 -         rm -f dummy.c dummy
 +         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
 +         rm -f $dummy.c $dummy
         fi ;;
 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
 # are messed up and put the nodename in both sysname and nodename.
@@ -691,25 +914,21 @@
         # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
        exit 0 ;;
-    # SysVr5/Unixware7
-    i?86:*:5*:* | i?86:SYSTEM_V:5*:*)
 -        if uname -a | grep SCO >/dev/null 2>/dev/null ; then
 -           (/bin/uname -s|egrep UnixWare >/dev/null) && UNAME_VER=uw${UNAME_VERSION}
 -           if /bin/uname -X 2>/dev/null >/dev/null ; then
 -               (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
 -               (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
 -                       && UNAME_MACHINE=i586
 -           fi
 -               echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}${UNAME_VER}
 +    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
 +       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 +       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
 +               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
         else
-               echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
 +               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
         fi
        exit 0 ;;
-    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
 -       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
 -               echo ${UNAME_MACHINE}-univel-sysv4.2uw${UNAME_VERSION}
 +    i?86:*:5:7*)
+        # Fixed at (any) Pentium or better
 +        UNAME_MACHINE=i586
 +        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
 +           echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
         else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
 +           echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
         fi
        exit 0 ;;
     i?86:*:3.2:*)
@@ -721,19 +940,20 @@
                (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
                        && UNAME_MACHINE=i586
+               (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
 +                       && UNAME_MACHINE=i686
 +               (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
 +                       && UNAME_MACHINE=i686
                 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
        else
                echo ${UNAME_MACHINE}-pc-sysv32
        fi
        exit 0 ;;
-    i?86:UnixWare:*:*)
-       if /bin/uname -X 2>/dev/null >/dev/null ; then
 -         (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
 -           && UNAME_MACHINE=i586
 -       fi
-       echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
 +    i?86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
         exit 0 ;;
     pc:*:*:*)
+       # Left here for compatibility:
          # uname -m prints for DJGPP always 'pc', but it prints nothing about
         # the processor, so we play safe by assuming i386.
        echo i386-pc-msdosdjgpp
@@ -774,7 +994,7 @@
     mc68030:UNIX_System_V:4.*:*)
        echo m68k-atari-sysv4
        exit 0 ;;
-    i?86:LynxOS:2.*:*)
+    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
         echo i386-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     TSUNAMI:LynxOS:2.*:*)
@@ -786,6 +1006,9 @@
     SM[BE]S:UNIX_SV:*:*)
        echo mips-dde-sysv${UNAME_RELEASE}
        exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
 +       exit 0 ;;
      RM*:SINIX-*:*:*)
        echo mips-sni-sysv4
        exit 0 ;;
@@ -816,13 +1039,13 @@
     news*:NEWS-OS:*:6*)
        echo mips-sony-newsos6
        exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
 +    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
         if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
 +               echo mips-nec-sysv${UNAME_RELEASE}
         else
-               echo mips-unknown-sysv${UNAME_RELEASE}
 +               echo mips-unknown-sysv${UNAME_RELEASE}
         fi
-       exit 0 ;;
 +        exit 0 ;;
      BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
        exit 0 ;;
@@ -832,18 +1055,45 @@
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
        exit 0 ;;
-    Power*Macintosh:Rhapsody:*:*)
 +    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
 +       exit 0 ;;
 +    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
 +       exit 0 ;;
 +    Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit 0 ;;
     *:Rhapsody:*:*)
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
        exit 0 ;;
+    *:Darwin:*:*)
+       echo `uname -p`-apple-darwin${UNAME_RELEASE}
 +       exit 0 ;;
 +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
 +       if test "${UNAME_MACHINE}" = "x86pc"; then
 +               UNAME_MACHINE=pc
 +       fi
+       echo `uname -p`-${UNAME_MACHINE}-nto-qnx
 +       exit 0 ;;
 +    *:QNX:*:4*)
+       echo i386-pc-qnx
 +       exit 0 ;;
 +    NSR-W:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
 +       exit 0 ;;
 +    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
 +       exit 0 ;;
 +    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
 +       exit 0 ;;
  esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
-cat >dummy.c <<EOF
+cat >$dummy.c <<EOF
  #ifdef _SEQUENT_
 # include <sys/types.h>
 # include <sys/utsname.h>
@@ -881,7 +1131,10 @@
 #endif
   int version;
   version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
 +  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
 +  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
    exit (0);
 #endif
 
@@ -941,8 +1194,8 @@
 }
 EOF
 
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
 -rm -f dummy.c dummy
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
 +rm -f $dummy.c $dummy
 
 # Apollos put the system type in the environment.
 
@@ -974,6 +1227,47 @@
     esac
 fi
 
-#echo '(Unable to guess system type)' 1>&2
 +cat >&2 <<EOF
+$0: unable to guess system type
 +
+The $version version of this script cannot recognize your system type.
 +Please download the most up to date version of the config scripts:
 +
+    ftp://ftp.gnu.org/pub/gnu/config/
 +
+If the version you run ($0) is already up to date, please
 +send the following data and any information you think might be
 +pertinent to <config-patches@gnu.org> in order to provide the needed
 +information to handle your system.
 +
+config.guess version = $version
+
 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
 +
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
 +
+hostinfo               = `(hostinfo) 2>/dev/null`
 +/bin/universe          = `(/bin/universe) 2>/dev/null`
 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
 +/bin/arch              = `(/bin/arch) 2>/dev/null`
 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
 +
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
 +UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
 +EOF
 
 exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
 +# time-stamp-start: "version='"
+# time-stamp-format: "%:y-%02m-%02d"
 +# time-stamp-end: "'"
+# End:
Index: config.sub
--- xterm-139+/config.sub       Sat Jun 10 12:54:01 2000
 +++ xterm-140/config.sub        Sun Jun 18 15:12:00 2000
 @@ -1,6 +1,10 @@
  #! /bin/sh
 # Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 +#   Free Software Foundation, Inc.
 +
+version='2000-06-13'
+
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 # can handle that machine.  It does not imply ALL GNU software can.
@@ -25,6 +29,8 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# Please send patches to <config-patches@gnu.org>.
 +#
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
@@ -45,34 +51,61 @@
 #      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
-if [ x$1 = x ]
-then
 -       echo Configuration name missing. 1>&2
 -       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
 -       echo "or     $0 ALIAS" 1>&2
 -       echo where ALIAS is a recognized configuration type. 1>&2
 -       exit 1
 -fi
+me=`echo "$0" | sed -e 's,.*/,,'`
  
-# First pass through any local machine types.
 -case $1 in
-       *local*)
-               echo $1
 -               exit 0
 -               ;;
 -       *)
-       ;;
 +usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
 +
+Canonicalize a configuration name.
+
 +Operation modes:
+  -h, --help               print this help, then exit
 +  -V, --version            print version number, then exit"
 +
+help="
+Try \`$me --help' for more information."
 +
+# Parse command line
+while test $# -gt 0 ; do
 +  case "$1" in
+    --version | --vers* | -V )
 +       echo "$version" ; exit 0 ;;
 +    --help | --h* | -h )
 +       echo "$usage"; exit 0 ;;
 +    -- )     # Stop option processing
 +       shift; break ;;
 +    - )        # Use stdin as input.
 +       break ;;
 +    -* )
+       exec >&2
 +       echo "$me: invalid option $1"
 +       echo "$help"
 +       exit 1 ;;
 +
+    *local*)
+       # First pass through any local machine types.
 +       echo $1
 +       exit 0;;
 +
+    * )
+       break ;;
 +  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
 +    exit 1;;
+ 1) ;;
 + *) echo "$me: too many arguments$help" >&2
 +    exit 1;;
 esac
 
 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  hurd-gnu*)
-    os=$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
 -    ;;
-  linux-gnu*)
+  nto-qnx* | linux-gnu*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -98,15 +131,25 @@
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple)
+       -apple | -axis)
                 os=
                basic_machine=$1
                ;;
+       -sim | -cisco | -oki | -wec | -winbond)
 +               os=
 +               basic_machine=$1
 +               ;;
 +       -scout)
+               ;;
 +       -wrs)
+               os=-vxworks
 +               basic_machine=$1
 +               ;;
         -hiux*)
                os=-hiuxwe2
                ;;
        -sco5)
-               os=sco3.2v5
 +               os=-sco3.2v5
                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                ;;
        -sco4)
@@ -125,6 +168,9 @@
                os=-sco3.2v2
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 +               ;;
         -isc)
                os=-isc2.2
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -147,27 +193,41 @@
        -psos*)
                os=-psos
                ;;
+       -mint | -mint[0-9]*)
 +               basic_machine=m68k-atari
 +               os=-mint
 +               ;;
  esac
 
 # Decode aliases for certain CPU-COMPANY combinations.
 case $basic_machine in
        # Recognize the basic CPU types without company name.
        # Some are omitted here because they have special meanings below.
-       tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
 +       tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
                 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
                | 580 | i960 | h8300 \
-               | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w \
 -               | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
 -               | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
 -               | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
 -               | mipstx39 | mipstx39el \
 -               | sparc | sparclet | sparclite | sparc64 | v850 | ia64)
 +               | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
 +               | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
 +               | hppa64 \
 +               | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
 +               | alphaev6[78] \
 +               | we32k | ns16k | clipper | i370 | sh | sh[34] \
 +               | powerpc | powerpcle \
 +               | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
 +               | mips64orion | mips64orionel | mipstx39 | mipstx39el \
 +               | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
 +               | mips64vr5000 | miprs64vr5000el | mcore \
 +               | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
 +               | thumb | d10v | fr30 | avr)
                 basic_machine=$basic_machine-unknown
                ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
 +               ;;
 +
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
-       i[34567]86)
 +       i[234567]86)
           basic_machine=$basic_machine-pc
          ;;
        # Object if more than one company name word.
@@ -176,28 +236,49 @@
                exit 1
                ;;
        # Recognize the basic CPU types with company name.
-       vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
 +       # FIXME: clean up the formatting here.
 +       vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-             | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
 +             | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
               | xmp-* | ymp-* \
+             | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
               | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
-             | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
 -             | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
 +             | hppa2.0n-* | hppa64-* \
 +             | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
 +             | alphaev6[78]-* \
 +             | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
 +             | clipper-* | orion-* \
               | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
-             | sparc64-* | mips64-* | mipsel-* \
 -             | mips64el-* | mips64orion-* | mips64orionel-*  \
 -             | mipstx39-* | mipstx39el-* \
 -             | f301-* | ia64-*)
 +             | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
 +             | mips64el-* | mips64orion-* | mips64orionel-* \
 +             | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
 +             | mipstx39-* | mipstx39el-* | mcore-* \
 +             | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
 +             | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
 +             | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
 +             | bs2000-*)
                 ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
 +               os=-bsd
 +               ;;
         3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
                basic_machine=m68000-att
                ;;
        3b*)
                basic_machine=we32k-att
                ;;
+       a29khif)
+               basic_machine=a29k-amd
 +               os=-udi
 +               ;;
 +       adobe68k)
+               basic_machine=m68010-adobe
 +               os=-scout
 +               ;;
         alliant | fx80)
                basic_machine=fx80-alliant
                ;;
@@ -227,6 +308,10 @@
                basic_machine=m68k-apollo
                os=-sysv
                ;;
+       apollo68bsd)
 +               basic_machine=m68k-apollo
 +               os=-bsd
 +               ;;
         aux)
                basic_machine=m68k-apple
                os=-aux
@@ -270,6 +355,9 @@
        crds | unos)
                basic_machine=m68k-crds
                ;;
+       cris | cris-* | etrax*)
 +               basic_machine=cris-axis
 +               ;;
         da30 | da30-*)
                basic_machine=m68k-da30
                ;;
@@ -303,6 +391,10 @@
        encore | umax | mmax)
                basic_machine=ns32k-encore
                ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
 +               basic_machine=m68k-ericsson
 +               os=-ose
 +               ;;
         fx2800)
                basic_machine=i860-alliant
                ;;
@@ -321,6 +413,14 @@
                basic_machine=h8300-hitachi
                os=-hms
                ;;
+       h8300xray)
 +               basic_machine=h8300-hitachi
 +               os=-xray
 +               ;;
 +       h8500hms)
+               basic_machine=h8500-hitachi
 +               os=-hms
 +               ;;
         harris)
                basic_machine=m88k-harris
                os=-sysv3
@@ -336,13 +436,30 @@
                basic_machine=m68k-hp
                os=-hpux
                ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
 +               basic_machine=hppa1.0-hp
 +               ;;
         hp9k2[0-9][0-9] | hp9k31[0-9])
                basic_machine=m68000-hp
                ;;
        hp9k3[2-9][0-9])
                basic_machine=m68k-hp
                ;;
-       hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
 +       hp9k6[0-9][0-9] | hp6[0-9][0-9])
 +               basic_machine=hppa1.0-hp
 +               ;;
 +       hp9k7[0-79][0-9] | hp7[0-79][0-9])
 +               basic_machine=hppa1.1-hp
 +               ;;
 +       hp9k78[0-9] | hp78[0-9])
 +               # FIXME: really hppa2.0-hp
 +               basic_machine=hppa1.1-hp
 +               ;;
 +       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
 +               # FIXME: really hppa2.0-hp
 +               basic_machine=hppa1.1-hp
 +               ;;
 +       hp9k8[0-9][13679] | hp8[0-9][13679])
                 basic_machine=hppa1.1-hp
                ;;
        hp9k8[0-9][0-9] | hp8[0-9][0-9])
@@ -351,16 +468,16 @@
        hppa-next)
                os=-nextstep3
                ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
 +               os=-osf
 +               ;;
 +       hppro)
+               basic_machine=hppa1.1-hp
 +               os=-proelf
 +               ;;
         i370-ibm* | ibm*)
                basic_machine=i370-ibm
-               os=-mvs
 -               ;;
 -       s390 | s390-ibm*)
 -# OS/390 support after:
-#  Linkname: Mortice Kern Systems (MKS) Inc. - OS/390 OpenEdition -- GNU Utilities Downloads
 -#       URL: http://www.mks.com/s390/gnu/download.htm#autoconf
 -               basic_machine=s390-ibm  #  /* S/390 -- gil -- 1419 */
 -               os=-os390
                 ;;
 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
        i[34567]86v32)
@@ -379,6 +496,22 @@
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-solaris2
                ;;
+       i386mach)
+               basic_machine=i386-mach
 +               os=-mach
 +               ;;
 +       i386-vsta | vsta)
 +               basic_machine=i386-unknown
 +               os=-vsta
 +               ;;
 +       i386-go32 | go32)
 +               basic_machine=i386-unknown
 +               os=-go32
 +               ;;
 +       i386-mingw32 | mingw32)
 +               basic_machine=i386-unknown
 +               os=-mingw32
 +               ;;
         iris | iris4d)
                basic_machine=mips-sgi
                case $os in
@@ -407,6 +540,10 @@
        miniframe)
                basic_machine=m68000-convergent
                ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
 +               basic_machine=m68k-atari
 +               os=-mint
 +               ;;
         mipsel*-linux*)
                basic_machine=mipsel-unknown
                os=-linux-gnu
@@ -421,10 +558,34 @@
        mips3*)
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
                ;;
+       mmix*)
+               basic_machine=mmix-knuth
 +               os=-mmixware
 +               ;;
 +       monitor)
+               basic_machine=m68k-rom68k
 +               os=-coff
 +               ;;
 +       msdos)
+               basic_machine=i386-unknown
 +               os=-msdos
 +               ;;
 +       mvs)
+               basic_machine=i370-ibm
 +               os=-mvs
 +               ;;
         ncr3000)
                basic_machine=i486-ncr
                os=-sysv4
                ;;
+       netbsd386)
 +               basic_machine=i386-unknown
 +               os=-netbsd
 +               ;;
 +       netwinder)
 +               basic_machine=armv4l-rebel
 +               os=-linux
 +               ;;
         news | news700 | news800 | news900)
                basic_machine=m68k-sony
                os=-newsos
@@ -437,6 +598,10 @@
                basic_machine=mips-sony
                os=-newsos
                ;;
+       necv70)
+               basic_machine=v70-nec
 +               os=-sysv
 +               ;;
         next | m*-next )
                basic_machine=m68k-next
                case $os in
@@ -462,9 +627,28 @@
                basic_machine=i960-intel
                os=-nindy
                ;;
+       mon960)
+               basic_machine=i960-intel
 +               os=-mon960
 +               ;;
         np1)
                basic_machine=np1-gould
                ;;
+       nsr-tandem)
 +               basic_machine=nsr-tandem
 +               ;;
 +       op50n-* | op60c-*)
 +               basic_machine=hppa1.1-oki
 +               os=-proelf
 +               ;;
 +       OSE68000 | ose68000)
 +               basic_machine=m68000-ericsson
 +               os=-ose
 +               ;;
 +       os68k)
+               basic_machine=m68k-none
 +               os=-os68k
 +               ;;
         pa-hitachi)
                basic_machine=hppa1.1-hitachi
                os=-hiuxwe2
@@ -482,19 +666,19 @@
         pc532 | pc532-*)
                basic_machine=ns32k-pc532
                ;;
-       pentium | p5 | k5 | nexen)
 +       pentium | p5 | k5 | k6 | nexen)
                 basic_machine=i586-pc
                ;;
-       pentiumpro | p6 | k6 | 6x86)
 +       pentiumpro | p6 | 6x86 | athlon)
                 basic_machine=i686-pc
                ;;
        pentiumii | pentium2)
                basic_machine=i786-pc
                ;;
-       pentium-* | p5-* | k5-* | nexen-*)
 +       pentium-* | p5-* | k5-* | k6-* | nexen-*)
                 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       pentiumpro-* | p6-* | k6-* | 6x86-*)
 +       pentiumpro-* | p6-* | 6x86-* | athlon-*)
                 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pentiumii-* | pentium2-*)
@@ -518,12 +702,20 @@
        ps2)
                basic_machine=i386-ibm
                ;;
+       rom68k)
+               basic_machine=m68k-rom68k
 +               os=-coff
 +               ;;
         rm[46]00)
                basic_machine=mips-siemens
                ;;
        rtpc | rtpc-*)
                basic_machine=romp-ibm
                ;;
+       sa29200)
+               basic_machine=a29k-amd
 +               os=-udi
 +               ;;
         sequent)
                basic_machine=i386-sequent
                ;;
@@ -531,6 +723,10 @@
                basic_machine=sh-hitachi
                os=-hms
                ;;
+       sparclite-wrs)
 +               basic_machine=sparclite-wrs
 +               os=-vxworks
 +               ;;
         sps7)
                basic_machine=m68k-bull
                os=-sysv2
@@ -538,6 +734,13 @@
        spur)
                basic_machine=spur-unknown
                ;;
+       st2000)
+               basic_machine=m68k-tandem
 +               ;;
 +       stratus)
+               basic_machine=i860-stratus
 +               os=-sysv4
 +               ;;
         sun2)
                basic_machine=m68000-sun
                ;;
@@ -578,10 +781,18 @@
        sun386 | sun386i | roadrunner)
                basic_machine=i386-sun
                ;;
+       sv1)
+               basic_machine=sv1-cray
 +               os=-unicos
 +               ;;
         symmetry)
                basic_machine=i386-sequent
                os=-dynix
                ;;
+       t3e)
+               basic_machine=t3e-cray
 +               os=-unicos
 +               ;;
         tx39)
                basic_machine=mipstx39-unknown
                ;;
@@ -599,6 +810,10 @@
                basic_machine=a29k-nyu
                os=-sym1
                ;;
+       v810 | necv810)
 +               basic_machine=v810-nec
 +               os=-none
 +               ;;
         vaxv)
                basic_machine=vax-dec
                os=-sysv
@@ -622,6 +837,14 @@
                basic_machine=a29k-wrs
                os=-vxworks
                ;;
+       w65*)
+               basic_machine=w65-wdc
 +               os=-none
 +               ;;
 +       w89k-*)
+               basic_machine=hppa1.1-winbond
 +               os=-proelf
 +               ;;
         xmp)
                basic_machine=xmp-cray
                os=-unicos
@@ -629,6 +852,10 @@
         xps | xps100)
                basic_machine=xps100-honeywell
                ;;
+       z8k-*-coff)
 +               basic_machine=z8k-unknown
 +               os=-sim
 +               ;;
         none)
                basic_machine=none-none
                os=-none
@@ -636,6 +863,15 @@
 
 # Here we handle the default manufacturer of certain CPU types.  It is in
 # some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
 +               ;;
 +       op50n)
+               basic_machine=hppa1.1-oki
 +               ;;
 +       op60c)
+               basic_machine=hppa1.1-oki
 +               ;;
         mips)
                if [ x$os = x-linux-gnu ]; then
                        basic_machine=mips-unknown
@@ -658,7 +894,10 @@
        we32k)
                basic_machine=we32k-att
                ;;
-       sparc)
+       sh3 | sh4)
 +               base_machine=sh-unknown
 +               ;;
 +       sparc | sparcv9)
                 basic_machine=sparc-sun
                ;;
         cydra)
@@ -670,6 +909,16 @@
        orion105)
                basic_machine=clipper-highlevel
                ;;
+       mac | mpw | mac-mpw)
 +               basic_machine=m68k-apple
 +               ;;
 +       pmac | pmac-mpw)
 +               basic_machine=powerpc-apple
 +               ;;
 +       c4x*)
+               basic_machine=c4x-none
 +               os=-coff
 +               ;;
         *)
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
                exit 1
@@ -720,28 +969,52 @@
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* | -os390* \
 +             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
 +             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* )
 +             | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
 +             | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
 +             | -openstep* | -oskit*)
         # Remember, each alternative MUST END IN *, to match a version number.
                ;;
+       -qnx*)
+               case $basic_machine in
 +                   x86-* | i[34567]86-*)
 +                       ;;
 +                   *)
 +                       os=-nto$os
 +                       ;;
 +               esac
 +               ;;
 +       -nto*)
+               os=-nto-qnx
 +               ;;
 +       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
 +             | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
 +             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 +               ;;
 +       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
 +               ;;
         -linux*)
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                ;;
-       -hurd*)
-               os=`echo $os `
 -               ;;
         -sunos5*)
                os=`echo $os | sed -e 's|sunos5|solaris2|'`
                ;;
        -sunos6*)
                os=`echo $os | sed -e 's|sunos6|solaris3|'`
                ;;
+       -opened*)
+               os=-openedition
 +               ;;
 +       -wince*)
+               os=-wince
 +               ;;
         -osfrose*)
                os=-osfrose
                ;;
@@ -757,12 +1030,18 @@
        -acis*)
                os=-aos
                ;;
+       -386bsd)
+               os=-bsd
 +               ;;
         -ctix* | -uts*)
                os=-sysv
                ;;
        -ns2 )
                os=-nextstep2
                ;;
+       -nsk)
+               os=-nsk
 +               ;;
         # Preserve the version number of sinix5.
        -sinix5.*)
                os=`echo $os | sed -e 's|sinix|sysv|'`
@@ -788,9 +1067,18 @@
        # This must come after -sysvr4.
        -sysv*)
                ;;
+       -ose*)
+               os=-ose
 +               ;;
 +       -es1800*)
+               os=-ose
 +               ;;
         -xenix)
                os=-xenix
                ;;
+        -*mint | -*MiNT)
 +               os=-mint
 +               ;;
         -none)
                ;;
        *)
@@ -816,6 +1104,9 @@
        *-acorn)
                os=-riscix1.2
                ;;
+       arm*-rebel)
 +               os=-linux
 +               ;;
         arm*-semi)
                os=-aout
                ;;
@@ -837,6 +1128,15 @@
                # default.
                # os=-sunos4
                ;;
+       m68*-cisco)
 +               os=-aout
 +               ;;
 +       mips*-cisco)
 +               os=-elf
 +               ;;
 +       mips*-*)
+               os=-elf
 +               ;;
         *-tti)  # must be before sparc entry or we get the wrong os.
                os=-sysv3
                ;;
@@ -846,12 +1146,18 @@
        *-be)
                os=-beos
                ;;
-       s390-ibm)
-               os=-os390  #  /* S/390 -- gil -- 1451 */
 -               ;;
         *-ibm)
                os=-aix
                ;;
+       *-wec)
+               os=-proelf
 +               ;;
 +       *-winbond)
 +               os=-proelf
 +               ;;
 +       *-oki)
+               os=-proelf
 +               ;;
         *-hp)
                os=-hpux
                ;;
@@ -915,6 +1221,18 @@
        f301-fujitsu)
                os=-uxpv
                ;;
+       *-rom68k)
+               os=-coff
 +               ;;
 +       *-*bug)
+               os=-coff
 +               ;;
 +       *-apple)
+               os=-macos
 +               ;;
 +       *-atari*)
+               os=-mint
 +               ;;
         *)
                os=-none
                ;;
@@ -936,9 +1254,15 @@
                        -aix*)
                                vendor=ibm
                                ;;
+                       -beos*)
 +                               vendor=be
 +                               ;;
                         -hpux*)
                                vendor=hp
                                ;;
+                       -mpeix*)
 +                               vendor=hp
 +                               ;;
                         -hiux*)
                                vendor=hitachi
                                ;;
@@ -954,7 +1278,7 @@
                        -genix*)
                                vendor=ns
                                ;;
-                       -mvs*)
 +                       -mvs* | -opened*)
                                 vendor=ibm
                                ;;
                        -ptx*)
@@ -966,9 +1290,26 @@
                        -aux*)
                                vendor=apple
                                ;;
+                       -hms*)
 +                               vendor=hitachi
 +                               ;;
 +                       -mpw* | -macos*)
 +                               vendor=apple
 +                               ;;
 +                       -*mint | -*MiNT)
 +                               vendor=atari
 +                               ;;
                 esac
                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
                ;;
 esac
 
 echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
 +# time-stamp-start: "version='"
+# time-stamp-format: "%:y-%02m-%02d"
 +# time-stamp-end: "'"
+# End:
Index: configure
--- xterm-139+/configure        Wed Jun 14 15:50:37 2000
 +++ xterm-140/configure Thu Jul 20 22:06:02 2000
 @@ -4310,7 +4310,8 @@
  for cf_path in default \
        /usr/contrib/X11R6 \
        /usr/contrib/X11R5 \
-       /usr/lib/X11R5
 +       /usr/lib/X11R5 \
 +       /usr/local
  do
 
        if test -z "$cf_x_athena_include" ; then
@@ -4319,13 +4320,13 @@
                if test $cf_path != default ; then
                        CFLAGS="-I$cf_path/include $cf_save"
                        echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
-echo "configure:4323: checking for $cf_test in $cf_path" >&5
 +echo "configure:4324: checking for $cf_test in $cf_path" >&5
                 else
                        echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
-echo "configure:4326: checking for $cf_test" >&5
 +echo "configure:4327: checking for $cf_test" >&5
                 fi
                cat > conftest.$ac_ext <<EOF
-#line 4329 "configure"
+#line 4330 "configure"
  #include "confdefs.h"
 
 #include <X11/Intrinsic.h>
@@ -4334,7 +4335,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 +if { (eval echo configure:4339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
   cf_result=yes
 else
@@ -4360,21 +4361,21 @@
                        if test $cf_path != default ; then
                                LIBS="-L$cf_path/lib $cf_lib $LIBS"
                                echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
-echo "configure:4364: checking for $cf_lib in $cf_path" >&5
 +echo "configure:4365: checking for $cf_lib in $cf_path" >&5
                         else
                                LIBS="$cf_lib $LIBS"
                                echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
-echo "configure:4368: checking for $cf_test in $cf_lib" >&5
 +echo "configure:4369: checking for $cf_test in $cf_lib" >&5
                         fi
                        cat > conftest.$ac_ext <<EOF
-#line 4371 "configure"
+#line 4372 "configure"
  #include "confdefs.h"
 
 int main() {
 $cf_test()
 ; return 0; }
 EOF
-if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 +if { (eval echo configure:4379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
   cf_result=yes
 else
@@ -4412,13 +4413,13 @@
 
 
 echo $ac_n "checking for declaration of fd_set""... $ac_c" 1>&6
-echo "configure:4416: checking for declaration of fd_set" >&5
 +echo "configure:4417: checking for declaration of fd_set" >&5
  if eval "test \"`echo '$''{'cf_cv_type_fd_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo "trying sys/types alone" 1>&5
 cat > conftest.$ac_ext <<EOF
-#line 4422 "configure"
+#line 4423 "configure"
  #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4426,7 +4427,7 @@
 fd_set x
 ; return 0; }
 EOF
-if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 +if { (eval echo configure:4431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
   cf_cv_type_fd_set=sys/types.h
 else
@@ -4435,7 +4436,7 @@
   rm -rf conftest*
   echo "trying X11/Xpoll.h" 1>&5
 cat > conftest.$ac_ext <<EOF
-#line 4439 "configure"
+#line 4440 "configure"
  #include "confdefs.h"
 
 #ifdef HAVE_X11_XPOLL_H
@@ -4445,7 +4446,7 @@
 fd_set x
 ; return 0; }
 EOF
-if { (eval echo configure:4449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 +if { (eval echo configure:4450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
   cf_cv_type_fd_set=X11/Xpoll.h
 else
@@ -4454,7 +4455,7 @@
   rm -rf conftest*
   echo "trying sys/select.h" 1>&5
 cat > conftest.$ac_ext <<EOF
-#line 4458 "configure"
+#line 4459 "configure"
  #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4463,7 +4464,7 @@
 fd_set x
 ; return 0; }
 EOF
-if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 +if { (eval echo configure:4468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
   cf_cv_type_fd_set=sys/select.h
 else
@@ -4489,13 +4490,13 @@
 
 
 echo $ac_n "checking for IRIX 6.5 baud-rate redefinitions""... $ac_c" 1>&6
-echo "configure:4493: checking for IRIX 6.5 baud-rate redefinitions" >&5
 +echo "configure:4494: checking for IRIX 6.5 baud-rate redefinitions" >&5
  if eval "test \"`echo '$''{'cf_cv_termio_c_ispeed'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 4499 "configure"
+#line 4500 "configure"
  #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4508,7 +4509,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 +if { (eval echo configure:4513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
   cf_cv_termio_c_ispeed=yes
 
@@ -4538,12 +4539,12 @@
 for ac_func in grantpt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4542: checking for $ac_func" >&5
 +echo "configure:4543: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4547 "configure"
+#line 4548 "configure"
  #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4566,7 +4567,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 +if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4588,7 +4589,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
-echo "configure:4592: checking for openpty in -lutil" >&5
 +echo "configure:4593: checking for openpty in -lutil" >&5
  ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4596,7 +4597,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lutil  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4600 "configure"
+#line 4601 "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
@@ -4607,7 +4608,7 @@
 openpty()
 ; return 0; }
 EOF
-if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 +if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4641,7 +4642,7 @@
 # Extract the first word of "xterm", so it can be a program name with args.
 set dummy xterm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4645: checking for $ac_word" >&5
 +echo "configure:4646: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_path_XTERM_PATH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4679,12 +4680,12 @@
        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4683: checking for $ac_func" >&5
 +echo "configure:4684: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4688 "configure"
+#line 4689 "configure"
  #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4707,7 +4708,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 +if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4733,7 +4734,7 @@
 
 
 echo $ac_n "checking if we should use imake to help""... $ac_c" 1>&6
-echo "configure:4737: checking if we should use imake to help" >&5
 +echo "configure:4738: checking if we should use imake to help" >&5
  
 # Check whether --enable-imake or --disable-imake was given.
 if test "${enable_imake+set}" = set; then
@@ -4758,7 +4759,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4762: checking for $ac_word" >&5
 +echo "configure:4763: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_path_IMAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4897,7 +4898,7 @@
 
 
 echo $ac_n "checking for default terminal-id""... $ac_c" 1>&6
-echo "configure:4901: checking for default terminal-id" >&5
 +echo "configure:4902: checking for default terminal-id" >&5
  
 # Check whether --with-terminal-id or --without-terminal-id was given.
 if test "${with_terminal_id+set}" = set; then
@@ -4918,7 +4919,7 @@
 
 
 echo $ac_n "checking for default terminal-type""... $ac_c" 1>&6
-echo "configure:4922: checking for default terminal-type" >&5
 +echo "configure:4923: checking for default terminal-type" >&5
  
 # Check whether --with-terminal-type or --without-terminal-type was given.
 if test "${with_terminal_type+set}" = set; then
@@ -4935,7 +4936,7 @@
 
 
 echo $ac_n "checking for private terminfo-directory""... $ac_c" 1>&6
-echo "configure:4939: checking for private terminfo-directory" >&5
 +echo "configure:4940: checking for private terminfo-directory" >&5
  
 # Check whether --with-own-terminfo or --without-own-terminfo was given.
 if test "${with_own_terminfo+set}" = set; then
@@ -4974,7 +4975,7 @@
 
 ###    checks for optional features
 echo $ac_n "checking if you want active-icons""... $ac_c" 1>&6
-echo "configure:4978: checking if you want active-icons" >&5
 +echo "configure:4979: checking if you want active-icons" >&5
  
 # Check whether --enable-active-icon or --disable-active-icon was given.
 if test "${enable_active_icon+set}" = set; then
@@ -5000,7 +5001,7 @@
 fi
 
 echo $ac_n "checking if you want ANSI color""... $ac_c" 1>&6
-echo "configure:5004: checking if you want ANSI color" >&5
 +echo "configure:5005: checking if you want ANSI color" >&5
  
 # Check whether --enable-ansi-color or --disable-ansi-color was given.
 if test "${enable_ansi_color+set}" = set; then
@@ -5026,7 +5027,7 @@
 if test $enable_ansi_color = yes ; then
 
        echo $ac_n "checking if you want 16 colors like aixterm""... $ac_c" 1>&6
-echo "configure:5030: checking if you want 16 colors like aixterm" >&5
 +echo "configure:5031: checking if you want 16 colors like aixterm" >&5
         
 # Check whether --enable-16-color or --disable-16-color was given.
 if test "${enable_16_color+set}" = set; then
@@ -5050,7 +5051,7 @@
 
 
        echo $ac_n "checking if you want 256 colors""... $ac_c" 1>&6
-echo "configure:5054: checking if you want 256 colors" >&5
 +echo "configure:5055: checking if you want 256 colors" >&5
         
 # Check whether --enable-256-color or --disable-256-color was given.
 if test "${enable_256_color+set}" = set; then
@@ -5077,7 +5078,7 @@
 
        else
        echo $ac_n "checking if you want 88 colors""... $ac_c" 1>&6
-echo "configure:5081: checking if you want 88 colors" >&5
 +echo "configure:5082: checking if you want 88 colors" >&5
         
 # Check whether --enable-88-color or --disable-88-color was given.
 if test "${enable_88_color+set}" = set; then
@@ -5108,7 +5109,7 @@
 fi
 
 echo $ac_n "checking if you want blinking cursor""... $ac_c" 1>&6
-echo "configure:5112: checking if you want blinking cursor" >&5
 +echo "configure:5113: checking if you want blinking cursor" >&5
  
 # Check whether --enable-blink-cursor or --disable-blink-cursor was given.
 if test "${enable_blink_cursor+set}" = set; then
@@ -5134,7 +5135,7 @@
 if test $enable_ansi_color = yes ; then
 
        echo $ac_n "checking if you want bold colors mapped like IBM PC""... $ac_c" 1>&6
-echo "configure:5138: checking if you want bold colors mapped like IBM PC" >&5
 +echo "configure:5139: checking if you want bold colors mapped like IBM PC" >&5
         
 # Check whether --enable-bold-color or --disable-bold-color was given.
 if test "${enable_bold_color+set}" = set; then
@@ -5158,7 +5159,7 @@
 
 
        echo $ac_n "checking if you want color-mode enabled by default""... $ac_c" 1>&6
-echo "configure:5162: checking if you want color-mode enabled by default" >&5
 +echo "configure:5163: checking if you want color-mode enabled by default" >&5
         
 # Check whether --enable-color-mode or --disable-color-mode was given.
 if test "${enable_color_mode+set}" = set; then
@@ -5184,7 +5185,7 @@
 fi
 
 echo $ac_n "checking if you want support for color highlighting""... $ac_c" 1>&6
-echo "configure:5188: checking if you want support for color highlighting" >&5
 +echo "configure:5189: checking if you want support for color highlighting" >&5
  
 # Check whether --enable-highlighting or --disable-highlighting was given.
 if test "${enable_highlighting+set}" = set; then
@@ -5208,7 +5209,7 @@
 
 
 echo $ac_n "checking if you want support for doublesize characters""... $ac_c" 1>&6
-echo "configure:5212: checking if you want support for doublesize characters" >&5
 +echo "configure:5213: checking if you want support for doublesize characters" >&5
  
 # Check whether --enable-doublechars or --disable-doublechars was given.
 if test "${enable_doublechars+set}" = set; then
@@ -5232,7 +5233,7 @@
 
 
 echo $ac_n "checking if you want fallback-support for box characters""... $ac_c" 1>&6
-echo "configure:5236: checking if you want fallback-support for box characters" >&5
 +echo "configure:5237: checking if you want fallback-support for box characters" >&5
  
 # Check whether --enable-boxchars or --disable-boxchars was given.
 if test "${enable_boxchars+set}" = set; then
@@ -5256,7 +5257,7 @@
 
 
 echo $ac_n "checking if you want support for HP-style function keys""... $ac_c" 1>&6
-echo "configure:5260: checking if you want support for HP-style function keys" >&5
 +echo "configure:5261: checking if you want support for HP-style function keys" >&5
  
 # Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
 if test "${enable_hp_fkeys+set}" = set; then
@@ -5282,7 +5283,7 @@
 fi
 
 echo $ac_n "checking if you want support for SCO-style function keys""... $ac_c" 1>&6
-echo "configure:5286: checking if you want support for SCO-style function keys" >&5
 +echo "configure:5287: checking if you want support for SCO-style function keys" >&5
  
 # Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
 if test "${enable_sco_fkeys+set}" = set; then
@@ -5308,7 +5309,7 @@
 fi
 
 echo $ac_n "checking if you want support for internationalization""... $ac_c" 1>&6
-echo "configure:5312: checking if you want support for internationalization" >&5
 +echo "configure:5313: checking if you want support for internationalization" >&5
  
 # Check whether --enable-i18n or --disable-i18n was given.
 if test "${enable_i18n+set}" = set; then
@@ -5334,7 +5335,7 @@
 fi
 
 echo $ac_n "checking if you want support for initial-erase setup""... $ac_c" 1>&6
-echo "configure:5338: checking if you want support for initial-erase setup" >&5
 +echo "configure:5339: checking if you want support for initial-erase setup" >&5
  
 # Check whether --enable-initial-erase or --disable-initial-erase was given.
 if test "${enable_initial_erase+set}" = set; then
@@ -5360,7 +5361,7 @@
 fi
 
 echo $ac_n "checking if you want support for input-method""... $ac_c" 1>&6
-echo "configure:5364: checking if you want support for input-method" >&5
 +echo "configure:5365: checking if you want support for input-method" >&5
  
 # Check whether --enable-input-method or --disable-input-method was given.
 if test "${enable_input_method+set}" = set; then
@@ -5380,13 +5381,13 @@
 echo "$ac_t""$enable_ximp" 1>&6
 
 echo $ac_n "checking if X libraries support input-method""... $ac_c" 1>&6
-echo "configure:5384: checking if X libraries support input-method" >&5
 +echo "configure:5385: checking if X libraries support input-method" >&5
  if eval "test \"`echo '$''{'cf_cv_input_method'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 5390 "configure"
+#line 5391 "configure"
  #include "confdefs.h"
 
 #include <X11/IntrinsicP.h>
@@ -5413,7 +5414,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 +if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
   cf_cv_input_method=yes
 else
@@ -5436,7 +5437,7 @@
 fi
 
 echo $ac_n "checking if you want support for logging""... $ac_c" 1>&6
-echo "configure:5440: checking if you want support for logging" >&5
 +echo "configure:5441: checking if you want support for logging" >&5
  
 # Check whether --enable-logging or --disable-logging was given.
 if test "${enable_logging+set}" = set; then
@@ -5460,7 +5461,7 @@
 EOF
 
        echo $ac_n "checking if you want to allow logging via a pipe""... $ac_c" 1>&6
-echo "configure:5464: checking if you want to allow logging via a pipe" >&5
 +echo "configure:5465: checking if you want to allow logging via a pipe" >&5
         
 # Check whether --enable-logfile-exec or --disable-logfile-exec was given.
 if test "${enable_logfile_exec+set}" = set; then
@@ -5487,7 +5488,7 @@
 fi
 
 echo $ac_n "checking if you want support for iconify/maximize translations""... $ac_c" 1>&6
-echo "configure:5491: checking if you want support for iconify/maximize translations" >&5
 +echo "configure:5492: checking if you want support for iconify/maximize translations" >&5
  
 # Check whether --enable-maximize or --disable-maximize was given.
 if test "${enable_maximize+set}" = set; then
@@ -5511,7 +5512,7 @@
 
 
 echo $ac_n "checking if you want NumLock to override keyboard tables""... $ac_c" 1>&6
-echo "configure:5515: checking if you want NumLock to override keyboard tables" >&5
 +echo "configure:5516: checking if you want NumLock to override keyboard tables" >&5
  
 # Check whether --enable-num-lock or --disable-num-lock was given.
 if test "${enable_num_lock+set}" = set; then
@@ -5535,7 +5536,7 @@
 
 
 echo $ac_n "checking if you want support for right-scrollbar""... $ac_c" 1>&6
-echo "configure:5539: checking if you want support for right-scrollbar" >&5
 +echo "configure:5540: checking if you want support for right-scrollbar" >&5
  
 # Check whether --enable-rightbar or --disable-rightbar was given.
 if test "${enable_rightbar+set}" = set; then
@@ -5561,7 +5562,7 @@
 fi
 
 echo $ac_n "checking if you want check for redundant name-change""... $ac_c" 1>&6
-echo "configure:5565: checking if you want check for redundant name-change" >&5
 +echo "configure:5566: checking if you want check for redundant name-change" >&5
  
 # Check whether --enable-samename or --disable-samename was given.
 if test "${enable_samename+set}" = set; then
@@ -5585,7 +5586,7 @@
 
 
 echo $ac_n "checking if you want support for tek4014""... $ac_c" 1>&6
-echo "configure:5589: checking if you want support for tek4014" >&5
 +echo "configure:5590: checking if you want support for tek4014" >&5
  
 # Check whether --enable-tek4014 or --disable-tek4014 was given.
 if test "${enable_tek4014+set}" = set; then
@@ -5615,7 +5616,7 @@
 fi
 
 echo $ac_n "checking if you want pulldown menus with a toolbar""... $ac_c" 1>&6
-echo "configure:5619: checking if you want pulldown menus with a toolbar" >&5
 +echo "configure:5620: checking if you want pulldown menus with a toolbar" >&5
  
 # Check whether --enable-toolbar or --disable-toolbar was given.
 if test "${enable_toolbar+set}" = set; then
@@ -5639,7 +5640,7 @@
 
 
 echo $ac_n "checking if you want VT52 emulation""... $ac_c" 1>&6
-echo "configure:5643: checking if you want VT52 emulation" >&5
 +echo "configure:5644: checking if you want VT52 emulation" >&5
  
 # Check whether --enable-vt52 or --disable-vt52 was given.
 if test "${enable_vt52+set}" = set; then
@@ -5663,7 +5664,7 @@
 
 
 echo $ac_n "checking if you want wide-character support""... $ac_c" 1>&6
-echo "configure:5667: checking if you want wide-character support" >&5
 +echo "configure:5668: checking if you want wide-character support" >&5
  
 # Check whether --enable-wide-chars or --disable-wide-chars was given.
 if test "${enable_wide_chars+set}" = set; then
@@ -5692,7 +5693,7 @@
 fi
 
 echo $ac_n "checking if you want DECterm Locator support""... $ac_c" 1>&6
-echo "configure:5696: checking if you want DECterm Locator support" >&5
 +echo "configure:5697: checking if you want DECterm Locator support" >&5
  
 # Check whether --enable-dec-locator or --disable-dec-locator was given.
 if test "${enable_dec_locator+set}" = set; then
@@ -5718,7 +5719,7 @@
 fi
 
 echo $ac_n "checking if you want -ziconbeep option""... $ac_c" 1>&6
-echo "configure:5722: checking if you want -ziconbeep option" >&5
 +echo "configure:5723: checking if you want -ziconbeep option" >&5
  
 # Check whether --enable-ziconbeep or --disable-ziconbeep was given.
 if test "${enable_ziconbeep+set}" = set; then
@@ -5743,7 +5744,7 @@
 
 # development/testing aids
 echo $ac_n "checking if you want debugging traces""... $ac_c" 1>&6
-echo "configure:5747: checking if you want debugging traces" >&5
 +echo "configure:5748: checking if you want debugging traces" >&5
  
 # Check whether --enable-trace or --disable-trace was given.
 if test "${enable_trace+set}" = set; then
@@ -5772,7 +5773,7 @@
 
 
 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
-echo "configure:5776: checking if you want to see long compiling messages" >&5
 +echo "configure:5777: checking if you want to see long compiling messages" >&5
  
 # Check whether --enable-echo or --disable-echo was given.
 if test "${enable_echo+set}" = set; then
@@ -5812,7 +5813,7 @@
 
 
 echo $ac_n "checking if you want magic cookie emulation""... $ac_c" 1>&6
-echo "configure:5816: checking if you want magic cookie emulation" >&5
 +echo "configure:5817: checking if you want magic cookie emulation" >&5
  
 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
 if test "${enable_xmc_glitch+set}" = set; then
@@ -5841,7 +5842,7 @@
 
 if test -n "$GCC" ; then
 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
-echo "configure:5845: checking if you want to turn on gcc warnings" >&5
 +echo "configure:5846: checking if you want to turn on gcc warnings" >&5
  
 # Check whether --enable-warnings or --disable-warnings was given.
 if test "${enable_warnings+set}" = set; then
@@ -5881,9 +5882,9 @@
 if test -n "$GCC"
 then
        echo "checking for $CC __attribute__ directives" 1>&6
-echo "configure:5885: checking for $CC __attribute__ directives" >&5
 +echo "configure:5886: checking for $CC __attribute__ directives" >&5
         cat > conftest.$ac_ext <<EOF
-#line 5887 "configure"
+#line 5888 "configure"
  #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -5921,7 +5922,7 @@
 EOF
                        ;;
                esac
-               if { (eval echo configure:5925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 +               if { (eval echo configure:5926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                         test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
                        cat conftest.h >>confdefs.h
 #              else
@@ -5938,11 +5939,11 @@
 if test -n "$GCC"
 then
                cat > conftest.$ac_ext <<EOF
-#line 5942 "configure"
+#line 5943 "configure"
  int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
 EOF
                echo "checking for $CC warning options" 1>&6
-echo "configure:5946: checking for $CC warning options" >&5
 +echo "configure:5947: checking for $CC warning options" >&5
         cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS="-W -Wall"
        cf_warn_CONST=""
@@ -5960,7 +5961,7 @@
                Wstrict-prototypes $cf_warn_CONST
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-               if { (eval echo configure:5964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 +               if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                         test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
                        test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
Index: ctlseqs.ms
--- xterm-139+/ctlseqs.ms       Wed Jun 14 15:50:37 2000
 +++ xterm-140/ctlseqs.ms        Sun Jul 23 16:30:38 2000
 @@ -556,6 +556,21 @@
  or
 \*(Dc\*0\*$\*r\*(Pt\*s\*(ST
 for invalid requests.
+.
+.IP \\*(Dc\\*+\\*q\\*(Pt\\*s\\*(ST
+Request Termcap/Terminfo String (xterm, experimental).
 +The string following the "q" is a list of names separated by \*;
 +which correspond to termcap or terminfo key names.
 +.br
+\fIxterm\fP responds with
+\*(Dc\*1\*+\*r\*(Pt\*s\*(ST
 +for valid requests, replacing the \*(Pt with the corresponding
 +strings that xterm would send,
+or
 +\*(Dc\*0\*+\*r\*(Pt\*s\*(ST
+for invalid requests.
+The strings are encoded in hexadecimal (2 digits per character), and are 
 +separated by \*; if more than one name was requested.
  .Ed
 .\"
 .St
Index: input.c
--- xterm-139+/input.c  Wed Jun 14 15:50:37 2000
 +++ xterm-140/input.c   Sun Jul 23 16:19:48 2000
 @@ -342,6 +342,13 @@
         if (keyboard->flags & MODE_KAM)
                return;
 
+#if OPT_TCAP_QUERY
+       if (screen->tc_query >= 0) {
 +               keysym = screen->tc_query;
 +               strbuf[0] = 0;
 +       }
+       else
 +#endif
 #if OPT_I18N_SUPPORT
        if (screen->xic
 #if OPT_WIDE_CHARS
@@ -1085,3 +1092,95 @@
     }
 }
 #endif /* OPT_NUM_LOCK */
+
+#if OPT_TCAP_QUERY
+/*
+ * Parse the termcap/terminfo name from the string, returning a positive number
 + * (the keysym) if found, otherwise -1.  Update the string pointer.
 + */
+int
+xtermcapKeycode(char **params)
+{
 +#define DATA(tc,ti,x) { tc, ti, x }
 +       static struct {
 +               char *tc;
 +               char *ti;
 +               int code;
 +       } table[] = {
 +               DATA(   "%1",   "khlp",         XK_Help),
 +               DATA(   "*6",   "kslt",         XK_Select),
 +               DATA(   "@0",   "kfnd",         XK_Find),
 +               DATA(   "@7",   "kend",         XK_End),
 +               DATA(   "F1",   "kf11",         XK_F11),
 +               DATA(   "F2",   "kf12",         XK_F12),
 +               DATA(   "F3",   "kf13",         XK_F13),
 +               DATA(   "F4",   "kf14",         XK_F14),
 +               DATA(   "F5",   "kf15",         XK_F15),
 +               DATA(   "F6",   "kf16",         XK_F16),
 +               DATA(   "F7",   "kf17",         XK_F17),
 +               DATA(   "F8",   "kf18",         XK_F18),
 +               DATA(   "F9",   "kf19",         XK_F19),
 +               DATA(   "FA",   "kf20",         XK_F20),
 +               DATA(   "FB",   "kf21",         XK_F21),
 +               DATA(   "FC",   "kf22",         XK_F22),
 +               DATA(   "FD",   "kf23",         XK_F23),
 +               DATA(   "FE",   "kf24",         XK_F24),
 +               DATA(   "FF",   "kf25",         XK_F25),
 +               DATA(   "FG",   "kf26",         XK_F26),
 +               DATA(   "FH",   "kf27",         XK_F27),
 +               DATA(   "FI",   "kf28",         XK_F28),
 +               DATA(   "FJ",   "kf29",         XK_F29),
 +               DATA(   "FK",   "kf30",         XK_F30),
 +               DATA(   "FL",   "kf31",         XK_F31),
 +               DATA(   "FM",   "kf32",         XK_F32),
 +               DATA(   "FN",   "kf33",         XK_F33),
 +               DATA(   "FO",   "kf34",         XK_F34),
 +               DATA(   "FP",   "kf35",         XK_F35),
 +               DATA(   "FQ",   "kf36",         SunXK_F36),
 +               DATA(   "FR",   "kf37",         SunXK_F37),
 +               DATA(   "k1",   "kf1",          XK_F1),
 +               DATA(   "k2",   "kf2",          XK_F2),
 +               DATA(   "k3",   "kf3",          XK_F3),
 +               DATA(   "k4",   "kf4",          XK_F4),
 +               DATA(   "k5",   "kf5",          XK_F5),
 +               DATA(   "k6",   "kf6",          XK_F6),
 +               DATA(   "k7",   "kf7",          XK_F7),
 +               DATA(   "k8",   "kf8",          XK_F8),
 +               DATA(   "k9",   "kf9",          XK_F9),
 +               DATA(   "k;",   "kf10",         XK_F10), /* cannot termcap */
 +               DATA(   "kB",   "kcbt",         XK_ISO_Left_Tab),
 +               DATA(   "kC",   "kclr",         XK_Clear),
 +               DATA(   "kD",   "kdch1",        XK_Delete),
 +               DATA(   "kI",   "kich1",        XK_Insert),
 +               DATA(   "kN",   "knp",          XK_Next),
 +               DATA(   "kP",   "kpp",          XK_Prior),
 +               DATA(   "kb",   "kbs",          XK_BackSpace),
 +               DATA(   "kd",   "kcud1",        XK_Down),
 +               DATA(   "kh",   "khome",        XK_Home),
 +               DATA(   "kl",   "kcub1",        XK_Left),
 +               DATA(   "kr",   "kcuf1",        XK_Right),
 +               DATA(   "ku",   "kcuu1",        XK_Up),
 +       };
+       Cardinal n;
 +       unsigned len = 0;
 +       int save = 0;
 +       int code = -1;
 +
+       while ((*params)[len] != 0 && (*params)[len] != ';')
 +               len++;
 +       save = (*params)[len];
 +       (*params)[len] = 0;
 +
+       for (n = 0; n < XtNumber(table); n++) {
 +               if (!strcmp(table[n].ti, *params)
 +                || !strcmp(table[n].tc, *params)) {
 +                       code = table[n].code;
 +                       break;
 +               }
 +       }
+       if (((*params)[len] = save) != 0)
 +               len++;
 +       *params = *params + len;
 +       return code;
 +}
+#endif
Index: main.c
--- xterm-139+/main.c   Sat Jun 17 23:04:47 2000
 +++ xterm-140/main.c    Sun Jul 23 15:57:52 2000
 @@ -1306,7 +1306,6 @@
         /* Do these first, since we may not be able to open the display */
        ProgramName = argv[0];
        if (argc > 1) {
-               int n;
                 if (abbrev(argv[1], "-version"))
                        Version();
                if (abbrev(argv[1], "-help"))
@@ -2705,7 +2704,7 @@
                 */
                TRACE_CHILD
 #if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(SCO325) || defined(__QNX__)
-               int pgrp = setsid();
 +               int pgrp = setsid();    /* variable may not be used... */
  #else
                int pgrp = getpid();
 #endif
@@ -3280,7 +3279,9 @@
 #endif /* CRAY */
                }
 
-#ifndef        USE_SYSV_PGRP
 +#if defined(__QNX__)
+               tcsetpgrp( 0, pgrp /*setsid()*/ );
 +#elif !defined(USE_SYSV_PGRP)
 #ifdef TIOCSCTTY
                setsid();
                ioctl(0, TIOCSCTTY, 0);
@@ -3290,10 +3291,6 @@
                close(open(ttydev, O_WRONLY, 0));
                setpgrp (0, pgrp);
 #endif /* !USE_SYSV_PGRP */
-
-#if defined(__QNX__)
-               tcsetpgrp( 0, pgrp /*setsid()*/ );
 -#endif
 
 #endif /* AMOEBA */
 
Index: misc.c
--- xterm-139+/misc.c   Wed Jun 14 15:50:37 2000
 +++ xterm-140/misc.c    Sun Jul 23 16:33:36 2000
 @@ -1385,12 +1385,25 @@
  void
 do_dcs(Char *dcsbuf, size_t dcslen)
 {
-       register TScreen *screen = &term->screen;
 +       TScreen *screen = &term->screen;
 +       char reply[BUFSIZ];
         char *cp = (char *)dcsbuf;
-
-       if (*cp == '$') { /* DECRQSS */
 -               char reply[BUFSIZ];
 -               Bool okay = True;
 +       Bool okay;
 +       Bool clear_all;
 +       Bool lock_keys;
 +#if OPT_TCAP_QUERY
+       char *tmp;
 +#endif
+
+       TRACE(("do_dcs(%s:%d)\n", (char *)dcsbuf, dcslen));
 +
+       if (dcslen != strlen(cp))
 +               /* shouldn't have nulls in the string */
 +               return;
 +
+       switch (*cp) {          /* intermediate character, or parameter */
 +       case '$':               /* DECRQSS */
 +               okay = True;
  
                cp++;
                if (*cp++ == 'q') {
@@ -1481,68 +1494,103 @@
                } else {
                        unparseputc(CAN, screen->respond);
                }
-       } else { /* DECUDK */
 -               Bool clear_all = True;
 -               Bool lock_keys = True;
 -
-               if (dcslen != strlen(cp))
 -                       /* shouldn't have nulls in the string */
 -                       return;
 -
-               if (*cp == '0') {
 -                       cp++;
 -               } else if (*cp == '1') {
 -                       cp++;
 -                       clear_all = False;
 -               }
 -
-               if (*cp == ';')
 -                       cp++;
 -               else if (*cp != '|')
 -                       return;
 -
-               if (*cp == '0') {
 -                       cp++;
 -               } else if (*cp == '1') {
 -                       cp++;
 -                       lock_keys = False;
 +               break;
 +#if OPT_TCAP_QUERY
+       case '+':
 +               cp++;
 +               if (*cp == 'q') {
 +                       okay = True;
 +                       for (tmp = ++cp; *tmp;) {
 +                               if (xtermcapKeycode(&tmp) < 0) {
 +                                       okay = False;
 +                                       break;
 +                               }
 +                       }
 +                       unparseputc1(DCS, screen->respond);
 +                       unparseputc(okay ? '1' : '0', screen->respond);
 +                       unparseputc('+', screen->respond);
 +                       unparseputc('r', screen->respond);
 +                       if (okay) {
 +                               int code;
 +                               int count = 0;
 +                               for (tmp = cp; *tmp;) {
 +                                       screen->tc_query = -1;
+                                       if ((code = xtermcapKeycode(&tmp)) >= 0) {
 +                                               XKeyEvent event;
 +                                               event.state = 0;
 +                                               if (count++)
 +                                                       unparseputc(';', screen->respond);
 +                                               screen->tc_query = code;
 +                                               Input (&(term->keyboard),
 +                                                       screen, &event, False);
 +                                               screen->tc_query = -1;
 +                                       }
 +                               }
 +                       }
 +                       unparseputc1(ST, screen->respond);
                 }
+               break;
 +#endif
+       default:
+               if (isdigit(*cp)) { /* digits are DECUDK, otherwise ignore */
 +                       clear_all = True;
 +                       lock_keys = True;
  
-               if (*cp++ != '|')
 -                       return;
 +                       if (*cp == '0') {
 +                               cp++;
 +                       } else if (*cp == '1') {
 +                               cp++;
 +                               clear_all = False;
 +                       }
  
-               if (clear_all)
 -                       reset_decudk();
 +                       if (*cp == ';')
 +                               cp++;
 +                       else if (*cp != '|')
 +                               return;
  
-               while (*cp) {
 -                       char *str = (char *)malloc(strlen(cp) + 2);
 -                       unsigned key = 0;
 -                       int len = 0;
 -
-                       while (isdigit(*cp))
 -                               key = (key * 10) + (*cp++ - '0');
 -                       if (*cp == '/') {
 +                       if (*cp == '0') {
 +                               cp++;
 +                       } else if (*cp == '1') {
                                 cp++;
-                               while (*cp != ';' && *cp != '\0') {
 -                                       int hi = hexvalue(*cp++);
 -                                       int lo = hexvalue(*cp++);
 -                                       if (hi >= 0 && lo >= 0)
 +                               lock_keys = False;
 +                       }
 +
+                       if (*cp++ != '|')
 +                               return;
 +
+                       if (clear_all)
 +                               reset_decudk();
 +
+                       while (*cp) {
 +                               char *str = (char *)malloc(strlen(cp) + 2);
 +                               unsigned key = 0;
 +                               int len = 0;
 +
+                               while (isdigit(*cp))
 +                                       key = (key * 10) + (*cp++ - '0');
 +                               if (*cp == '/') {
 +                                       cp++;
 +                                       while (*cp != ';' && *cp != '\0') {
 +                                               int hi = hexvalue(*cp++);
 +                                               int lo = hexvalue(*cp++);
 +                                               if (hi < 0 || lo < 0)
 +                                                       return;
                                                 str[len++] = (hi << 4) | lo;
-                                       else
 -                                               return;
 +                                       }
                                 }
+                               if (len > 0 && key < MAX_UDK) {
 +                                       if (user_keys[key].str != 0)
 +                                               free(user_keys[key].str);
 +                                       user_keys[key].str = str;
 +                                       user_keys[key].len = len;
 +                               } else {
 +                                       free(str);
 +                               }
 +                               if (*cp == ';')
 +                                       cp++;
                         }
-                       if (len > 0 && key < MAX_UDK) {
 -                               if (user_keys[key].str != 0)
 -                                       free(user_keys[key].str);
 -                               user_keys[key].str = str;
 -                               user_keys[key].len = len;
 -                       } else {
 -                               free(str);
 -                       }
 -                       if (*cp == ';')
 -                               cp++;
                 }
+               break;
         }
 }
 
Index: ptyx.h
--- xterm-139+/ptyx.h   Wed Jun 14 15:50:37 2000
 +++ xterm-140/ptyx.h    Sun Jul 23 16:35:57 2000
 @@ -461,6 +461,10 @@
  #define OPT_SUNPC_KBD  1 /* true if xterm supports Sun/PC keyboard map */
 #endif
 
+#ifndef OPT_TCAP_QUERY
+#define OPT_TCAP_QUERY 0 /* true for experimental termcap query */
 +#endif
+
 #ifndef OPT_TEK4014
 #define OPT_TEK4014     1 /* true if we're using tek4014 emulation */
 #endif
@@ -891,6 +895,9 @@
        Display         *display;       /* X display for screen         */
        int             respond;        /* socket for responses
                                           (position report, etc.)      */
+#if OPT_TCAP_QUERY
+       int             tc_query;
 +#endif
 #ifdef AMOEBA
        capability      proccap;        /* process capability           */
        struct circbuf  *tty_inq;       /* tty server input queue       */
Index: version.h
--- xterm-139+/version.h        Sat Jun 17 22:52:21 2000
 +++ xterm-140/version.h Sun Jul 23 18:30:28 2000
 @@ -6,5 +6,5 @@
   * XFree86 to which this version of xterm has been built.  The number in
  * parentheses is my patch number (T.Dickey).
  */
-#define XTERM_PATCH   139
-#define XFREE86_VERSION "XFree86 4.0d"
 +#define XTERM_PATCH   140
+#define XFREE86_VERSION "XFree86 4.0.1"
 Index: xterm.h
--- xterm-139+/xterm.h  Wed Jun 14 15:50:37 2000
 +++ xterm-140/xterm.h   Sun Jul 23 14:11:35 2000
 @@ -531,6 +531,10 @@
  extern void VTInitModifiers(void);
 #endif
 
+#if OPT_TCAP_QUERY
+extern int xtermcapKeycode(char **params);
 +#endif
+
 #if OPT_WIDE_CHARS
 extern int convertFromUTF8(unsigned long c, Char *strbuf);
 #endif
Index: xterm.log.html
--- xterm-139+/xterm.log.html   Sat Jun 17 23:09:42 2000
 +++ xterm-140/xterm.log.html    Sun Jul 23 22:03:00 2000
 @@ -42,6 +42,7 @@
  xc/programs/Xserver/hw/xfree86).
 
 <UL>
+<LI><A HREF="#xterm_140">Patch #140 - 2000/7/23 - XFree86 4.0.1</A>
  <LI><A HREF="#xterm_139">Patch #139 - 2000/6/17 - XFree86 4.0d</A>
 <LI><A HREF="#xterm_138">Patch #138 - 2000/6/15 - XFree86 4.0c</A>
 <LI><A HREF="#xterm_137">Patch #137 - 2000/6/10 - XFree86 4.0b</A>
@@ -183,6 +184,31 @@
 <LI><A HREF="#xterm_02">Patch #2 - 1996/1/7</A>
 <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
 </UL>
+
+<H1><A NAME="xterm_140">Patch #140 - 2000/7/23 - XFree86 4.0.1</A></H1>
 +<ul>
+       <li>modify Makefile.in to circumvent GNU make's built-in suffix rule
 +         for ".sh" which confuses install.sh with the "make install" target
 +         (report/patch by Paul Gilmartin).
 +
+       <li>implement an experimental control sequence which an application may
 +         use to query the terminal to determine what sequence of characters it
 +         would send for a given function key.  This is ifdef'd with
 +         OPT_TCAP_QUERY (request by Bram Moolenaar).
 +
+       <li>add /usr/local to search path in CF_X_ATHENA configure macro
 +         to build with Xaw3d on OpenBSD (patch by Christian Weisgerber).
 +
+       <li>add missing <code>#undef HAVE_TERMIO_C_ISPEED</code> to
 +         xtermcfg.hin, omitted in patch #133 fix for IRIX 6.5 baudrate (report
 +         by Alain Filbois <Alain.Filbois@loria.fr>).
 +
+       <li>correct a few errors in xterm.man:  font in filename example for
 +         Tektronix emulation, and description of -nul/+nul command-line
 +         options (report by Eric Fischer <enf@pobox.com>).
 +
+       <li>update config.guess and config.sub (from tin and lynx)
 +</ul>
 
 <H1><A NAME="xterm_139">Patch #139 - 2000/6/17 - XFree86 4.0d</A></H1>
 <ul>
Index: xterm.man
--- xterm-139+/xterm.man        Wed Jun 14 15:50:37 2000
 +++ xterm-140/xterm.man Thu Jul 20 19:18:30 2000
 @@ -123,7 +123,7 @@
  .B Tektronix
 menu; see below).
 The name of the file will be
-``\fBCOPY\fIyyyy\fB\-\fIMM\fB\-\fIdd\fB.\fIhh\fB:\fImm\fB:\fIss\fP'', where
 +``\fBCOPY\fIyyyy\fB\-\fIMM\fB\-\fIdd\fB.\fIhh\fB:\fImm\fB:\fIss\fR'', where
  .IR yyyy ,
 .IR MM ,
 .IR dd ,
@@ -439,10 +439,10 @@
 at which the margin bell, if enabled, will ring.  The default is 10.
 .TP 8
 .B "\-nul"
-This option enables the display of underlining.
 +This option disables the display of underlining.
  .TP 8
 .B "\+nul"
-This option disables the display of underlining.
 +This option enables the display of underlining.
  .TP 8
 .B \-pc
 This option enables the PC-style use of bold colors (see boldColors
@@ -2050,9 +2050,10 @@
 above or below the base volume.
 .TP 8
 .B "clear-saved-lines()"
-This action does \fBhard-reset()\fP (see above) and also clears the history
 +This action does \fBhard-reset()\fP (see below) and also clears the history
  of lines saved off the top of the screen.
 It is also invoked from the \fBclearsavedlines\fP entry in \fIvtMenu\fP.
+The effect is identical to a hardware reset (RIS) control sequence.
  .TP 8
 .B "create-menu(\fIm/v/f/t\fP)"
 This action creates one of the menus used by \fIxterm\fP,
@@ -2348,6 +2349,7 @@
 .B "soft-reset()"
 This action resets the scrolling region and is also invoked from the
 \fBsoftreset\fP entry in \fIvtMenu\fP.
+The effect is identical to a soft reset (DECSTR) control sequence.
  .TP 8
 .B "start-extend()"
 This action is similar to \fBselect-start\fP except that the
Index: xtermcfg.hin
--- xterm-139+/xtermcfg.hin     Wed Jun 14 15:50:37 2000
 +++ xterm-140/xtermcfg.hin      Thu Jul 20 07:12:20 2000
 @@ -47,6 +47,7 @@
  #undef HAVE_TCGETATTR          /* AC_CHECK_FUNCS(tcgetattr) */
 #undef HAVE_TERMCAP_H          /* AC_CHECK_HEADERS(termcap.h) */
 #undef HAVE_TERMIOS_H          /* AC_CHECK_HEADERS(termios.h) */
+#undef HAVE_TERMIO_C_ISPEED    /* CF_TERMIO_C_ISPEED */
  #undef HAVE_UNISTD_H           /* AC_CHECK_HEADERS(unistd.h) */
 #undef HAVE_UTMP               /* CF_UTMP */
 #undef HAVE_UTMP_UT_HOST       /* CF_UTMP_UT_HOST */