changeset 157:6b37e6ddd302 r20-3b5

Import from CVS: tag r20-3b5
author cvs
date Mon, 13 Aug 2007 09:40:41 +0200
parents 60baf0b43294
children 558dfa75ffb3
files CHANGES-beta ChangeLog configure configure.in dynodump/Makefile.in.in etc/HELLO etc/NEWS lib-src/Makefile.in.in lib-src/etags.c lib-src/movemail.c lib-src/profile.c lisp/ChangeLog lisp/bytecomp/bytecomp.el lisp/custom/ChangeLog lisp/custom/cus-edit.el lisp/custom/cus-face.el lisp/custom/custom.el lisp/custom/wid-browse.el lisp/custom/wid-edit.el lisp/custom/widget-example.el lisp/custom/widget.el lisp/gnus/ChangeLog lisp/gnus/gnus-msg.el lisp/its/its-hira.el lisp/its/its-kata.el lisp/modes/cc-mode.el lisp/modes/cperl-mode.el lisp/packages/etags.el lisp/prim/about.el lisp/prim/files.el lisp/prim/keydefs.el lisp/utils/savehist.el lisp/version.el lisp/vm/vm-vars.el lwlib/Makefile.in.in lwlib/config.h.in lwlib/lwlib-Xaw.c lwlib/lwlib-Xlw.c lwlib/lwlib-Xm.c lwlib/lwlib-config.c lwlib/lwlib-utils.c lwlib/xlwmenu.c lwlib/xlwscrollbar.c man/widget.texi mule-doc/demo src/ChangeLog src/Makefile.in.in src/balloon-x.c src/balloon_help.c src/config.h.in src/database.c src/device-x.c src/energize.c src/event-Xt.c src/events.c src/glyphs-x.h src/gui-x.h src/keymap.c src/lisp.h src/mule-wnnfns.c src/redisplay.c src/regex.c src/s/bsdos2.h src/s/freebsd.h src/s/linux.h src/s/netbsd.h src/s/sol2-5.h src/s/sol2-6.h src/s/sol2-static.h src/s/sol2.h src/s/sunos4-0-shr.h src/s/sunos4-0.h src/s/sunos4-1-2-shr.h src/s/sunos4-1-3-shr.h src/s/sunos4-1-4-shr.h src/s/sunos4-1-shr.h src/s/sunos4-1.h src/sysdep.c src/xmmanagerp.h src/xmprimitivep.h
diffstat 80 files changed, 1841 insertions(+), 1878 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 09:39:46 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 09:40:41 2007 +0200
@@ -1,4 +1,10 @@
 							-*- indented-text -*-
+to 20.3 beta5.
+-- Configure patches continued from Martin Buchholz
+-- Miscellaneous Bug Fixes from various people (see ChangeLogs)
+-- custom-1.9908
+-- Moved mule-doc/demo to etc/HELLO for the mule menu.
+
 to 20.3 beta4.
 -- miscellaneous bug fixes
 -- various about.el additions & updates
--- a/ChangeLog	Mon Aug 13 09:39:46 2007 +0200
+++ b/ChangeLog	Mon Aug 13 09:40:41 2007 +0200
@@ -1,3 +1,12 @@
+1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.3-b5 is released.
+
+1997-06-08  Steven L Baur  <steve@altair.xemacs.org>
+
+	* etc/NEWS: Updates for early beta20.3 stuffs.
+	From Hrvoje Niksic <hniksic@srce.hr>
+
 1997-06-05  Steven L Baur  <steve@altair.xemacs.org>
 
 	* XEmacs 20.3-b4 is released.
--- a/configure	Mon Aug 13 09:39:46 2007 +0200
+++ b/configure	Mon Aug 13 09:40:41 2007 +0200
@@ -233,7 +233,7 @@
 with_dialogs=''
 const_is_losing='yes'
 puresize=''
-cflags='NO_CFLAGS_DEFINED'
+cflags='UNSPECIFIED'
 dynamic=''
 with_x11=''
 rel_alloc='default'
@@ -251,6 +251,7 @@
 use_assertions="yes"
 with_gif=""
 with_toolbars=""
+with_tty=""
 use_union_type="no"
 with_dnet=""
 
@@ -445,9 +446,11 @@
 
 The configure build process also used the following environment variables:
 CC        C compiler to use (but configure flags take precedence)
+CPP       C preprocessor to use (such as /usr/ccs/lib/cpp or cc -E)
 CFLAGS    C compiler compilation flags (such as -O)
-CPPFLAGS  Additional compilation flags (sucha s -I) used only by the preprocessor
-LDFLAGS   Additional linker flags
+CPPFLAGS  Additional compilation flags (such as -I/foo) used only by the preprocessor
+LDFLAGS   Additional linker flags (such as -L/foo)
+LIBS      Additional libraries (such as -lfoo)
 
 For more details on the install process, consult the INSTALL file.
 "
@@ -474,7 +477,7 @@
 while test $# != 0; do
   arg="$1"; shift
   case "$arg" in
-
+    --no-create|--no-recursion) ;;
         -* )
             case "$arg" in
         -*=*)
@@ -552,6 +555,7 @@
 
 			srcdir		| \
 	compiler	| \
+	cflags		| \
 	puresize	| \
 	cache_file	| \
 	native_sound_lib | \
@@ -725,19 +729,6 @@
            esac
 	;;
 
-		cflags )
-	   	   if test "$valomitted" = "yes" ; then
-	      if test "$#" = 0; then
-                (echo "$progname: Usage error:"
-echo " " "The \`--$optname' option requires a value."
-echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
-	      fi
-	      val="$1"; shift
-	   fi
-	   eval "$opt=\"$val\""
-	   eval "${opt}_specified=1"
-	;;
-
 		"no_create" ) ;;
 
 		"usage" | "help" ) echo "$usage" | ${PAGER-more}; exit 0 ;;
@@ -839,7 +830,7 @@
 esac
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:843: checking whether ln -s works" >&5
+echo "configure:834: checking whether ln -s works" >&5
 
 rm -f conftestdata
 if ln -s X conftestdata 2>/dev/null
@@ -857,11 +848,10 @@
 fi
 
 
-for dir in lisp etc man info site-lisp
-do
+for dir in lisp etc man info site-lisp; do
   if test ! -d "$dir" ; then
     echo Making symbolic link to "$srcdir/$dir"
-    ${LN_S} "$srcdir/$dir" .
+    ${LN_S} "$srcdir/$dir" "$dir"
   fi
 done
 
@@ -896,7 +886,7 @@
 
 
 echo "checking "the configuration name"" 1>&6
-echo "configure:900: checking "the configuration name"" >&5
+echo "configure:890: checking "the configuration name"" >&5
 internal_configuration=`echo $configuration | sed 's/-\(energize\|workshop\)//'`
 if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else
   exit $?
@@ -1012,8 +1002,6 @@
 
     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
 
-    cydra*-cydrome-sysv* ) machine=cydra5 opsys=usg5-3 ;;
-
     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
@@ -1028,8 +1016,6 @@
     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
 
-    elxsi-elxsi-sysv* ) machine=elxsi opsys=usg5-2 ;;
-
     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
 
     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
@@ -1173,10 +1159,11 @@
 
                     case "$canonical" in
       *-sunos4* )
-        test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
+	#test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
+	: ;;
       *-solaris2* )
-        test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
-        RANLIB=':'
+	#test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
+	RANLIB=':' ;;
     esac
 
     case "$canonical" in
@@ -1314,15 +1301,16 @@
 
 test -n "$CC" && cc_specified=yes
 
-SPECIFIED_CFLAGS="$CFLAGS"
-
 if test -n "$compiler"; then CC="$compiler"; fi
 
+test "$cflags" != "UNSPECIFIED" && CFLAGS="$cflags"
+xe_save_CFLAGS="$CFLAGS"
+
 test -n "$NON_GNU_CC"  -a "$with_gcc" = "no" -a -z "$CC"  && CC="$NON_GNU_CC"
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1326: checking for $ac_word" >&5
+echo "configure:1314: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1348,7 +1336,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1352: checking for $ac_word" >&5
+echo "configure:1340: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1393,7 +1381,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1397: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1385: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1405,11 +1393,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1409 "configure"
+#line 1397 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1429,19 +1417,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1433: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1421: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1438: checking whether we are using GNU C" >&5
+echo "configure:1426: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1455,7 +1443,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1459: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1447: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1485,7 +1473,7 @@
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1489: checking for $ac_word" >&5
+echo "configure:1477: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1511,7 +1499,169 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1515: checking for $ac_word" >&5
+echo "configure:1503: checking for $ac_word" >&5
+
+if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  ac_prog_rejected=no
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+	continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1548: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
+xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
+xe_libs='$xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+ac_cpp='$CPP '"$xe_cppflags"
+ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
+cross_compiling=no
+
+cat > conftest.$ac_ext <<EOF
+#line 1560 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1584: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1589: checking whether we are using GNU C" >&5
+
+cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1610: checking whether ${CC-cc} accepts -g" >&5
+
+echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+elif test "$with_gcc" = "yes" -a "$ac_cv_prog_gcc" = "no" ; then
+  CC=gcc
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1639: checking for $ac_word" >&5
+
+if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1665: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1556,7 +1706,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1710: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1568,11 +1718,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1572 "configure"
+#line 1722 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1592,19 +1742,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1596: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1601: checking whether we are using GNU C" >&5
+echo "configure:1751: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1618,7 +1768,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1622: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1772: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1642,175 +1792,14 @@
   test "${CFLAGS+set}" = set || CFLAGS="-g"
 fi
 
-elif test "$with_gcc" = "yes" -a "$ac_cv_prog_gcc" = "no" ; then
-  CC=gcc
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1651: checking for $ac_word" >&5
-
-if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1677: checking for $ac_word" >&5
-
-if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  ac_prog_rejected=no
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
-xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
-xe_libs='$xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
-ac_cpp='$CPP '"$xe_cppflags"
-ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
-cross_compiling=no
-
-cat > conftest.$ac_ext <<EOF
-#line 1734 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1758: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1763: checking whether we are using GNU C" >&5
-
-cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-  ac_test_CFLAGS="${CFLAGS+set}"
-  ac_save_CFLAGS="$CFLAGS"
-  CFLAGS=
-  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1784: checking whether ${CC-cc} accepts -g" >&5
-
-echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-O2"
-  fi
-else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-fi
+fi
+CFLAGS="$xe_save_CFLAGS"
 
 if test "$GCC" = "yes"; then with_gcc=yes; else with_gcc=no; fi
 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP"
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1814: checking how to run the C preprocessor" >&5
+echo "configure:1803: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1823,13 +1812,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1827 "configure"
+#line 1816 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1840,13 +1829,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1844 "configure"
+#line 1833 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1868,15 +1857,64 @@
 echo "$ac_t""$CPP" 1>&6
 
 
-case "$canonical" in
-  *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
-esac
+echo $ac_n "checking for AIX""... $ac_c" 1>&6
+echo "configure:1862: checking for AIX" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1864 "configure"
+#include "confdefs.h"
+#ifdef _AIX
+  yes
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining _ALL_SOURCE
+EOF
+cat >> confdefs.h <<\EOF
+#define _ALL_SOURCE 1
+EOF
+}
+
+else
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+
+
+echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6
+echo "configure:1891: checking whether we are using SunPro C" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1893 "configure"
+#include "confdefs.h"
+
+int main() {
+#ifndef __SUNPRO_C
+#error Not a  SunPro compiler :-(
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  __sunpro_c=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  __sunpro_c=no
+fi
+rm -f conftest*
+echo "$ac_t""$__sunpro_c" 1>&6
+
 
 
 echo "Extracting information from the machine- and system-dependent headers..."
 
-
-
 tempcname="conftest.c"
 
 
@@ -1914,46 +1952,44 @@
 #endif
 configure___ libs_standard=LIB_STANDARD
 
-#ifndef C_SWITCH_SYSTEM
-#define C_SWITCH_SYSTEM
-#endif
-configure___ c_switch_system=C_SWITCH_SYSTEM
 
 #ifndef C_SWITCH_MACHINE
 #define C_SWITCH_MACHINE
 #endif
 configure___ c_switch_machine=C_SWITCH_MACHINE
 
+#ifndef C_SWITCH_SYSTEM
+#define C_SWITCH_SYSTEM
+#endif
+configure___ c_switch_system=C_SWITCH_SYSTEM
+
 #ifndef C_SWITCH_X_SYSTEM
 #define C_SWITCH_X_SYSTEM
 #endif
 configure___ c_switch_x_system=C_SWITCH_X_SYSTEM
 
+
+#ifndef LD_SWITCH_MACHINE
+#define LD_SWITCH_MACHINE
+#endif
+configure___ ld_switch_machine=LD_SWITCH_MACHINE
+
+#ifndef LD_SWITCH_SYSTEM
+#define LD_SWITCH_SYSTEM
+#endif
+configure___ ld_switch_system=LD_SWITCH_SYSTEM
+
 #ifndef LD_SWITCH_X_SYSTEM
 #define LD_SWITCH_X_SYSTEM
 #endif
 configure___ ld_switch_x_system=LD_SWITCH_X_SYSTEM
 
-#ifndef LD_SWITCH_SYSTEM
-#define LD_SWITCH_SYSTEM
-#endif
-configure___ ld_switch_system=LD_SWITCH_SYSTEM
 
 #ifndef UNEXEC
-#define UNEXEC unexec.o
+#define UNEXEC "unexec.o"
 #endif
 configure___ unexec=UNEXEC
 
-#ifndef C_DEBUG_SWITCH
-#define C_DEBUG_SWITCH -g
-#endif
-configure___ c_debug_switch=C_DEBUG_SWITCH
-
-#ifndef C_OPTIMIZE_SWITCH
-#define C_OPTIMIZE_SWITCH -O
-#endif
-configure___ c_optimize_switch=C_OPTIMIZE_SWITCH
-
 
 #ifdef ORDINARY_LINK
 configure___ ordinary_link=yes
@@ -1986,9 +2022,20 @@
 #endif
 
 
+#if 0
 #ifdef THIS_IS_CONFIGURE
 
 /* Get the CFLAGS for tests in configure.  */
+#ifndef C_DEBUG_SWITCH
+#define C_DEBUG_SWITCH "-g"
+#endif
+configure___ c_debug_switch=C_DEBUG_SWITCH
+
+#ifndef C_OPTIMIZE_SWITCH
+#define C_OPTIMIZE_SWITCH "-O"
+#endif
+configure___ c_optimize_switch=C_OPTIMIZE_SWITCH
+
 #ifdef __GNUC__
 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '$SPECIFIED_CFLAGS'
 #else
@@ -2005,22 +2052,31 @@
 #endif
 
 #endif /* not THIS_IS_CONFIGURE */
+#endif /* 0 */
 ' > $tempcname
 CPP=`eval "echo $CPP"`
 eval `$CPP -Isrc $tempcname \
-	| sed -n -e "s/ *= */='/" -e "s/ *\$/'/" -e "s/^configure___//p"`
-if test -z "$SPECIFIED_CFLAGS"; then
-  eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \
-	| sed -n -e "s/ *= */='/" -e "s/ *\$/'/" -e "s/^configure___//p"`
-else
-  REAL_CFLAGS="$CFLAGS"
-fi
+	| sed -n -e "s/ *=[ \"]*/='/" -e "s/[ \"]*\$/'/" -e "s/^configure___//p"`
+
 
 rm $tempcname
 
 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
 
-test "$cflags" != "NO_CFLAGS_DEFINED" && REAL_CFLAGS="$cflags"
+if test -z "$CFLAGS"; then
+      if   test "$GCC" = "yes"; then
+    CFLAGS="-g -O2"
+    test "$opsys" = "linux" -a "$machine" = "intel386" && \
+      CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+  elif test "$__sunpro_c" = "yes"; then
+    case "$opsys" in
+      sol2*   ) CFLAGS="-v -xO4" ;;
+      sunos4* ) CFLAGS="-xO3";;
+    esac
+  else
+    CFLAGS="-O" # The only POSIX-approved flag
+  fi
+fi
 
 extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"$unexec\""
@@ -2041,6 +2097,11 @@
   done
 fi
 
+if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
+  ld_switch_site="$ld_switch_site "-L/usr/local/lib"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-L/usr/local/lib"\" to \$ld_switch_site"; fi
+  c_switch_site="$c_switch_site "-I/usr/local/include"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-I/usr/local/include"\" to \$c_switch_site"; fi
+fi
+
 for dir in "/usr/ccs/lib"; do
   test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_site"; fi
 done
@@ -2061,19 +2122,19 @@
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:2065: checking "for runtime libraries flag"" >&5
+echo "configure:2126: checking "for runtime libraries flag"" >&5
   dash_r=""
   for try_dash_r in "-R" "-R " "-rpath "; do
     xe_check_libs="${try_dash_r}/no/such/file-or-directory"
     cat > conftest.$ac_ext <<EOF
-#line 2070 "configure"
+#line 2131 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
@@ -2157,7 +2218,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2161: checking for $ac_word" >&5
+echo "configure:2222: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -2210,7 +2271,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2214: checking for a BSD compatible install" >&5
+echo "configure:2275: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
   IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
@@ -2261,7 +2322,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:2265: checking for $ac_word" >&5
+echo "configure:2326: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -2288,48 +2349,19 @@
 test -n "$YACC" || YACC="yacc"
 
 
-echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2293: checking for AIX" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2295 "configure"
-#include "confdefs.h"
-#ifdef _AIX
-  yes
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
-    Defining _ALL_SOURCE
-EOF
-cat >> confdefs.h <<\EOF
-#define _ALL_SOURCE 1
-EOF
-}
-
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-
-
-
 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2325: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2328 "configure"
+echo "configure:2357: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2360 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2362,15 +2394,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2366: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2369 "configure"
+echo "configure:2398: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2401 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2399,19 +2431,19 @@
 fi
 done
 
-for ac_hdr in linux/version.h kstat.h sys/pstat.h inttypes.h
+for ac_hdr in linux/version.h kstat.h sys/pstat.h inttypes.h limits.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2407: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2410 "configure"
+echo "configure:2439: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2442 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2441,10 +2473,10 @@
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2445: checking for sys/wait.h that is POSIX.1 compatible" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2448 "configure"
+echo "configure:2477: checking for sys/wait.h that is POSIX.1 compatible" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2480 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2460,7 +2492,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2484,10 +2516,10 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2488: checking for ANSI C header files" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2491 "configure"
+echo "configure:2520: checking for ANSI C header files" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2523 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2495,7 +2527,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2512,7 +2544,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2516 "configure"
+#line 2548 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2530,7 +2562,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2534 "configure"
+#line 2566 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2548,7 +2580,7 @@
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 cat > conftest.$ac_ext <<EOF
-#line 2552 "configure"
+#line 2584 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2559,7 +2591,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   :
 else
@@ -2584,10 +2616,10 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2588: checking whether time.h and sys/time.h may both be included" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2591 "configure"
+echo "configure:2620: checking whether time.h and sys/time.h may both be included" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2623 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2596,7 +2628,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2620,10 +2652,10 @@
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2624: checking for sys_siglist declaration in signal.h or unistd.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2627 "configure"
+echo "configure:2656: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2659 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2635,7 +2667,7 @@
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:2639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -2660,9 +2692,9 @@
 
 
 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
-echo "configure:2664: checking for struct utimbuf" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2666 "configure"
+echo "configure:2696: checking for struct utimbuf" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2698 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -2681,7 +2713,7 @@
 static struct utimbuf x; x.actime = x.modtime;
 ; return 0; }
 EOF
-if { (eval echo configure:2685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -2701,10 +2733,10 @@
 rm -f conftest*
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2705: checking return type of signal handlers" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2708 "configure"
+echo "configure:2737: checking return type of signal handlers" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2740 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2721,7 +2753,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2744,9 +2776,9 @@
 
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:2748: checking for struct timeval" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2750 "configure"
+echo "configure:2780: checking for struct timeval" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2782 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -2762,7 +2794,7 @@
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
-if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
@@ -2784,10 +2816,10 @@
 rm -f conftest*
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2788: checking whether struct tm is in sys/time.h or time.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2791 "configure"
+echo "configure:2820: checking whether struct tm is in sys/time.h or time.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2823 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -2795,7 +2827,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:2799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -2819,10 +2851,10 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:2823: checking for tm_zone in struct tm" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2826 "configure"
+echo "configure:2855: checking for tm_zone in struct tm" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2858 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -2830,7 +2862,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:2834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -2853,10 +2885,10 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:2857: checking for tzname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2860 "configure"
+echo "configure:2889: checking for tzname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2892 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -2866,7 +2898,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:2870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -2892,10 +2924,10 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2896: checking for working const" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2899 "configure"
+echo "configure:2928: checking for working const" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2931 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2944,7 +2976,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2969,7 +3001,7 @@
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2973: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:3005: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
@@ -2994,12 +3026,12 @@
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2998: checking whether byte ordering is bigendian" >&5
+echo "configure:3030: checking whether byte ordering is bigendian" >&5
 
 ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3003 "configure"
+#line 3035 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3010,11 +3042,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3018 "configure"
+#line 3050 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3025,7 +3057,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3042,7 +3074,7 @@
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
+#line 3078 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3055,7 +3087,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_bigendian=no
 else
@@ -3081,10 +3113,10 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:3085: checking size of short" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3088 "configure"
+echo "configure:3117: checking size of short" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3120 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3095,7 +3127,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -3116,10 +3148,10 @@
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:3120: checking size of int" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3123 "configure"
+echo "configure:3152: checking size of int" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3155 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3130,7 +3162,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -3151,10 +3183,10 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:3155: checking size of long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3158 "configure"
+echo "configure:3187: checking size of long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3190 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3165,7 +3197,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -3187,7 +3219,7 @@
 
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:3191: checking for long file names" >&5
+echo "configure:3223: checking for long file names" >&5
 
 ac_cv_sys_long_file_names=yes
 # Test for long file names in all the places we know might matter:
@@ -3235,12 +3267,12 @@
 
 
 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
-echo "configure:3239: checking for sqrt in -lm" >&5
+echo "configure:3271: checking for sqrt in -lm" >&5
 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lm "
 cat > conftest.$ac_ext <<EOF
-#line 3244 "configure"
+#line 3276 "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
@@ -3251,7 +3283,7 @@
 sqrt()
 ; return 0; }
 EOF
-if { (eval echo configure:3255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3293,7 +3325,7 @@
 
 
 echo "checking type of mail spool file locking" 1>&6
-echo "configure:3297: checking type of mail spool file locking" >&5
+echo "configure:3329: checking type of mail spool file locking" >&5
 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
@@ -3312,16 +3344,17 @@
 EOF
 }
 
+else mail_locking="dot-locking"
 fi
 
 
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:3320: checking for kstat_open in -lkstat" >&5
+echo "configure:3353: checking for kstat_open in -lkstat" >&5
 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lkstat "
 cat > conftest.$ac_ext <<EOF
-#line 3325 "configure"
+#line 3358 "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
@@ -3332,7 +3365,7 @@
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3366,12 +3399,12 @@
 
 
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:3370: checking for kvm_read in -lkvm" >&5
+echo "configure:3403: checking for kvm_read in -lkvm" >&5
 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lkvm "
 cat > conftest.$ac_ext <<EOF
-#line 3375 "configure"
+#line 3408 "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
@@ -3382,7 +3415,7 @@
 kvm_read()
 ; return 0; }
 EOF
-if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3416,12 +3449,12 @@
 
 
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:3420: checking for cma_open in -lpthreads" >&5
+echo "configure:3453: checking for cma_open in -lpthreads" >&5
 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpthreads "
 cat > conftest.$ac_ext <<EOF
-#line 3425 "configure"
+#line 3458 "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
@@ -3432,7 +3465,7 @@
 cma_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3468,7 +3501,7 @@
 fi
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:3472: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:3505: checking whether the -xildoff compiler flag is required" >&5
 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
     then echo "$ac_t""no" 1>&6;
@@ -3478,7 +3511,7 @@
 fi
 
 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:3482: checking for dynodump" >&5
+echo "configure:3515: checking for dynodump" >&5
 case "$opsys" in sol2* )
   echo "$ac_t""yes" 1>&6
   { test "$extra_verbose" = "yes" && cat << \EOF
@@ -3501,7 +3534,7 @@
 
 case "$opsys" in sol2-[6-9]* )
   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
-echo "configure:3505: checking for \"-z ignore\" linker flag" >&5
+echo "configure:3538: checking for \"-z ignore\" linker flag" >&5
   case "`ld -h 2>&1`" in
     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
@@ -3511,7 +3544,7 @@
 
 
 echo "checking "for specified window system"" 1>&6
-echo "configure:3515: checking "for specified window system"" >&5
+echo "configure:3548: checking "for specified window system"" >&5
 
 if test "$x_includes $x_libraries" = "NONE NONE"; then
   if test -n "$OPENWINHOME" \
@@ -3532,7 +3565,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:3536: checking for X" >&5
+echo "configure:3569: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -3592,12 +3625,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 3596 "configure"
+#line 3629 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3666,14 +3699,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3670 "configure"
+#line 3703 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -3782,17 +3815,17 @@
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:3786: checking whether -R must be followed by a space" >&5
+echo "configure:3819: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 3789 "configure"
+#line 3822 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -3808,14 +3841,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 3812 "configure"
+#line 3845 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -3851,12 +3884,12 @@
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:3855: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:3888: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldnet "
 cat > conftest.$ac_ext <<EOF
-#line 3860 "configure"
+#line 3893 "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
@@ -3867,7 +3900,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3891,12 +3924,12 @@
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       
 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:3895: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:3928: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldnet_stub "
 cat > conftest.$ac_ext <<EOF
-#line 3900 "configure"
+#line 3933 "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
@@ -3907,7 +3940,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3936,10 +3969,10 @@
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3940: checking for gethostbyname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3943 "configure"
+echo "configure:3973: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3976 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3962,7 +3995,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -3983,12 +4016,12 @@
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3987: checking for gethostbyname in -lnsl" >&5
+echo "configure:4020: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lnsl "
 cat > conftest.$ac_ext <<EOF
-#line 3992 "configure"
+#line 4025 "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
@@ -3999,7 +4032,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4029,10 +4062,10 @@
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:4033: checking for connect" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4036 "configure"
+echo "configure:4066: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4069 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -4055,7 +4088,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -4078,12 +4111,12 @@
 xe_msg_checking="for connect in -lsocket"
 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:4082: checking "$xe_msg_checking"" >&5
+echo "configure:4115: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4087 "configure"
+#line 4120 "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
@@ -4094,7 +4127,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4118,10 +4151,10 @@
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:4122: checking for remove" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4125 "configure"
+echo "configure:4155: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4158 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -4144,7 +4177,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -4165,12 +4198,12 @@
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:4169: checking for remove in -lposix" >&5
+echo "configure:4202: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lposix "
 cat > conftest.$ac_ext <<EOF
-#line 4174 "configure"
+#line 4207 "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
@@ -4181,7 +4214,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4205,10 +4238,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:4209: checking for shmat" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4212 "configure"
+echo "configure:4242: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4245 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -4231,7 +4264,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -4252,12 +4285,12 @@
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4256: checking for shmat in -lipc" >&5
+echo "configure:4289: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lipc "
 cat > conftest.$ac_ext <<EOF
-#line 4261 "configure"
+#line 4294 "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
@@ -4268,7 +4301,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4302,12 +4335,12 @@
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   
 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:4306: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4339: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lICE "
 cat > conftest.$ac_ext <<EOF
-#line 4311 "configure"
+#line 4344 "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
@@ -4318,7 +4351,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4457,15 +4490,15 @@
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:4461: checking for X11/Intrinsic.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4464 "configure"
+echo "configure:4494: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4497 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4489,12 +4522,12 @@
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:4493: checking for XOpenDisplay in -lX11" >&5
+echo "configure:4526: checking for XOpenDisplay in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 4498 "configure"
+#line 4531 "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
@@ -4505,7 +4538,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4530,12 +4563,12 @@
 xe_msg_checking="for XGetFontProperty in -lX11"
 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:4534: checking "$xe_msg_checking"" >&5
+echo "configure:4567: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 -b i486-linuxaout"
 cat > conftest.$ac_ext <<EOF
-#line 4539 "configure"
+#line 4572 "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
@@ -4546,7 +4579,7 @@
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:4550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4573,12 +4606,12 @@
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:4577: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:4610: checking for XShapeSelectInput in -lXext" >&5
 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXext "
 cat > conftest.$ac_ext <<EOF
-#line 4582 "configure"
+#line 4615 "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
@@ -4589,7 +4622,7 @@
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4610,17 +4643,15 @@
 
 
 
-    case "$canonical" in *-sunos4.* ) # Bug workaround
-   ld_switch_x_site="$ld_switch_x_site -u _XtToolkitInitialize" ;;
-  esac
-  
+    case "$opsys" in    sunos4* ) libs_x="-u _XtToolkitInitialize -lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-u _XtToolkitInitialize -lXt\" to \$libs_x"; fi ;;
+   * ) 
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:4619: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:4650: checking for XtOpenDisplay in -lXt" >&5
 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXt "
 cat > conftest.$ac_ext <<EOF
-#line 4624 "configure"
+#line 4655 "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
@@ -4631,7 +4662,7 @@
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4651,17 +4682,18 @@
 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
 fi
 
-
+ ;;
+  esac
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:4658: checking the version of X11 being used" >&5
+echo "configure:4690: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
-#line 4660 "configure"
+#line 4692 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
@@ -4685,15 +4717,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4689: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4692 "configure"
+echo "configure:4721: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4724 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4724,7 +4756,7 @@
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:4728: checking for XFree86" >&5
+echo "configure:4760: checking for XFree86" >&5
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config" -o \
 	  -f "/etc/X11/XF86Config" -o \
@@ -4742,18 +4774,16 @@
     echo "$ac_t""no" 1>&6
   fi
 
-    case "$canonical" in *-sunos4.* ) # Bug workaround
-    ld_switch_x_site="$ld_switch_x_site -u _get_applicationShellWidgetClass" ;;
-  esac
-  if test -z "$with_xmu"; then
-    
+    case "$opsys" in     sunos4* ) libs_x="-u _get_applicationShellWidgetClass -lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-u _get_applicationShellWidgetClass -lXmu\" to \$libs_x"; fi ;;
+    * ) if test -z "$with_xmu"; then
+	  
 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
-echo "configure:4752: checking for XmuConvertStandardSelection in -lXmu" >&5
+echo "configure:4782: checking for XmuConvertStandardSelection in -lXmu" >&5
 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXmu "
 cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
+#line 4787 "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
@@ -4764,7 +4794,7 @@
 XmuConvertStandardSelection()
 ; return 0; }
 EOF
-if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4785,30 +4815,31 @@
 fi
 
 
-  fi
-  if test "$with_xmu" = "no"; then
-    extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
+	fi
+	if test "$with_xmu" = "no"; then
+	  extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"xmu.o\""
  fi
-  else
-    libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
-  fi
+	else
+	  libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
+	fi ;;
+  esac
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:4800: checking for main in -lXbsd" >&5
+echo "configure:4831: checking for main in -lXbsd" >&5
 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXbsd "
 cat > conftest.$ac_ext <<EOF
-#line 4805 "configure"
+#line 4836 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4831,12 +4862,12 @@
 
     
 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
-echo "configure:4835: checking for XawScrollbarSetThumb in -lXaw" >&5
+echo "configure:4866: checking for XawScrollbarSetThumb in -lXaw" >&5
 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXaw "
 cat > conftest.$ac_ext <<EOF
-#line 4840 "configure"
+#line 4871 "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
@@ -4847,7 +4878,7 @@
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:4851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4904,15 +4935,15 @@
 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
-echo "configure:4908: checking for X11/Xauth.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4911 "configure"
+echo "configure:4939: checking for X11/Xauth.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4942 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4935,12 +4966,12 @@
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:4939: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:4970: checking for XauGetAuthByAddr in -lXau" >&5
 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXau "
 cat > conftest.$ac_ext <<EOF
-#line 4944 "configure"
+#line 4975 "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
@@ -4951,7 +4982,7 @@
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4987,15 +5018,15 @@
 
 test -z "$with_offix" && { ac_safe=`echo "OffiX/DragAndDrop.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for OffiX/DragAndDrop.h""... $ac_c" 1>&6
-echo "configure:4991: checking for OffiX/DragAndDrop.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4994 "configure"
+echo "configure:5022: checking for OffiX/DragAndDrop.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5025 "configure"
 #include "confdefs.h"
 #include <OffiX/DragAndDrop.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5018,12 +5049,12 @@
  }
 test -z "$with_offix" && { 
 echo $ac_n "checking for DndInitialize in -lDnd""... $ac_c" 1>&6
-echo "configure:5022: checking for DndInitialize in -lDnd" >&5
+echo "configure:5053: checking for DndInitialize in -lDnd" >&5
 ac_lib_var=`echo Dnd'_'DndInitialize | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lDnd "
 cat > conftest.$ac_ext <<EOF
-#line 5027 "configure"
+#line 5058 "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
@@ -5034,7 +5065,7 @@
 DndInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5073,15 +5104,15 @@
       for dir in "" "Tt/" "desktop/" ; do
     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
-echo "configure:5077: checking for ${dir}tt_c.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5080 "configure"
+echo "configure:5108: checking for ${dir}tt_c.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5111 "configure"
 #include "confdefs.h"
 #include <${dir}tt_c.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5110,12 +5141,12 @@
 xe_msg_checking="for tt_message_create in -ltt"
 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:5114: checking "$xe_msg_checking"" >&5
+echo "configure:5145: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltt $extra_libs"
 cat > conftest.$ac_ext <<EOF
-#line 5119 "configure"
+#line 5150 "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
@@ -5126,7 +5157,7 @@
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5175,15 +5206,15 @@
 
 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
-echo "configure:5179: checking for Dt/Dt.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5182 "configure"
+echo "configure:5210: checking for Dt/Dt.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5213 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5206,12 +5237,12 @@
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:5210: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:5241: checking for DtDndDragStart in -lDtSvc" >&5
 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lDtSvc "
 cat > conftest.$ac_ext <<EOF
-#line 5215 "configure"
+#line 5246 "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
@@ -5222,7 +5253,7 @@
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:5226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5269,19 +5300,19 @@
 
   
 echo $ac_n "checking for main in -lenergize""... $ac_c" 1>&6
-echo "configure:5273: checking for main in -lenergize" >&5
+echo "configure:5304: checking for main in -lenergize" >&5
 ac_lib_var=`echo energize'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lenergize "
 cat > conftest.$ac_ext <<EOF
-#line 5278 "configure"
+#line 5309 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5313,19 +5344,19 @@
   if test -z "$energize_version"; then
     
 echo $ac_n "checking for main in -lconn""... $ac_c" 1>&6
-echo "configure:5317: checking for main in -lconn" >&5
+echo "configure:5348: checking for main in -lconn" >&5
 ac_lib_var=`echo conn'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lconn "
 cat > conftest.$ac_ext <<EOF
-#line 5322 "configure"
+#line 5353 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5358,15 +5389,15 @@
   fi
   ac_safe=`echo "editorconn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for editorconn.h""... $ac_c" 1>&6
-echo "configure:5362: checking for editorconn.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5365 "configure"
+echo "configure:5393: checking for editorconn.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5396 "configure"
 #include "confdefs.h"
 #include <editorconn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5408,7 +5439,7 @@
 
 
 echo "checking for graphics libraries" 1>&6
-echo "configure:5412: checking for graphics libraries" >&5
+echo "configure:5443: checking for graphics libraries" >&5
 test -z "$with_gif" && with_gif=yes;
 if test "$with_gif" = "yes"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
@@ -5426,15 +5457,15 @@
 
 test -z "$with_xpm" && { ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
-echo "configure:5430: checking for X11/xpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5433 "configure"
+echo "configure:5461: checking for X11/xpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5464 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5457,12 +5488,12 @@
  }
 test -z "$with_xpm" && { 
 echo $ac_n "checking for XpmFree in -lXpm""... $ac_c" 1>&6
-echo "configure:5461: checking for XpmFree in -lXpm" >&5
+echo "configure:5492: checking for XpmFree in -lXpm" >&5
 ac_lib_var=`echo Xpm'_'XpmFree | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXpm "
 cat > conftest.$ac_ext <<EOF
-#line 5466 "configure"
+#line 5497 "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
@@ -5473,7 +5504,7 @@
 XpmFree()
 ; return 0; }
 EOF
-if { (eval echo configure:5477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5509,15 +5540,15 @@
 
 test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
-echo "configure:5513: checking for compface.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5516 "configure"
+echo "configure:5544: checking for compface.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5547 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5540,12 +5571,12 @@
  }
 test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:5544: checking for UnGenFace in -lcompface" >&5
+echo "configure:5575: checking for UnGenFace in -lcompface" >&5
 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcompface "
 cat > conftest.$ac_ext <<EOF
-#line 5549 "configure"
+#line 5580 "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
@@ -5556,7 +5587,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5592,15 +5623,15 @@
 
 test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
-echo "configure:5596: checking for jpeglib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5599 "configure"
+echo "configure:5627: checking for jpeglib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5630 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5623,12 +5654,12 @@
  }
 test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:5627: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:5658: checking for jpeg_destroy_decompress in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ljpeg "
 cat > conftest.$ac_ext <<EOF
-#line 5632 "configure"
+#line 5663 "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
@@ -5639,7 +5670,7 @@
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5675,15 +5706,15 @@
 
 test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for png.h""... $ac_c" 1>&6
-echo "configure:5679: checking for png.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5682 "configure"
+echo "configure:5710: checking for png.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5713 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5705,10 +5736,10 @@
 fi
  }
 test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:5709: checking for pow" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5712 "configure"
+echo "configure:5740: checking for pow" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5743 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
@@ -5731,7 +5762,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
@@ -5756,12 +5787,12 @@
 xe_msg_checking="for png_read_image in -lpng"
 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:5760: checking "$xe_msg_checking"" >&5
+echo "configure:5791: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpng $extra_libs"
 cat > conftest.$ac_ext <<EOF
-#line 5765 "configure"
+#line 5796 "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
@@ -5772,7 +5803,7 @@
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5822,15 +5853,15 @@
 
   ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:5826: checking for Xm/Xm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5829 "configure"
+echo "configure:5857: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5860 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5847,12 +5878,12 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:5851: checking for XmStringFree in -lXm" >&5
+echo "configure:5882: checking for XmStringFree in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
-#line 5856 "configure"
+#line 5887 "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
@@ -5863,7 +5894,7 @@
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5915,6 +5946,15 @@
 EOF
 }
 
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NEED_ATHENA
+EOF
+cat >> confdefs.h <<\EOF
+#define NEED_ATHENA 1
+EOF
+}
+
+  lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
 esac
 
@@ -5927,9 +5967,34 @@
 EOF
 }
 
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NEED_MOTIF
+EOF
+cat >> confdefs.h <<\EOF
+#define NEED_MOTIF 1
+EOF
+}
+
+  lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
   need_motif=yes ;;
 esac
 
+test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
+test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
+case "$all_widgets" in *lucid* )
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NEED_LUCID
+EOF
+cat >> confdefs.h <<\EOF
+#define NEED_LUCID 1
+EOF
+}
+
+  lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
+esac
+
+
+
 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
     Defining LWLIB_SCROLLBARS_ATHENA
 EOF
@@ -6077,7 +6142,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:6081: checking for Mule-related features" >&5
+echo "configure:6146: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -6094,15 +6159,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6098: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6101 "configure"
+echo "configure:6163: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6166 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6133,12 +6198,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:6137: checking for strerror in -lintl" >&5
+echo "configure:6202: checking for strerror in -lintl" >&5
 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lintl "
 cat > conftest.$ac_ext <<EOF
-#line 6142 "configure"
+#line 6207 "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
@@ -6149,7 +6214,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:6153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6182,19 +6247,19 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:6186: checking for Mule input methods" >&5
+echo "configure:6251: checking for Mule input methods" >&5
       test -z "$with_xim" && case "$opsys" in sol2* ) ;; *) with_xim=no ;; esac
   case "$with_xim" in "" | "yes" )
     echo "checking for XIM" 1>&6
-echo "configure:6190: checking for XIM" >&5
+echo "configure:6255: checking for XIM" >&5
     
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:6193: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:6258: checking for XmImMbLookupString in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
-#line 6198 "configure"
+#line 6263 "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
@@ -6205,7 +6270,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6267,15 +6332,15 @@
     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
-echo "configure:6271: checking for wnn/jllib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6274 "configure"
+echo "configure:6336: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6339 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6297,13 +6362,15 @@
 fi
  }
   test -z "$with_wnn" && { 
-echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:6302: checking for jl_dic_list_e in -lwnn" >&5
+xe_msg_checking="for jl_dic_list_e in -lwnn"
+test -n "with_wnn=no" && xe_msg_checking="$xe_msg_checking using extra libs with_wnn=no"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:6369: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
-xe_check_libs=" -lwnn "
-cat > conftest.$ac_ext <<EOF
-#line 6307 "configure"
+xe_check_libs=" -lwnn with_wnn=no"
+cat > conftest.$ac_ext <<EOF
+#line 6374 "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
@@ -6314,7 +6381,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6342,7 +6409,7 @@
 
 else
   echo "$ac_t""no" 1>&6
-with_wnn=no
+:
 fi
 
  }
@@ -6362,12 +6429,12 @@
  fi
     
 echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
-echo "configure:6366: checking for jl_fi_dic_list in -lwnn" >&5
+echo "configure:6433: checking for jl_fi_dic_list in -lwnn" >&5
 ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn "
 cat > conftest.$ac_ext <<EOF
-#line 6371 "configure"
+#line 6438 "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
@@ -6378,7 +6445,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6410,15 +6477,15 @@
 
     test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
-echo "configure:6414: checking for canna/RK.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6417 "configure"
+echo "configure:6481: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6484 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6441,12 +6508,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:6445: checking for RkBgnBun in -lRKC" >&5
+echo "configure:6512: checking for RkBgnBun in -lRKC" >&5
 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lRKC "
 cat > conftest.$ac_ext <<EOF
-#line 6450 "configure"
+#line 6517 "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
@@ -6457,7 +6524,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6480,12 +6547,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:6484: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:6551: checking for jrKanjiControl in -lcanna" >&5
 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcanna "
 cat > conftest.$ac_ext <<EOF
-#line 6489 "configure"
+#line 6556 "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
@@ -6496,7 +6563,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:6500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6597,10 +6664,10 @@
 for ac_func in acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask strcasecmp strerror tzset utimes waitpid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6601: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6604 "configure"
+echo "configure:6668: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6671 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6623,7 +6690,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6660,10 +6727,10 @@
     for ac_func in realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6664: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6667 "configure"
+echo "configure:6731: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6734 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6686,7 +6753,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6719,16 +6786,16 @@
 esac
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:6723: checking whether netdb declares h_errno" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6725 "configure"
+echo "configure:6790: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 6792 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -6748,16 +6815,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:6752: checking for sigsetjmp" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6754 "configure"
+echo "configure:6819: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 6821 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:6761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -6777,11 +6844,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:6781: checking whether localtime caches TZ" >&5
+echo "configure:6848: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 6785 "configure"
+#line 6852 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -6816,7 +6883,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:6887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -6845,9 +6912,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday cannot accept two arguments""... $ac_c" 1>&6
-echo "configure:6849: checking whether gettimeofday cannot accept two arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6851 "configure"
+echo "configure:6916: checking whether gettimeofday cannot accept two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 6918 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -6869,7 +6936,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""no" 1>&6
 else
@@ -6891,19 +6958,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:6895: checking for inline" >&5
+echo "configure:6962: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 6900 "configure"
+#line 6967 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:6907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -6953,17 +7020,17 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:6957: checking for working alloca.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6960 "configure"
+echo "configure:7024: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7027 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -6987,10 +7054,10 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:6991: checking for alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6994 "configure"
+echo "configure:7058: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7061 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -7013,7 +7080,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -7052,10 +7119,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:7056: checking whether alloca needs Cray hooks" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7059 "configure"
+echo "configure:7123: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7126 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -7079,10 +7146,10 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7083: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7086 "configure"
+echo "configure:7150: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7153 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7105,7 +7172,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7135,10 +7202,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:7139: checking stack direction for C alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7142 "configure"
+echo "configure:7206: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7209 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -7157,7 +7224,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -7184,10 +7251,10 @@
  fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:7188: checking for pid_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7191 "configure"
+echo "configure:7255: checking for pid_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7258 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -7219,15 +7286,15 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:7223: checking for vfork.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7226 "configure"
+echo "configure:7290: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7293 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7255,10 +7322,10 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:7259: checking for working vfork" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7262 "configure"
+echo "configure:7326: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7329 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -7353,7 +7420,7 @@
   }
 }
 EOF
-if { (eval echo configure:7357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
@@ -7378,10 +7445,10 @@
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:7382: checking for working strcoll" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7385 "configure"
+echo "configure:7449: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7452 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -7391,7 +7458,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:7395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -7416,10 +7483,10 @@
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:7420: checking for working mmap" >&5
+echo "configure:7487: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 7423 "configure"
+#line 7490 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -7452,7 +7519,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:7456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   have_mmap=yes
 else
@@ -7485,10 +7552,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:7489: checking for socket" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7492 "configure"
+echo "configure:7556: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7559 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -7511,7 +7578,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -7526,15 +7593,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
-echo "configure:7530: checking for netinet/in.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7533 "configure"
+echo "configure:7597: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7600 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7551,15 +7618,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
-echo "configure:7555: checking for arpa/inet.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7558 "configure"
+echo "configure:7622: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7625 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7584,9 +7651,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:7588: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:7655: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 7590 "configure"
+#line 7657 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -7597,7 +7664,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SOCKADDR_SUN_LEN
@@ -7628,10 +7695,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:7632: checking for msgget" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7635 "configure"
+echo "configure:7699: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7702 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -7654,7 +7721,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -7669,15 +7736,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
-echo "configure:7673: checking for sys/ipc.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7676 "configure"
+echo "configure:7740: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7743 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7694,15 +7761,15 @@
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
-echo "configure:7698: checking for sys/msg.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7701 "configure"
+echo "configure:7765: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7768 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7740,15 +7807,15 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:7744: checking for dirent.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7747 "configure"
+echo "configure:7811: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7814 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7775,15 +7842,15 @@
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
-echo "configure:7779: checking for sys/dir.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7782 "configure"
+echo "configure:7846: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7849 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7816,15 +7883,15 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:7820: checking for nlist.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7823 "configure"
+echo "configure:7887: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7890 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7863,8 +7930,6 @@
  break; fi
 done
 
-CFLAGS="$REAL_CFLAGS"
-
 file="$srcdir/lisp/version.el"
 version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"`
 if test  -z "$version"; then
@@ -7874,10 +7939,10 @@
 beta=`sed -ne 's/^.*XEmacs Lucid (beta\([0-9][0-9]*\)).*$/\1/p' "$file"`
 test -n "$beta" && version="${version}-b${beta}"
 { test "$extra_verbose" = "yes" && cat << EOF
-    Defining EMACS_VERSION = $version
+    Defining EMACS_VERSION = "$version"
 EOF
 cat >> confdefs.h <<EOF
-#define EMACS_VERSION $version
+#define EMACS_VERSION "$version"
 EOF
 }
 
@@ -7894,7 +7959,7 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:7898: checking "for sound support"" >&5
+echo "configure:7963: checking "for sound support"" >&5
 case "$with_sound" in
   native | both ) with_native_sound=yes;;
   nas    | no   ) with_native_sound=no;;
@@ -7905,15 +7970,15 @@
     if test -n "$native_sound_lib"; then
     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
-echo "configure:7909: checking for multimedia/audio_device.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7912 "configure"
+echo "configure:7974: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7977 "configure"
 #include "confdefs.h"
 #include <multimedia/audio_device.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7961,12 +8026,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:7965: checking for ALopenport in -laudio" >&5
+echo "configure:8030: checking for ALopenport in -laudio" >&5
 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -laudio "
 cat > conftest.$ac_ext <<EOF
-#line 7970 "configure"
+#line 8035 "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
@@ -7977,7 +8042,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8008,12 +8073,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:8012: checking for AOpenAudio in -lAlib" >&5
+echo "configure:8077: checking for AOpenAudio in -lAlib" >&5
 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lAlib "
 cat > conftest.$ac_ext <<EOF
-#line 8017 "configure"
+#line 8082 "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
@@ -8024,7 +8089,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:8028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8062,15 +8127,15 @@
     for dir in "machine" "sys" "linux"; do
       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
-echo "configure:8066: checking for ${dir}/soundcard.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8069 "configure"
+echo "configure:8131: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8134 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8140,7 +8205,7 @@
  fi
   LIBS="-laudio $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$LIBS"; fi
       cat > conftest.$ac_ext <<EOF
-#line 8144 "configure"
+#line 8209 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -8167,7 +8232,7 @@
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:8171: checking for TTY-related features" >&5
+echo "configure:8236: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -8182,15 +8247,15 @@
 
       ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:8186: checking for termios.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8189 "configure"
+echo "configure:8251: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8254 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8217,15 +8282,15 @@
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
-echo "configure:8221: checking for termio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8224 "configure"
+echo "configure:8286: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8289 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8258,12 +8323,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:8262: checking for tgetent in -lncurses" >&5
+echo "configure:8327: checking for tgetent in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lncurses "
 cat > conftest.$ac_ext <<EOF
-#line 8267 "configure"
+#line 8332 "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
@@ -8274,7 +8339,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:8278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8307,15 +8372,15 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:8311: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8314 "configure"
+echo "configure:8376: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8379 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8337,15 +8402,15 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:8341: checking for ncurses/term.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8344 "configure"
+echo "configure:8406: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8409 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8375,15 +8440,15 @@
       c_switch_site="$c_switch_site -I/usr/include/ncurses"
       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:8379: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8382 "configure"
+echo "configure:8444: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8447 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8418,12 +8483,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:8422: checking for tgetent in -l$lib" >&5
+echo "configure:8487: checking for tgetent in -l$lib" >&5
 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$lib "
 cat > conftest.$ac_ext <<EOF
-#line 8427 "configure"
+#line 8492 "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
@@ -8434,7 +8499,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:8438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8465,12 +8530,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:8469: checking for tgetent in -lcurses" >&5
+echo "configure:8534: checking for tgetent in -lcurses" >&5
 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcurses "
 cat > conftest.$ac_ext <<EOF
-#line 8474 "configure"
+#line 8539 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8481,7 +8546,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:8485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8499,12 +8564,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:8503: checking for tgetent in -ltermcap" >&5
+echo "configure:8568: checking for tgetent in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltermcap "
 cat > conftest.$ac_ext <<EOF
-#line 8508 "configure"
+#line 8573 "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
@@ -8515,7 +8580,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:8519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8563,15 +8628,15 @@
 
     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
-echo "configure:8567: checking for gpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8570 "configure"
+echo "configure:8632: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8635 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8594,12 +8659,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:8598: checking for Gpm_Open in -lgpm" >&5
+echo "configure:8663: checking for Gpm_Open in -lgpm" >&5
 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgpm "
 cat > conftest.$ac_ext <<EOF
-#line 8603 "configure"
+#line 8668 "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
@@ -8610,7 +8675,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8655,17 +8720,17 @@
 fi 
 
 echo "checking for database support" 1>&6
-echo "configure:8659: checking for database support" >&5
+echo "configure:8724: checking for database support" >&5
 
 if test "$with_database_gnudbm" != "no"; then
   
 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:8664: checking for dbm_open in -lgdbm" >&5
+echo "configure:8729: checking for dbm_open in -lgdbm" >&5
 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgdbm "
 cat > conftest.$ac_ext <<EOF
-#line 8669 "configure"
+#line 8734 "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
@@ -8676,7 +8741,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8698,10 +8763,10 @@
 
   if test "$with_database_gnudbm" != "yes"; then
     echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:8702: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8705 "configure"
+echo "configure:8767: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8770 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -8724,7 +8789,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -8760,10 +8825,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:8764: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8767 "configure"
+echo "configure:8829: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8832 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -8786,7 +8851,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -8807,12 +8872,12 @@
   if test "$need_libdbm" != "no"; then
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:8811: checking for dbm_open in -ldbm" >&5
+echo "configure:8876: checking for dbm_open in -ldbm" >&5
 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldbm "
 cat > conftest.$ac_ext <<EOF
-#line 8816 "configure"
+#line 8881 "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
@@ -8823,7 +8888,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:8827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8860,10 +8925,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for dbopen""... $ac_c" 1>&6
-echo "configure:8864: checking for dbopen" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8867 "configure"
+echo "configure:8929: checking for dbopen" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8932 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbopen(); below.  */
@@ -8886,7 +8951,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbopen=yes"
 else
@@ -8907,12 +8972,12 @@
   if test "$need_libdb" != "no"; then
     
 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
-echo "configure:8911: checking for dbopen in -ldb" >&5
+echo "configure:8976: checking for dbopen in -ldb" >&5
 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldb "
 cat > conftest.$ac_ext <<EOF
-#line 8916 "configure"
+#line 8981 "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
@@ -8923,7 +8988,7 @@
 dbopen()
 ; return 0; }
 EOF
-if { (eval echo configure:8927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8947,7 +9012,7 @@
   if test "$with_database_berkdb" = "yes"; then
     for path in "db/db.h" "db.h"; do
 cat > conftest.$ac_ext <<EOF
-#line 8951 "configure"
+#line 9016 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -8965,7 +9030,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -9017,12 +9082,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:9021: checking for SOCKSinit in -lsocks" >&5
+echo "configure:9086: checking for SOCKSinit in -lsocks" >&5
 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocks "
 cat > conftest.$ac_ext <<EOF
-#line 9026 "configure"
+#line 9091 "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
@@ -9033,7 +9098,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:9037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9160,6 +9225,13 @@
 
 
 
+for dir in src/s src/m; do
+  if test ! -d "$dir" ; then
+    echo Making symbolic link to "$srcdir/$dir"
+    ${LN_S} "$srcdir/$dir" "$dir"
+  fi
+done
+
 if test "$extra_verbose" = "yes"; then
   echo ""
   echo "extra_objs = \"$extra_objs\""
@@ -9180,30 +9252,13 @@
   echo "source $srcdir/src/gdbinit" > src/gdbinit
 fi
 
-cat > conftest.$ac_ext <<EOF
-#line 9185 "configure"
-#include "confdefs.h"
-
-int main() {
-#ifndef __SUNPRO_C
-#error No Sun source browser capability
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:9195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+if test "$__sunpro_c" = "yes"; then
   echo "creating .sbinit"; echo ""
-( echo "# For use with Sun WorkShop's Source browser."
-  echo "# See sbquery(1) and sbinit(4) for more information"
-  for dir in $MAKE_SUBDIR; do echo "import $dir"; done
-) > .sbinit
-
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
+  ( echo "# For use with Sun WorkShop's Source browser."
+    echo "# See sbquery(1) and sbinit(4) for more information"
+    for dir in $MAKE_SUBDIR; do echo "import $dir"; done
+  ) > .sbinit
+fi
 
 rm -f core
 
@@ -9613,23 +9668,24 @@
 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
 test "$with_energize" = yes && echo "  Compiling in support for Lucid Energize (doesn't currently work)."
 case  "$with_menubars" in
-  lucid ) echo "  Using the Lucid menubar." ;;
-  motif ) echo "  Using the Motif menubar."
-          echo "  *WARNING*  The Motif menubar is currently buggy."
+  lucid ) echo "  Using Lucid menubars." ;;
+  motif ) echo "  Using Motif menubars."
+          echo "  *WARNING*  The Motif menubar implementation is currently buggy."
           echo "             We recommend using the Lucid menubar instead."
           echo "             Re-run configure with --with-menubars='lucid'." ;;
 esac
 case "$with_scrollbars" in
-  lucid    ) echo "  Using the Lucid scrollbar."     ;;
-  motif    ) echo "  Using the Motif scrollbar."     ;;
-  athena   ) echo "  Using the Athena scrollbar."    ;;
-  athena3d ) echo "  Using the Athena-3d scrollbar." ;;
+  lucid    ) echo "  Using Lucid scrollbars."     ;;
+  motif    ) echo "  Using Motif scrollbars."     ;;
+  athena   ) echo "  Using Athena scrollbars."    ;;
+  athena3d ) echo "  Using Athena-3d scrollbars." ;;
 esac
 case "$with_dialogs" in
-  motif    ) echo "  Using the Motif dialog boxes."     ;;
-  athena   ) echo "  Using the Athena dialog boxes."    ;;
-  athena3d ) echo "  Using the Athena-3d dialog boxes." ;;
+  motif    ) echo "  Using Motif dialog boxes."     ;;
+  athena   ) echo "  Using Athena dialog boxes."    ;;
+  athena3d ) echo "  Using Athena-3d dialog boxes." ;;
 esac
+echo "  movemail will use \"$mail_locking\" for locking mail spool files."
 test "$with_pop"	= yes && echo "  Using POP for mail access"
 test "$with_kerberos"	= yes && echo "  Using Kerberos for POP authentication"
 test "$with_hesiod"	= yes && echo "  Using Hesiod to get POP server host"
@@ -9757,6 +9813,7 @@
 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
 s%@X_LIBS@%$X_LIBS%g
 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@lwlib_objs@%$lwlib_objs%g
 s%@ALLOCA@%$ALLOCA%g
 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
--- a/configure.in	Mon Aug 13 09:39:46 2007 +0200
+++ b/configure.in	Mon Aug 13 09:40:41 2007 +0200
@@ -342,7 +342,7 @@
 with_dialogs=''
 const_is_losing='yes'
 puresize=''
-cflags='NO_CFLAGS_DEFINED'
+cflags='UNSPECIFIED'
 dynamic=''
 with_x11=''
 rel_alloc='default'
@@ -370,6 +370,7 @@
 with_gif=""
 dnl the following is set to yes or no later.
 with_toolbars=""
+with_tty=""
 use_union_type="no"
 with_dnet=""
 
@@ -568,9 +569,11 @@
 
 The configure build process also used the following environment variables:
 CC        C compiler to use (but configure flags take precedence)
+CPP       C preprocessor to use (such as /usr/ccs/lib/cpp or cc -E)
 CFLAGS    C compiler compilation flags (such as -O)
-CPPFLAGS  Additional compilation flags (sucha s -I) used only by the preprocessor
-LDFLAGS   Additional linker flags
+CPPFLAGS  Additional compilation flags (such as -I/foo) used only by the preprocessor
+LDFLAGS   Additional linker flags (such as -L/foo)
+LIBS      Additional libraries (such as -lfoo)
 
 For more details on the install process, consult the INSTALL file.
 "
@@ -614,7 +617,7 @@
 while test $# != 0; do
   arg="$1"; shift
   case "$arg" in
-
+    --no-create|--no-recursion) ;;
     dnl Anything starting with a hyphen we assume is an option.
     -* )
       dnl Separate the switch name from the value it is being given.
@@ -707,6 +710,7 @@
 	dnl The cache-file option is ignored (for compatibility with other configures)
 	srcdir		| \
 	compiler	| \
+	cflags		| \
 	puresize	| \
 	cache_file	| \
 	native_sound_lib | \
@@ -886,19 +890,6 @@
            esac
 	;;
 
-	dnl Has the user specified values to override CFLAGS?
-	cflags )
-	   dnl If the value was omitted, get it from the next argument.
-	   if test "$valomitted" = "yes" ; then
-	      if test "$#" = 0; then
-                USAGE_ERROR("The \`--$optname' option requires a value.");
-	      fi
-	      val="$1"; shift
-	   fi
-	   eval "$opt=\"$val\""
-	   eval "${opt}_specified=1"
-	;;
-
 	dnl --no-create added by autoconf for use by config.status
 	"no_create" ) ;;
 
@@ -1019,11 +1010,10 @@
 dnl have stuck the source on a read-only partition.  Instead we
 dnl create it as an actual directory later on if it does not already
 dnl exist.
-for dir in lisp etc man info site-lisp
-do
+for dir in lisp etc man info site-lisp; do
   if test ! -d "$dir" ; then
     echo Making symbolic link to "$srcdir/$dir"
-    ${LN_S} "$srcdir/$dir" .
+    ${LN_S} "$srcdir/$dir" "$dir"
   fi
 done
 
@@ -1225,9 +1215,6 @@
   dnl Cubix QBx/386
   i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
 
-  dnl Cydra 5
-  cydra*-cydrome-sysv* ) machine=cydra5 opsys=usg5-3 ;;
-
   dnl Data General AViiON Machines
   i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
@@ -1249,9 +1236,6 @@
   m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
 
-  dnl Elxsi 6400
-  elxsi-elxsi-sysv* ) machine=elxsi opsys=usg5-2 ;;
-
   dnl Encore machines
   ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
 
@@ -1436,16 +1420,17 @@
       canonical="`echo \"$canonical\" | sed -e s/sunos5/solaris2/`";;
     esac
 
-    dnl On SunOS 4, use /usr/lib/cpp,     sans dynodump, /bin/ranlib
-    dnl On SunOS 5, use /usr/ccs/lib/cpp, need dynodump, RANLIB not needed
+    dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib
+    dnl On SunOS 5, use cc -E,        need dynodump, RANLIB not needed
     dnl But, SunOS 5.6 no longer needs dynodump because it has a similar
     dnl function integrated.
     case "$canonical" in
       *-sunos4* )
-        test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
+	#test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
+	: ;;
       *-solaris2* )
-        test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
-        RANLIB=':'
+	#test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
+	RANLIB=':' ;;
     esac
 
     case "$canonical" in
@@ -1601,11 +1586,14 @@
 dnl Choose a compiler.
 test -n "$CC" && cc_specified=yes
 
-dnl Save the value of CFLAGS that the user specified.
-SPECIFIED_CFLAGS="$CFLAGS"
-
 if test -n "$compiler"; then CC="$compiler"; fi
 
+dnl If we don't set CFLAGS here, AC_PROG_CC will set it.
+dnl But we know better what's good for us, so we do our own
+dnl computation of real CFLAGS later.
+test "$cflags" != "UNSPECIFIED" && CFLAGS="$cflags"
+xe_save_CFLAGS="$CFLAGS"
+
 dnl Some systems specify a CPP or CC to use unless we are using GCC.
 test -n "$NON_GNU_CC"  -a "$with_gcc" = "no" -a -z "$CC"  && CC="$NON_GNU_CC"
 AC_PROG_CC
@@ -1617,15 +1605,25 @@
   CC=gcc
   AC_PROG_CC
 fi
+CFLAGS="$xe_save_CFLAGS"
 
 if test "$GCC" = "yes"; then with_gcc=yes; else with_gcc=no; fi
 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP"
 
 AC_PROG_CPP
 
-case "$canonical" in
-  *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
-esac
+AC_AIX
+
+AC_MSG_CHECKING(whether we are using SunPro C)
+AC_TRY_COMPILE([],[#ifndef __SUNPRO_C
+#error Not a  SunPro compiler :-(
+#endif
+], __sunpro_c=yes, __sunpro_c=no)
+AC_MSG_RESULT($__sunpro_c)
+
+dnl case "$canonical" in
+dnl   *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
+dnl esac
 
 dnl --------------------------------------------------------------------
 dnl Extract some information from the operating system and machine files
@@ -1633,16 +1631,6 @@
 
 echo "Extracting information from the machine- and system-dependent headers..."
 
-dnl First figure out CFLAGS (which we use for running the compiler here)
-dnl and REAL_CFLAGS (which we use for real compilation).
-dnl The two are the same except on a few systems, where they are made
-dnl different to work around various lossages.  For example,
-dnl GCC 2.5 on Linux needs them to be different because it treats -g
-dnl as implying static linking.
-
-dnl If the CFLAGS env var is specified, we use that value
-dnl instead of the default.
-
 dnl It is not important that this name contain the PID; you cannot run
 dnl two configures in the same directory and have anything work
 dnl anyway.
@@ -1651,7 +1639,7 @@
 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE)
 define([CPP_to_sh],
 [[#]ifndef [$1]
-[#]define [$1]ifelse([$3],,, [ $3])
+[#]define [$1]ifelse([$3],,, [ "$3"])
 [#]endif
 configure___ [$2]=[$1]
 ])
@@ -1680,14 +1668,16 @@
 CPP_to_sh(LIBS_SYSTEM,  libs_system)
 CPP_to_sh(LIBS_TERMCAP, libs_termcap)
 CPP_to_sh(LIB_STANDARD, libs_standard)
-CPP_to_sh(C_SWITCH_SYSTEM,    c_switch_system)
+
 CPP_to_sh(C_SWITCH_MACHINE,   c_switch_machine)
+CPP_to_sh(C_SWITCH_SYSTEM,    c_switch_system)
 CPP_to_sh(C_SWITCH_X_SYSTEM,  c_switch_x_system)
+
+CPP_to_sh(LD_SWITCH_MACHINE,  ld_switch_machine)
+CPP_to_sh(LD_SWITCH_SYSTEM,   ld_switch_system)
 CPP_to_sh(LD_SWITCH_X_SYSTEM, ld_switch_x_system)
-CPP_to_sh(LD_SWITCH_SYSTEM,   ld_switch_system)
+
 CPP_to_sh(UNEXEC, unexec, unexec.o)
-CPP_to_sh(C_DEBUG_SWITCH, c_debug_switch, -g)
-CPP_to_sh(C_OPTIMIZE_SWITCH, c_optimize_switch, -O)
 
 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
@@ -1695,9 +1685,12 @@
 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
 
+#if 0
 #ifdef THIS_IS_CONFIGURE
 
 /* Get the CFLAGS for tests in configure.  */
+CPP_to_sh(C_DEBUG_SWITCH, c_debug_switch, -g)
+CPP_to_sh(C_OPTIMIZE_SWITCH, c_optimize_switch, -O)
 #ifdef __GNUC__
 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '$SPECIFIED_CFLAGS'
 #else
@@ -1714,26 +1707,44 @@
 #endif
 
 #endif /* not THIS_IS_CONFIGURE */
+#endif /* 0 */
 ' > $tempcname
 dnl The value of CPP is a quoted variable reference, so we need to do this
 dnl to get its actual value...
 CPP=`eval "echo $CPP"`
 eval `$CPP -Isrc $tempcname \
-	| sed -n -e "s/ *= */='/" -e "s/ *\$/'/" -e "s/^configure___//p"`
-if test -z "$SPECIFIED_CFLAGS"; then
-  eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \
-	| sed -n -e "s/ *= */='/" -e "s/ *\$/'/" -e "s/^configure___//p"`
-else
-  REAL_CFLAGS="$CFLAGS"
-fi
+	| sed -n -e "s/ *=[[ \"]]*/='/" -e "s/[[ \"]]*\$/'/" -e "s/^configure___//p"`
+
+dnl if test -z "$SPECIFIED_CFLAGS"; then
+dnl   eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \
+dnl 	| sed -n -e "s/ *=[[ \"]]*/='/" -e "s/[[ \"]]*\$/'/" -e "s/^configure___//p"`
+dnl else
+dnl   REAL_CFLAGS="$CFLAGS"
+dnl fi
 
 rm $tempcname
 
 dnl Non-ordinary link usually requires -lc
 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
 
-dnl override CFLAGS if user wishes
-test "$cflags" != "NO_CFLAGS_DEFINED" && REAL_CFLAGS="$cflags"
+dnl Calculalate value of CFLAGS:
+dnl Use either command line flag, environment var, or autodetection
+if test -z "$CFLAGS"; then
+  dnl Following values of CFLAGS are known to work well.
+  dnl Should we take debugging options into consideration?
+  if   test "$GCC" = "yes"; then
+    CFLAGS="-g -O2"
+    test "$opsys" = "linux" -a "$machine" = "intel386" && \
+      CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+  elif test "$__sunpro_c" = "yes"; then
+    case "$opsys" in
+      sol2*   ) CFLAGS="-v -xO4" ;;
+      sunos4* ) CFLAGS="-xO3";;
+    esac
+  else
+    CFLAGS="-O" # The only POSIX-approved flag
+  fi
+fi
 
 dnl Add unexec object to link line
 XE_ADD_OBJS($unexec)
@@ -1758,6 +1769,12 @@
   done
 fi
 
+dnl GNU software installs by default into /usr/local/{include,lib}
+if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
+  XE_APPEND("-L/usr/local/lib",    ld_switch_site)
+  XE_APPEND("-I/usr/local/include", c_switch_site)
+fi
+
 dnl Extra system-specific library directories - please add to list
 for dir in "/usr/ccs/lib"; do
   test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site)
@@ -1879,13 +1896,10 @@
 AC_PROG_INSTALL
 AC_PROG_YACC
 
-dnl checks for UNIX variants
-AC_AIX
-
 dnl checks for header files
 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h)
 AC_CHECK_HEADERS(utime.h locale.h libgen.h)
-AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h)
+AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h)
 AC_HEADER_SYS_WAIT
 AC_HEADER_STDC
 AC_HEADER_TIME
@@ -1965,6 +1979,7 @@
 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
 if   test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF)
 elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK)
+else mail_locking="dot-locking"
 fi
 
 dnl Used by getloadavg() - does not require root priveleges
@@ -2115,11 +2130,11 @@
   AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x))
 
   dnl Require -lXt
-  case "$canonical" in *-sunos4.* ) # Bug workaround
-   ld_switch_x_site="$ld_switch_x_site -u _XtToolkitInitialize" ;;
+  case "$opsys" in dnl SunOS4 bug workaround
+   sunos4* ) XE_PREPEND(-u _XtToolkitInitialize -lXt, libs_x) ;;
+   * ) AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x),
+        [AC_MSG_ERROR("Unable to find X11 libraries.")]) ;;
   esac
-  AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x),
-    [AC_MSG_ERROR("Unable to find X11 libraries.")])
 
   AC_MSG_CHECKING(the version of X11 being used)
   AC_TRY_RUN([#include <X11/Intrinsic.h>
@@ -2143,17 +2158,17 @@
   fi
 
   dnl autodetect -lXmu
-  case "$canonical" in *-sunos4.* ) # Bug workaround
-    ld_switch_x_site="$ld_switch_x_site -u _get_applicationShellWidgetClass" ;;
+  case "$opsys" in dnl SunOS4 bug workaround
+    sunos4* ) XE_PREPEND(-u _get_applicationShellWidgetClass -lXmu, libs_x) ;;
+    * ) if test -z "$with_xmu"; then
+	  AC_CHECK_LIB(Xmu, XmuConvertStandardSelection, with_xmu=yes, with_xmu=no)
+	fi
+	if test "$with_xmu" = "no"; then
+	  XE_ADD_OBJS(xmu.o)
+	else
+	  XE_PREPEND(-lXmu, libs_x)
+	fi ;;
   esac
-  if test -z "$with_xmu"; then
-    AC_CHECK_LIB(Xmu, XmuConvertStandardSelection, with_xmu=yes, with_xmu=no)
-  fi
-  if test "$with_xmu" = "no"; then
-    XE_ADD_OBJS(xmu.o)
-  else
-    XE_PREPEND(-lXmu, libs_x)
-  fi
 
   dnl Autodetect -lXbsd
   dnl #### Someone, please add a better function than main
@@ -2357,14 +2372,27 @@
 
 case "$all_widgets" in *athena* )
   AC_DEFINE(LWLIB_USES_ATHENA)
+  AC_DEFINE(NEED_ATHENA)
+  XE_APPEND(lwlib-Xaw.o, lwlib_objs)
   XE_PREPEND(-lXaw, libs_x) ;;
 esac
 
 case "$all_widgets" in *motif* )
   AC_DEFINE(LWLIB_USES_MOTIF)
+  AC_DEFINE(NEED_MOTIF)
+  XE_APPEND(lwlib-Xm.o, lwlib_objs)
   need_motif=yes ;;
 esac
 
+test "$with_menubars"   = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs)
+test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs)
+case "$all_widgets" in *lucid* )
+  AC_DEFINE(NEED_LUCID)
+  XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
+esac
+
+AC_SUBST(lwlib_objs)
+
 case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac
 case "$with_dialogs"    in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA)   ;; esac
 test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
@@ -2435,7 +2463,7 @@
   dnl Autodetect WNN
   test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
   test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) }
-  test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list_e, ,with_wnn=no) }
+  test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list_e, ,[:],with_wnn=no) }
   test -z "$with_wnn" && with_wnn=yes
   if test "$with_wnn" = "yes"; then
     AC_DEFINE(HAVE_WNN)
@@ -2669,9 +2697,6 @@
   if test -r $f; then AC_DEFINE_UNQUOTED(AIX_SMT_EXP, -bI:$f) break; fi
 done
 
-dnl Set up the CFLAGS for real compilation, so we can substitute it.
-CFLAGS="$REAL_CFLAGS"
-
 dnl Find out which version of XEmacs this is.
 file="$srcdir/lisp/version.el"
 version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"`
@@ -2681,7 +2706,7 @@
 fi
 beta=`sed -ne 's/^.*XEmacs Lucid (beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"`
 test -n "$beta" && version="${version}-b${beta}"
-AC_DEFINE_UNQUOTED(EMACS_VERSION, $version)
+AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
 main_1_id="`echo main_1_xemacs_${version}_${canonical} | sed 'y/.-/__/'`"
 AC_DEFINE_UNQUOTED(main_1, $main_1_id)
 
@@ -2984,6 +3009,14 @@
 AC_SUBST(MAKE_SUBDIR)
 AC_SUBST(SUBDIR_MAKEFILES)
 
+dnl Make s&m symlinks in the src directory, for config.h
+for dir in src/s src/m; do
+  if test ! -d "$dir" ; then
+    echo Making symbolic link to "$srcdir/$dir"
+    ${LN_S} "$srcdir/$dir" "$dir"
+  fi
+done
+
 if test "$extra_verbose" = "yes"; then
   echo ""
   PRINT_VAR(extra_objs,
@@ -3000,15 +3033,13 @@
 fi
 
 dnl Create top level .sbinit for Sun compilers
-AC_TRY_COMPILE([],[#ifndef __SUNPRO_C
-#error No Sun source browser capability
-#endif
-],[echo "creating .sbinit"; echo ""
-( echo "# For use with Sun WorkShop's Source browser."
-  echo "# See sbquery(1) and sbinit(4) for more information"
-  for dir in $MAKE_SUBDIR; do echo "import $dir"; done
-) > .sbinit
-])
+if test "$__sunpro_c" = "yes"; then
+  echo "creating .sbinit"; echo ""
+  ( echo "# For use with Sun WorkShop's Source browser."
+    echo "# See sbquery(1) and sbinit(4) for more information"
+    for dir in $MAKE_SUBDIR; do echo "import $dir"; done
+  ) > .sbinit
+fi
 
 dnl There are no more compile tests; remove the core they created.
 rm -f core
@@ -3217,23 +3248,24 @@
 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
 test "$with_energize" = yes && echo "  Compiling in support for Lucid Energize (doesn't currently work)."
 case  "$with_menubars" in
-  lucid ) echo "  Using the Lucid menubar." ;;
-  motif ) echo "  Using the Motif menubar."
-          echo "  *WARNING*  The Motif menubar is currently buggy."
+  lucid ) echo "  Using Lucid menubars." ;;
+  motif ) echo "  Using Motif menubars."
+          echo "  *WARNING*  The Motif menubar implementation is currently buggy."
           echo "             We recommend using the Lucid menubar instead."
           echo "             Re-run configure with --with-menubars='lucid'." ;;
 esac
 case "$with_scrollbars" in
-  lucid    ) echo "  Using the Lucid scrollbar."     ;;
-  motif    ) echo "  Using the Motif scrollbar."     ;;
-  athena   ) echo "  Using the Athena scrollbar."    ;;
-  athena3d ) echo "  Using the Athena-3d scrollbar." ;;
+  lucid    ) echo "  Using Lucid scrollbars."     ;;
+  motif    ) echo "  Using Motif scrollbars."     ;;
+  athena   ) echo "  Using Athena scrollbars."    ;;
+  athena3d ) echo "  Using Athena-3d scrollbars." ;;
 esac
 case "$with_dialogs" in
-  motif    ) echo "  Using the Motif dialog boxes."     ;;
-  athena   ) echo "  Using the Athena dialog boxes."    ;;
-  athena3d ) echo "  Using the Athena-3d dialog boxes." ;;
+  motif    ) echo "  Using Motif dialog boxes."     ;;
+  athena   ) echo "  Using Athena dialog boxes."    ;;
+  athena3d ) echo "  Using Athena-3d dialog boxes." ;;
 esac
+echo "  movemail will use \"$mail_locking\" for locking mail spool files."
 test "$with_pop"	= yes && echo "  Using POP for mail access"
 test "$with_kerberos"	= yes && echo "  Using Kerberos for POP authentication"
 test "$with_hesiod"	= yes && echo "  Using Hesiod to get POP server host"
--- a/dynodump/Makefile.in.in	Mon Aug 13 09:39:46 2007 +0200
+++ b/dynodump/Makefile.in.in	Mon Aug 13 09:40:41 2007 +0200
@@ -39,60 +39,35 @@
 CFLAGS=@CFLAGS@
 ARCH=@dynodump_arch@
 
-/* Where to find the source code.  This is set by the configure
-   "--srcdir" option.  However, the value of ${srcdir} in
-   this makefile is not identical to what was specified with --srcdir,
-   since the variable here has "/dynodump" added at the end. */
 srcdir=@srcdir@
 
 /* ========================= start of cpp stuff ========================= */
 
 #define NO_SHORTNAMES
-#define THIS_IS_YMAKEFILE
 #define NOT_C_CODE
 #include "../src/config.h"
 
-/* With the traditional VPATH setting, it is not possible to
-   simultaneously compile in-place and in another directory.  The
-   mistaken definition is that *all* dependencies are searched for in
-   the VPATH directory, rather than just the dependencies that are not
-   themselves targets.  Thus, if there is an up-to-date .o file in the
-   in-place location, it will not get recompiled in the not-in-place
-   location.
-
-   The GNU Make "vpath" directive continues this tradition, but at
-   least lets you to restrict the classes of files that it applies to.
-   This allows us to kludge around the problem. */
 #ifdef USE_GNU_MAKE
 vpath %.c @srcdir@
 vpath %.h @srcdir@
-/* now list files that should NOT be searched in the srcdir.
-   This includes any .c or .h that is built from something else
-   (e.g. a .in file). */
-/* none here */
 #else
 VPATH=@srcdir@
 #endif
 
 #ifdef USE_GCC
-# define PIC_ARG -fpic
+pic_arg = -fpic
 #else
-# define PIC_ARG -K pic
+pic_arg = -K pic
 #endif
 
 INCLUDES = -I${srcdir} -I${srcdir}/$(ARCH)
-ALL_CFLAGS = ${CFLAGS} PIC_ARG ${INCLUDES}
+ALL_CFLAGS = ${CFLAGS} ${pic_arg} ${INCLUDES}
 OBJS = _relocate.o dynodump.o syms.o uninit.o
 
 .c.o:
 	$(CC) -c $(ALL_CFLAGS) $<
 
-/* If we do not need dynodump, then do nothing. */
-#ifdef DYNODUMP
 all:: dynodump.so
-#else
-all::
-#endif
 
 dynodump.so: ${srcdir}/_dynodump.h $(OBJS)
 	PATH=/usr/ccs/bin:/bin:$$PATH ld -o dynodump.so -G $(OBJS) -lelf -lmapmalloc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/HELLO	Mon Aug 13 09:40:41 2007 +0200
@@ -0,0 +1,41 @@
+You need many fonts to read all.
+Please correct this incomplete list and add more!
+
+---------------------------------------------------------
+Amharic	($(2"S!,!6!l(B)	$(2#Q!$!.(B
+Arabic			[2](38R(47d(3T!JSa(4W(3W[0](B
+Croatian		Zdravo
+Danish (Dansk)		Hej, Goddag
+English			Hello
+Esperanto		Saluton
+Estonian		Tere, Tervist
+FORTRAN			PROGRAM
+Finnish (Suomi)		Hei
+French (Fran,Ag(Bais)	Bonjour, Salut
+German (Deutsch Nord)	Guten Tag
+German (Deutsch S,A|(Bd)	Gr,A|_(B Gott
+Greek (,FGkk]mija(B)	,FCei\(B ,Fsar(B
+Hebrew			[2],Hylem[0](B
+Italiano		Ciao, Buon giorno
+Maltese			Ciao
+Nederlands, Vlaams	Hallo, Dag
+Norwegian (Norsk)	Hei, God dag
+Polish			Dzien Dobry, Hej
+Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!
+Spanish (Espa,Aq(Bol)	,A!(BHola!
+Swedish (Svenska)	Hej, Goddag
+Thai (,T@RIRd7B(B)		,TJ0GQ1J04U1$0CQ1:(B, ,TJ0GQ1J04U10$h1P(B
+Tigrigna ($(2!V#>!6!l(B)	$(2"C!$!,!V(B
+Turkish (T,A|(Brk,Ag(Be)	Merhaba
+Vietnamese (Ti,1*(Bng Vi,1.(Bt)	Ch,1`(Bo b,1U(Bn
+
+Japanese ($BF|K\8l(B)		$B$3$s$K$A$O(B, (I:]FAJ(B, $BqV$(DiQ(B
+Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B)	$ADc:C(B
+Cantonese ($(0GnM$(B,$(0N]0*Hd(B)		$(0*/=((B, $(0+$)p(B
+Hangul ($(CGQ1[(B)			$(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B
+
+Difference among chinese characters in GB, JIS, KSC, BIG5:
+	GB   -- $AT*Fx(B  $A?*7"(B  
+	JIS  -- $B855$(B  $B3+H/(B
+	KSC  -- $(Cj*Q((B  $(CKR[!(B
+	BIG5 -- $(0&x86(B  $(0DeBv(B
--- a/etc/NEWS	Mon Aug 13 09:39:46 2007 +0200
+++ b/etc/NEWS	Mon Aug 13 09:40:41 2007 +0200
@@ -109,7 +109,14 @@
 * Changes in XEmacs 20.3
 ========================
 
-** Autoconf 2 is supported.
+** XEmacs runs on Windows NT.
+
+Thanks to David Hobley <davidh@wr.com.au> and Marc Paquette
+<marcpa@cam.org>, XEmacs now runs on Windows NT.
+
+For now, you need an X server to be able to run it, but Marc is
+working on a port that implements a native NT device.  We need *your*
+help.
 
 ** Multiple TTY frames are now available.
 
@@ -117,6 +124,35 @@
 creating a new frame with `C-x 5 2' also raises and selects that
 frame.  The behavior of window system frames is unchanged.
 
+** C-x n d now runs the new command narrow-to-defun,
+which narrows the accessible parts of the buffer to just
+the current defun.
+
+** The new command C-x 4 0 (kill-buffer-and-window) kills the
+current buffer and deletes the selected window.  It asks for
+confirmation first.
+
+** XEmacs can now save the minibuffer histories from various
+minibuffers.  To use this feature, add the line:
+
+   (savehist-load)
+
+to your .emacs.  This will load the minibuffer histories (if any) at
+startup, as well as instruct XEmacs to save them before exiting.  You
+can use Customize to add or remove the histories being saved.
+
+** Gnuserv changes
+
+*** The Lisp part of gnuserv has been rewritten to allow for more
+flexibility and features.
+
+*** Many new options and variables are now customizable.  Try
+`M-x customize-group RET gnuserv RET'.
+
+*** The `gnuattact' and `gnudoit' programs have been abandoned in
+favor of `gnuclient', which now accepts the standard `-nw',
+`-eval' and `-f' options.
+
 ** Etags changes.
 
 *** In C, C++, Objective C and Java, Etags tags global variables by
@@ -153,6 +189,13 @@
 * Lisp and internal changes in XEmacs 20.3
 ==========================================
 
+** Autoconf 2 is supported, making XEmacs more conforming to
+conventions used by other free software.
+
+** tty-erase-char is a new variable that reports which character
+was set up as the terminal's erase character at the tim Emacs was started.
+
+
 
 * Changes in XEmacs 20.2
 ========================
--- a/lib-src/Makefile.in.in	Mon Aug 13 09:39:46 2007 +0200
+++ b/lib-src/Makefile.in.in	Mon Aug 13 09:40:41 2007 +0200
@@ -53,7 +53,6 @@
 YACC=@YACC@
 LN_S=@LN_S@
 version=@version@
-configuration=@configuration@
 
 /* ==================== Where To Install Things ==================== */
 
@@ -189,51 +188,7 @@
 
 /* We will not really call alloca;
    do not let the file name alloca.c get messed up.  */
-#ifdef alloca
 #undef alloca
-#endif
-
-/* Some s/*.h files define this to request special libraries.  */
-#ifndef LIBS_SYSTEM
-#define LIBS_SYSTEM
-#endif
-
-/* Some m/*.h files define this to request special libraries.  */
-#ifndef LIBS_MACHINE
-#define LIBS_MACHINE
-#endif
-
-#ifndef LD_SWITCH_X_SYSTEM
-#define LD_SWITCH_X_SYSTEM
-#endif
-
-#ifndef LD_SWITCH_X_SITE
-#define LD_SWITCH_X_SITE
-#endif
-
-#ifndef C_SWITCH_SYSTEM
-#define C_SWITCH_SYSTEM
-#endif
-
-#ifndef C_SWITCH_MACHINE
-#define C_SWITCH_MACHINE
-#endif
-
-#ifndef C_SWITCH_X_SYSTEM
-#define C_SWITCH_X_SYSTEM
-#endif
-
-#ifndef C_SWITCH_X_SITE
-#define C_SWITCH_X_SITE
-#endif
-
-#ifndef C_SWITCH_SITE
-#define C_SWITCH_SITE
-#endif
-
-#ifndef LD_SWITCH_SITE
-#define LD_SWITCH_SITE
-#endif
 
 #undef MOVEMAIL_NEEDS_BLESSING
 #ifndef MAIL_USE_FLOCK
@@ -248,12 +203,6 @@
 #define BLESSMAIL
 #endif
 
-/* #if defined (HAVE_SOCKS) */
-/* #define LIB_SOCKS -lsocks */
-/* #else */
-/* #define LIB_SOCKS */
-/* #endif */
-
 c_switch_general=@c_switch_general@
 c_switch_window_system=@c_switch_window_system@
 c_switch_all=@c_switch_all@
@@ -264,9 +213,6 @@
 ld_libs_window_system=@ld_libs_window_system@
 ld_libs_all=@ld_libs_all@
 
-/* LOADLIBES=LIBS_SYSTEM LIBS_MACHINE LIB_SOCKS LD_SWITCH_SITE */
-/* LOAD_X_LIBES=LD_SWITCH_X_SITE LD_SWITCH_X_SYSTEM */
-/* C_SWITCH_X=C_SWITCH_X_SITE C_SWITCH_X_SYSTEM C_SWITCH_SITE */
 LOADLIBES=$(ld_switch_general) $(ld_libs_general)
 LOAD_X_LIBES=$(ld_switch_window_system)
 C_SWITCH_X=$(c_switch_window_system)
@@ -274,21 +220,9 @@
 /* We need to #define emacs to get the right versions of some files. */
 
 lib_src_cppflags = -Demacs -I../src -I${srcdir} -I${srcdir}/../src $(CPPFLAGS)
-cflags  = $(CFLAGS) $(lib_src_cppflags) $(c_switch_general)
-ldflags = $(LDFLAGS) $(ld_switch_general) $(ld_libs_general)
-
-/* CPP_CFLAGS =  $(c_switch_general) -Demacs -DHAVE_CONFIG_H \ */
-/*    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} */
-/* BASE_CFLAGS = -DHAVE_CONFIG_H \ */
-/*     -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} */
-/* ALL_CFLAGS = $(BASE_CFLAGS) -Demacs */
-/* LINK_CFLAGS = $(ALL_CFLAGS) -Demacs -DHAVE_CONFIG_H \ */
-/*    -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} */
-/*   Formerly -Demacs was missing, but it is needed to suppress the */
-/*    defining of malloc to xmalloc.  [Yes it is fucked up.  Blame FSF */
-/*    for this.] */
-/* ALLOCA_CFLAGS = -Demacs -DHAVE_CONFIG_H \ */
-/*    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} */
+lib_src_cppflags = -Demacs -I../src $(CPPFLAGS)
+cflags  = $(CFLAGS) $(lib_src_cppflags) $(c_switch_all)
+ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_libs_general)
 
 /* This is the default compilation command.
    But we should never rely on it, because some make version
--- a/lib-src/etags.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lib-src/etags.c	Mon Aug 13 09:40:41 2007 +0200
@@ -86,7 +86,7 @@
 #endif
 
 #ifdef LONG_OPTIONS
-# include <getopt.h>
+# include "getopt.h"
 #else
 # define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr)
   extern char *optarg;
@@ -94,7 +94,7 @@
 #endif /* LONG_OPTIONS */
 
 #ifdef ETAGS_REGEXPS
-# include <regex.h>
+# include "../src/regex.h"
 #endif /* ETAGS_REGEXPS */
 
 /* Define CTAGS to make the program "ctags" compatible with the usual one.
--- a/lib-src/movemail.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lib-src/movemail.c	Mon Aug 13 09:40:41 2007 +0200
@@ -61,7 +61,7 @@
 #include <sys/file.h>
 #include <stdio.h>
 #include <errno.h>
-#include <../src/syswait.h>
+#include "../src/syswait.h"
 #include <stdlib.h>
 #include <string.h>
 #ifdef MAIL_USE_POP
--- a/lib-src/profile.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lib-src/profile.c	Mon Aug 13 09:40:41 2007 +0200
@@ -37,7 +37,7 @@
 #if __STDC__ || defined(STDC_HEADERS)
 #include <stdlib.h>
 #endif
-#include <../src/systime.h>
+#include "../src/systime.h"
 
 static struct timeval TV1, TV2;
 static int watch_not_started = 1; /* flag */
--- a/lisp/ChangeLog	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 09:40:41 2007 +0200
@@ -1,3 +1,27 @@
+1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/keydefs.el, modes/cc-mode.el, modes/cperl-mode.el,
+	vm/vm-vars.el:
+	Change usage of \177 to use keysym 'delete.
+	From  Gary D. Foster <Gary.Foster@Corp.Sun.COM>
+
+	* packages/etags.el (tags-loop-scan): Don't pass a straight string 
+	to error as a format string.
+	Reported by Miles Duke <mduke@erdas.com>
+
+	* its/its-kata.el ((require 'egg)): Needed for bytecompilation.
+
+	* its/its-hira.el ((require 'egg)): Needed for bytecompilation.
+
+	* bytecomp/bytecomp.el (byte-compile-two-args-19->20): Correct an
+	ebolifaction.
+	From Kyle Jones <kyle_jones@wonderworks.com>
+
+1997-06-08  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/files.el (auto-mode-alist): Restore  bash regexps.
+	From "Barry A. Warsaw" <bwarsaw@CNRI.Reston.VA.US>
+
 1997-06-05  Steven L Baur  <steve@altair.xemacs.org>
 
 	* packages/jka-compr.el (jka-compr-write-region): Use 'binary
--- a/lisp/bytecomp/bytecomp.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/bytecomp/bytecomp.el	Mon Aug 13 09:40:41 2007 +0200
@@ -3025,7 +3025,7 @@
       (byte-compile-subr-wrong-args form 2)
     (byte-compile-form (car (cdr form)))  ;; Push the arguments
     (byte-compile-form (nth 2 form))
-    (if t ;(byte-compile-version-cond byte-compile-emacs19-compatibility)
+    (if (byte-compile-version-cond byte-compile-emacs19-compatibility)
 	(byte-compile-out (get (car form) 'byte-opcode19) 0)
       (byte-compile-out (get (car form) 'byte-opcode) 0))))
 
--- a/lisp/custom/ChangeLog	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/custom/ChangeLog	Mon Aug 13 09:40:41 2007 +0200
@@ -1,3 +1,18 @@
+Wed Jun 04 13:24:36 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9908 released.
+
+Tue Jun  3 02:46:21 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-kill-line): Fixed for overlays.
+	Reported by Hrvoje Niksic <hniksic@srce.hr>.
+
+	* cus-edit.el (custom-buffer-create-internal): Show full
+	documentation string in buffers with only a single item.
+	Suggested by Steven L Baur <steve@xemacs.org>.
+
+	* cus-edit.el (custom-mode-map): Suppress keymap.
+
 Tue Jun 03 02:05:13 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
 
 	* Version 1.9907 released.
--- a/lisp/custom/cus-edit.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/custom/cus-edit.el	Mon Aug 13 09:40:41 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9907
+;; Version: 1.9908
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -959,6 +959,7 @@
 	(if (= (length options) 1)
 	    (mapcar (lambda (entry)
 		      (widget-create (nth 1 entry)
+				     :documentation-shown t
 				     :custom-state 'unknown
 				     :tag (custom-unlispify-tag-name
 					   (nth 0 entry))
@@ -2556,6 +2557,7 @@
 (unless custom-mode-map
   (setq custom-mode-map (make-sparse-keymap))
   (set-keymap-parent custom-mode-map widget-keymap)
+  (suppress-keymap custom-mode-map)
   (define-key custom-mode-map "q" 'bury-buffer))
 
 (easy-menu-define custom-mode-customize-menu 
--- a/lisp/custom/cus-face.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/custom/cus-face.el	Mon Aug 13 09:40:41 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9907
+;; Version: 1.9908
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;;; Commentary:
--- a/lisp/custom/custom.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/custom/custom.el	Mon Aug 13 09:40:41 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9907
+;; Version: 1.9908
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
--- a/lisp/custom/wid-browse.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/custom/wid-browse.el	Mon Aug 13 09:40:41 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: extensions
-;; Version: 1.9907
+;; Version: 1.9908
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
--- a/lisp/custom/wid-edit.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/custom/wid-edit.el	Mon Aug 13 09:40:41 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: extensions
-;; Version: 1.9907
+;; Version: 1.9908
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -974,11 +974,11 @@
 (defun widget-kill-line ()
   "Kill to end of field or end of line, whichever is first."
   (interactive)
-  (let ((field (get-char-property (point) 'field))
-	(newline (save-excursion (forward-line 1)))
-	(next (next-single-property-change (point) 'field)))
-    (if (and field (> newline next))
-	(kill-region (point) next)
+  (let* ((field (widget-field-find (point)))
+	 (newline (save-excursion (forward-line 1) (point)))
+	 (end (and field (widget-field-end field))))
+    (if (and field (> newline end))
+	(kill-region (point) end)
       (call-interactively 'kill-line))))
 
 (defcustom widget-complete-field (lookup-key global-map "\M-\t")
--- a/lisp/custom/widget-example.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/custom/widget-example.el	Mon Aug 13 09:40:41 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.9907
+;; Version: 1.9908
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 (require 'widget)
--- a/lisp/custom/widget.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/custom/widget.el	Mon Aug 13 09:40:41 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.9907
+;; Version: 1.9908
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
--- a/lisp/gnus/ChangeLog	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/gnus/ChangeLog	Mon Aug 13 09:40:41 2007 +0200
@@ -1,3 +1,8 @@
+1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
+
+	* gnus-msg.el (gnus-extended-version): Put XEmacs codename in
+	default X-Mailer/X-Newsreader if the symbol exists.
+
 Sat May 31 15:41:09 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
 	* gnus.el: Gnus v5.4.56 is released.
--- a/lisp/gnus/gnus-msg.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/gnus/gnus-msg.el	Mon Aug 13 09:40:41 2007 +0200
@@ -537,7 +537,9 @@
 		 (substring emacs-version
 			    (match-beginning 3)
 			    (match-end 3))
-	       "")))
+	       "")
+	     (if (boundp 'xemacs-codename)
+		 (concat " - \"" xemacs-codename "\""))))
     (t emacs-version))))
 
 ;; Written by "Mr. Per Persson" <pp@gnu.ai.mit.edu>.
--- a/lisp/its/its-hira.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/its/its-hira.el	Mon Aug 13 09:40:41 2007 +0200
@@ -27,6 +27,8 @@
 ;; 92.7.6   modified for Mule Ver.0.9.5 by K.Handa <handa@etl.go.jp>
 ;;	New rules added.
 
+(eval-when-compile (require 'egg))
+
 (its-define-mode "roma-kana" "$B$"(B" t)
 
 (its-defrule-select-mode-temporally "q" "downcase")
--- a/lisp/its/its-kata.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/its/its-kata.el	Mon Aug 13 09:40:41 2007 +0200
@@ -28,6 +28,9 @@
 
 ;; 92.3.16 by K.Handa
 ;;(define-its-mode "roma-kata"  " a$B%"(B" t)
+
+(eval-when-compile (require 'egg))
+
 (its-define-mode "roma-kata"  "$B%"(B" t)
 
 (dolist (aa '("k" "s" "t" "h" "y" "r" "w" "g" "z" "d" "b"
--- a/lisp/modes/cc-mode.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/modes/cc-mode.el	Mon Aug 13 09:40:41 2007 +0200
@@ -1037,7 +1037,7 @@
   (define-key c-mode-map "\C-c\C-p"  'c-backward-conditional)
   (define-key c-mode-map "\C-c\C-u"  'c-up-conditional)
   (define-key c-mode-map "\t"        'c-indent-command)
-  (define-key c-mode-map "\177"      'c-electric-delete)
+  (define-key c-mode-map 'delete     'c-electric-delete)
   ;; these are new keybindings, with no counterpart to BOCM
   (define-key c-mode-map ","         'c-electric-semi&comma)
   (define-key c-mode-map "*"         'c-electric-star)
--- a/lisp/modes/cperl-mode.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/modes/cperl-mode.el	Mon Aug 13 09:40:41 2007 +0200
@@ -32,7 +32,7 @@
 ;;; Corrections made by Ilya Zakharevich ilya@math.mps.ohio-state.edu
 ;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de
 
-;; $Id: cperl-mode.el,v 1.8 1997/06/06 00:57:17 steve Exp $
+;; $Id: cperl-mode.el,v 1.9 1997/06/10 03:19:09 steve Exp $
 
 ;;; To use this mode put the following into your .emacs file:
 
@@ -713,7 +713,7 @@
   (cperl-define-key "\e\C-q" 'cperl-indent-exp) ; Usually not bound
   ;;(cperl-define-key "\M-q" 'cperl-fill-paragraph)
   ;;(cperl-define-key "\e;" 'cperl-indent-for-comment)
-  (cperl-define-key "\177" 'cperl-electric-backspace)
+  (cperl-define-key 'delete 'cperl-electric-backspace)
   (cperl-define-key "\t" 'cperl-indent-command)
   ;; don't clobber the backspace binding:
   (cperl-define-key "\C-hf" 'cperl-info-on-command [(control h) f])
--- a/lisp/packages/etags.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/packages/etags.el	Mon Aug 13 09:40:41 2007 +0200
@@ -827,8 +827,8 @@
   "Form for `tags-loop-continue' to eval to change one file.")
 
 (defvar tags-loop-scan
-  '(error (substitute-command-keys
-           "No \\[tags-search] or \\[tags-query-replace] in progress."))
+  '(error "%s" (substitute-command-keys
+		"No \\[tags-search] or \\[tags-query-replace] in progress."))
   "Form for `tags-loop-continue' to eval to scan one file.
 If it returns non-nil, this file needs processing by evalling
 \`tags-loop-operate'.  Otherwise, move on to the next file.")
--- a/lisp/prim/about.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/prim/about.el	Mon Aug 13 09:40:41 2007 +0200
@@ -1087,7 +1087,6 @@
        (print-short "ChangGil Han" "cghan@phys401.phys.pusan.ac.kr")
        (print-short "Derek Harding" "dharding@lssec.bt.co.uk")
        (print-short "Michael Harnois" "mharnois@sbt.net")
-       (print-short "Yoshiaki Kasahara" "kasahara@nc.kyushu-u.ac.jp")
        (print-short "John Haxby" "J.Haxby@isode.com")
        (print-short "Karl M. Hegbloom" "karlheg@inetarena.com")
        (print-short "Benedikt Heinen" "beh@icemark.thenet.ch")
@@ -1148,7 +1147,6 @@
        (print-short "Heiko Muenkel" "muenkel@tnt.uni-hannover.de")
        (print-short "Arup Mukherjee" "arup+@cs.cmu.edu")
        (print-short "Colas Nahaboo" "Colas.Nahaboo@sophia.inria.fr")
-       (print-short "TSUTOMU Nakamura" "tsutomu@rs.kyoto.omronsoft.co.jp")
        (print-short "Lynn D. Newton" "lynn@ives.phx.mcd.mot.com")
        (print-short "Casey Nielson" "knielson@joule.elee.calpoly.edu")
        (print-short "Georg Nikodym" "Georg.Nikodym@canada.sun.com")
@@ -1203,7 +1201,9 @@
        (print-short "James Thompson" "thompson@wg2.waii.com")
        (print-short "Raymond L. Toy" "toy@rtp.ericsson.se")
        (print-short "Remek Trzaska" "remek@npac.syr.edu")
+       (print-short "TSUTOMU Nakamura" "tsutomu@rs.kyoto.omronsoft.co.jp")
        (print-short "John Turner" "turner@xdiv.lanl.gov")
+       (print-short "UENO Fumihiro" "7m2vej@ritp.ye.IHI.CO.JP")
        (print-short "Juan E. Villacis" "jvillaci@cs.indiana.edu")
        (print-short "Jan Vroonhof" "vroonhof@math.ethz.ch")
        (print-short "Vladimir Vukicevic" "vladimir@intrepid.com")
--- a/lisp/prim/files.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/prim/files.el	Mon Aug 13 09:40:41 2007 +0200
@@ -1116,6 +1116,10 @@
     ("\\.mss\\'" . scribe-mode)
     ("\\.m\\([mes]\\|an\\)\\'" . nroff-mode)
     ("\\.icn\\'" . icon-mode)
+    ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
+    ("/\\.\\(bash_profile\\|z?login\\|bash_login\\|z?logout\\)\\'" . sh-mode)
+    ("/\\.\\(bash_logout\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode)
+    ("/\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode)
 ;;; The following should come after the ChangeLog pattern
 ;;; for the sake of ChangeLog.1, etc.
 ;;; and after the .scm.[0-9] pattern too.
--- a/lisp/prim/keydefs.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/prim/keydefs.el	Mon Aug 13 09:40:41 2007 +0200
@@ -95,7 +95,7 @@
 (define-key global-map "\C-e" 'end-of-line)
 (define-key global-map "\C-f" 'forward-char)
 (define-key global-map "\C-d" 'delete-char)
-(define-key global-map "\177" 'backspace-or-delete)
+(define-key global-map 'delete 'backspace-or-delete)
 
 ;; FSFmacs files.el
 
@@ -271,7 +271,7 @@
 (define-key global-map "\M-f" 'forward-word)
 (define-key global-map "\M-b" 'backward-word)
 (define-key global-map "\M-d" 'kill-word)
-(define-key global-map "\M-\177" 'backward-kill-word)
+;;(define-key global-map "\M-\177" 'backward-kill-word)
 
 (define-key global-map "\M-<" 'beginning-of-buffer)
 (define-key global-map "\M->" 'end-of-buffer)
@@ -337,7 +337,7 @@
 (define-key global-map "\M-a" 'backward-sentence)
 (define-key global-map "\M-e" 'forward-sentence)
 (define-key global-map "\M-k" 'kill-sentence)
-(define-key global-map "\C-x\177" 'backward-kill-sentence)
+;;(define-key global-map "\C-x\177" 'backward-kill-sentence)
 
 (define-key global-map "\C-x[" 'backward-page)
 (define-key global-map "\C-x]" 'forward-page)
--- a/lisp/utils/savehist.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/utils/savehist.el	Mon Aug 13 09:40:41 2007 +0200
@@ -4,7 +4,7 @@
 
 ;; Author: Hrvoje Niksic <hniksic@srce.hr>
 ;; Keywords: minibuffer
-;; Version: 0.2
+;; Version: 0.3
 
 ;; This file is part of XEmacs.
 
@@ -75,6 +75,12 @@
     read-expression-history
     ;; shell-command (`M-!')
     shell-command-history
+    ;; compile
+    compile-history
+    ;; find-tag (`M-.')
+    find-tag-history
+    ;; grep
+    grep-history
     ;; Viper stuff
     vip-ex-history vip-search-history
     vip-replace1-history vip-replace2-history
@@ -90,20 +96,17 @@
 
     ;; GNU Emacs-specific:
     ;; Extended commands
-    extended-command-history
-
-    ;; This is not a list, but it's cool to have it anyway, since it's
-    ;; minibuffer history too.
-    compile-command)
+    extended-command-history)
   "*List of symbols to be saved.
-Every symbol should refer to a variable.  The variable will be saved only
-if it is bound is bound, and has a non-nil value.  Thus it is safe to
-specify a superset of the variables a user is expected to want to save.
+Every symbol should refer to a variable.  The variable will be saved
+only if it is bound and has a non-nil value.  Thus it is safe to
+specify a superset of the variables a user is expected to want to
+save.
 
 Default value contains minibuffer history variables used by XEmacs, GNU
-Emacs and Viper (uh-oh).  `compile-command' was added for good measure."
+Emacs and Viper (uh-oh)."
   :type '(repeat (symbol :tag "Variable"))
-  :group 'minibuffer)
+  :group 'savehist)
 
 (defcustom savehist-file "~/.emacs-history"
   "*File name to save minibuffer history to.
@@ -120,6 +123,11 @@
 		 (const :tag "Unlimited" nil))
   :group 'savehist)
 
+(defcustom savehist-modes 384
+  "*Default permissions of the history file."
+  :type 'integer
+  :group 'savehist)
+
 
 ;; Functions
 
@@ -135,8 +143,7 @@
   (interactive "P")
   (unless prefix
     (add-hook 'kill-emacs-hook 'savehist-save))
-  (when (file-exists-p savehist-file)
-    (load savehist-file)))
+  (load savehist-file t))
 
 ;;;###autoload
 (defun savehist-save ()
@@ -167,13 +174,14 @@
 						       savehist-length)))
 		 (current-buffer))
 		(insert ?\n)))
-	    (save-buffer))
+	    (save-buffer)
+	    (set-file-modes savehist-file savehist-modes))
 	(or buffer-exists-p
 	    (kill-buffer (current-buffer)))))))
 
-;; If ARG is a arg with less than N elements, return it, else return
-;; its subsequence of N elements.  If N is nil, always return ARG.  If
-;; ARG is not a list, just return it.
+;; If ARG is a list with less than N elements, return it, else return
+;; its subsequence of N elements.  If N is nil or ARG is not a list,
+;; always return ARG.
 (defun savehist-delimit (arg n)
   (if (and n
 	   (listp arg)
--- a/lisp/version.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/version.el	Mon Aug 13 09:40:41 2007 +0200
@@ -23,9 +23,21 @@
 ;;; Code:
 
 (defconst emacs-version "20.3"
-  "Version numbers of this version of Emacs.")
+  "Version numbers of this version of XEmacs.")
+
+(defconst xemacs-codename "Zagreb"
+  "Release nickname, primarily useful for trial prereleases.
+Warning, this variable did not exist in XEmacs versions prior to 20.3")
 
-(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid (beta4)")))
+(defconst xemacs-betaname "(beta5)"
+  "Non-nil when this is a test (beta) version of XEmacs.
+Warning, this variable did not exist in XEmacs versions prior to 20.3")
+
+(setq emacs-version (purecopy (concat emacs-version
+				      " \""
+				      xemacs-codename
+				      "\" XEmacs Lucid "
+				      xemacs-betaname)))
 
 (defconst emacs-major-version
   (progn (or (string-match "^[0-9]+" emacs-version)
--- a/lisp/vm/vm-vars.el	Mon Aug 13 09:39:46 2007 +0200
+++ b/lisp/vm/vm-vars.el	Mon Aug 13 09:40:41 2007 +0200
@@ -2347,7 +2347,7 @@
     (define-key map "t" 'vm-expose-hidden-headers)
     (define-key map " " 'vm-scroll-forward)
     (define-key map "b" 'vm-scroll-backward)
-    (define-key map "\177" 'vm-scroll-backward)
+    (define-key map 'delete 'vm-scroll-backward)
     (define-key map 'backspace 'vm-scroll-backward)
     (define-key map "D" 'vm-decode-mime-message)
     (define-key map "d" 'vm-delete-message)
--- a/lwlib/Makefile.in.in	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/Makefile.in.in	Mon Aug 13 09:40:41 2007 +0200
@@ -32,9 +32,6 @@
 #undef linux
 
 srcdir=@srcdir@
-/* C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ */
-/* C_SWITCH_SITE=@C_SWITCH_SITE@ */
-
 
 SHELL=/bin/sh
 
@@ -49,175 +46,31 @@
 AR = ar cq
 @SET_MAKE@
 
-#define THIS_IS_YMAKEFILE
 #define NOT_C_CODE
 #include "../src/config.h"
 
-/* With the traditional VPATH setting, it is not possible to
-   simultaneously compile in-place and in another directory.  The
-   mistaken definition is that *all* dependencies are searched for in
-   the VPATH directory, rather than just the dependencies that are not
-   themselves targets.  Thus, if there is an up-to-date .o file in the
-   in-place location, it will not get recompiled in the not-in-place
-   location.
-
-   The GNU Make "vpath" directive continues this tradition, but at
-   least lets you restrict the classes of files that it applies to.
-   This allows us to kludge around the problem. */
 #ifdef USE_GNU_MAKE
 vpath %.c @srcdir@
 vpath %.h @srcdir@
-/* now list files that should NOT be searched in the srcdir.
-   This includes any .c or .h built from something else
-   (e.g. a .in file). */
-/* none here */
 #else
 VPATH=@srcdir@
 #endif
 
-#ifndef C_SWITCH_MACHINE
-#define C_SWITCH_MACHINE
-#endif
-
-#ifndef C_SWITCH_SYSTEM
-#define C_SWITCH_SYSTEM
-#endif
-
-#ifndef C_SWITCH_X_SYSTEM
-#define C_SWITCH_X_SYSTEM
-#endif
-
-#ifndef C_SWITCH_X_MACHINE
-#define C_SWITCH_X_MACHINE
-#endif
-
-#if defined (CONST_IS_LOSING)
-# define CONST_FLAG -DCONST_IS_LOSING
-#else
-# define CONST_FLAG
-#endif
-
-#if defined (LWLIB_MENUBARS_LUCID)
-# define LWLIB_MENUBARS -DMENUBARS_LUCID
-#else
-# if defined (LWLIB_MENUBARS_MOTIF)
-#  define LWLIB_MENUBARS -DMENUBARS_MOTIF
-# else
-#  define LWLIB_MENUBARS
-# endif
-#endif
-
-#if defined (LWLIB_SCROLLBARS_LUCID)
-# define LWLIB_SCROLLBARS -DSCROLLBARS_LUCID
-#else
-# if defined (LWLIB_SCROLLBARS_MOTIF)
-#  define LWLIB_SCROLLBARS -DSCROLLBARS_MOTIF
-# else
-#  if defined (LWLIB_SCROLLBARS_ATHENA)
-#   define LWLIB_SCROLLBARS -DSCROLLBARS_ATHENA
-#  else
-#   define LWLIB_SCROLLBARS
-#  endif
-# endif
-#endif
-
-#if defined (LWLIB_DIALOGS_MOTIF)
-# define LWLIB_DIALOGS -DDIALOGS_MOTIF
-#else
-# if defined (LWLIB_DIALOGS_ATHENA)
-#  define LWLIB_DIALOGS -DDIALOGS_ATHENA
-# else
-#  define LWLIB_DIALOGS
-# endif
+#ifdef ENERGIZE
+EZ_OBJS =\
+ energize/blpsheet.o energize/build.o energize/classbr_ps.o \
+ energize/ctreebr_ps.o energize/debuggerps.o energize/editmode.o \
+ energize/leb_psheet.o energize/projectdisp.o energize/projectps.o \
+ energize/search.o energize/target.o
+ENERGIZEP = -DENERGIZE
+EZ_SUBDIR = ez_dialog
 #endif
 
-#undef NEED_TOOLKIT
-
-/* If Motif was chosen as the tookit for anything, then
-   LWLIB_USES_MOTIF should have gotten defined. */
-#if defined (LWLIB_USES_MOTIF)
-# ifndef NEED_TOOLKIT
-#  define NEED_TOOLKIT
-# endif
-# define NEED_MOTIF -DNEED_MOTIF
-# define MOTIF_SRCS lwlib-Xm.c
-# define MOTIF_OBJS lwlib-Xm.o
-#else
-# define NEED_MOTIF
-# define MOTIF_SRCS
-# define MOTIF_OBJS
-#endif
-
-#if defined (LWLIB_MENUBARS_LUCID) || defined (LWLIB_SCROLLBARS_LUCID)
-# ifndef NEED_TOOLKIT
-#  define NEED_TOOLKIT
-# endif
-# define NEED_LUCID -DNEED_LUCID
-# ifdef LWLIB_MENUBARS_LUCID
-#  define LUCID_MENUBAR_SRCS xlwmenu.c
-#  define LUCID_MENUBAR_OBJS xlwmenu.o
-# else
-#  define LUCID_MENUBAR_SRCS
-#  define LUCID_MENUBAR_OBJS
-# endif
-# ifdef LWLIB_SCROLLBARS_LUCID
-#  define LUCID_SCROLLBAR_SRCS xlwscrollbar.c
-#  define LUCID_SCROLLBAR_OBJS xlwscrollbar.o
-# else
-#  define LUCID_SCROLLBAR_SRCS
-#  define LUCID_SCROLLBAR_OBJS
-# endif
-# define LUCID_SRCS lwlib-Xlw.c LUCID_MENUBAR_SRCS LUCID_SCROLLBAR_SRCS
-# define LUCID_OBJS lwlib-Xlw.o LUCID_MENUBAR_OBJS LUCID_SCROLLBAR_OBJS
-#else
-# define NEED_LUCID
-# define LUCID_SRCS
-# define LUCID_OBJS
-#endif
+lwlib_objs=@lwlib_objs@
 
-#if defined (LWLIB_SCROLLBARS_ATHENA) || defined (LWLIB_DIALOGS_ATHENA)
-# ifndef NEED_TOOLKIT
-#  define NEED_TOOLKIT
-# endif
-# define NEED_ATHENA -DNEED_ATHENA
-# define ATHENA_SRCS lwlib-Xaw.c
-# define ATHENA_OBJS lwlib-Xaw.o
-#else
-# define NEED_ATHENA
-# define ATHENA_SRCS
-# define ATHENA_OBJS
-#endif
+OBJS = lwlib.o lwlib-utils.o lwlib-config.o $(EZ_OBJS) ${lwlib_objs}
 
-#ifdef ENERGIZE
-EZ_OBJS = energize/blpsheet.o energize/build.o energize/classbr_ps.o \
-          energize/ctreebr_ps.o energize/debuggerps.o \
-          energize/editmode.o energize/leb_psheet.o \
-          energize/projectdisp.o energize/projectps.o \
-          energize/search.o energize/target.o
-ENERGIZEP = -DENERGIZE
-EZ_SUBDIR = ez_dialog
-#else
-EZ_OBJS =
-ENERGIZEP =
-EZ_SUBDIR =
-#endif
-
-#if defined (HAVE_X_WINDOWS)
-# ifndef NEED_TOOLKIT
-#  define NEED_TOOLKIT
-# endif
-#endif
-
-SRCS = lwlib.c MOTIF_SRCS LUCID_SRCS ATHENA_SRCS lwlib-utils.c \
-       lwlib-config.c
-OBJS = lwlib.o MOTIF_OBJS LUCID_OBJS ATHENA_OBJS lwlib-utils.o \
-       lwlib-config.o $(EZ_OBJS)
-
-#ifdef NEED_TOOLKIT
 all:: $(EZ_SUBDIR) liblw.a
-#else
-all::
-#endif
 
 c_switch_general=@c_switch_general@
 c_switch_window_system=@c_switch_window_system@
@@ -229,18 +82,14 @@
 ld_libs_window_system=@ld_libs_window_system@
 ld_libs_all=@ld_libs_all@
 
-ALL_CFLAGS = -I. $(c_switch_all) NEED_LUCID NEED_MOTIF NEED_ATHENA \
-	     LWLIB_MENUBARS LWLIB_SCROLLBARS LWLIB_DIALOGS \
-	     $(ENERGIZEP) ${CFLAGS} CONST_FLAG
+ALL_CFLAGS= $(CFLAGS) $(CPPFLAGS) -I. $(c_switch_all) $(ENERGIZEP)
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+	$(CC) -c $(ALL_CFLAGS) $<
 
 liblw.a: $(OBJS)
 	$(RM) $@
 	$(AR) $@ $(OBJS)
-	-if [ -n $(RANLIB) ]; then \
-	  $(RANLIB) $@; \
-	fi
+	-test -n "$(RANLIB)" && $(RANLIB) $@
 
 #ifdef ENERGIZE
 ez_dialog:
--- a/lwlib/config.h.in	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/config.h.in	Mon Aug 13 09:40:41 2007 +0200
@@ -1,5 +1,5 @@
-/* XEmacs site configuration template file.  -*- C -*-
-   Copyright (C) 1986, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Lwlib site configuration template file.  -*- C -*-
+   Copyright (C) 1997 Sun Microsystems, Inc.
 
 This file is part of XEmacs.
 
@@ -28,6 +28,7 @@
 #undef HAVE_ALLOCA_H
 
 #ifndef NOT_C_CODE
+
 #ifdef __GNUC__
 #undef  alloca
 #define alloca __builtin_alloca
@@ -36,6 +37,57 @@
 #elif HAVE_ALLOCA_H
 #include <alloca.h>
 #endif
-#endif /* NOT C */
+
+#endif /* C code */
+
+#undef HAVE_UNISTD_H
+#undef HAVE_LIMITS_H
+#undef CONST_IS_LOSING
+
+#ifndef NeedFunctionPrototypes
+#define NeedFunctionPrototypes 1
+#endif
+
+#ifndef FUNCPROTO
+#define FUNCPROTO 15
+#endif
+
+/* widget feature definitions */
+#undef LWLIB_MENUBARS_LUCID
+#undef LWLIB_MENUBARS_MOTIF
+
+#if   defined (LWLIB_MENUBARS_LUCID)
+#define MENUBARS_LUCID
+#elif defined (LWLIB_MENUBARS_MOTIF)
+#define MENUBARS_MOTIF
+#endif
+
+#undef LWLIB_SCROLLBARS_LUCID
+#undef LWLIB_SCROLLBARS_MOTIF
+#undef LWLIB_SCROLLBARS_ATHENA
+
+#if   defined (LWLIB_SCROLLBARS_LUCID)
+#define SCROLLBARS_LUCID
+#elif defined(LWLIB_SCROLLBARS_MOTIF)
+#define SCROLLBARS_MOTIF
+#elif defined (LWLIB_SCROLLBARS_ATHENA)
+#define SCROLLBARS_ATHENA
+#endif
+
+#undef LWLIB_DIALOGS_MOTIF
+#undef LWLIB_DIALOGS_ATHENA
+
+#if   defined (LWLIB_DIALOGS_MOTIF)
+#define DIALOGS_MOTIF
+#elif defined (LWLIB_DIALOGS_ATHENA)
+#define DIALOGS_ATHENA
+#endif
+
+#undef NEED_MOTIF
+#undef NEED_ATHENA
+
+#if defined (LWLIB_MENUBARS_LUCID) || defined (LWLIB_SCROLLBARS_LUCID)
+#define NEED_LUCID
+#endif
 
 #endif /* _CONFIG_H_ */
--- a/lwlib/lwlib-Xaw.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/lwlib-Xaw.c	Mon Aug 13 09:40:41 2007 +0200
@@ -18,6 +18,7 @@
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#include <config.h>
 #include <stdio.h>
 
 #include "lwlib-Xaw.h"
--- a/lwlib/lwlib-Xlw.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/lwlib-Xlw.c	Mon Aug 13 09:40:41 2007 +0200
@@ -18,8 +18,11 @@
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#include <config.h>
 #include <stdlib.h> /* for abort () */
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
+#endif
 
 #include "lwlib-Xlw.h"
 #include <X11/StringDefs.h>
--- a/lwlib/lwlib-Xm.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/lwlib-Xm.c	Mon Aug 13 09:40:41 2007 +0200
@@ -19,11 +19,16 @@
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#include <config.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
 #include <stdio.h>
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #include <X11/StringDefs.h>
 #include <X11/IntrinsicP.h>
--- a/lwlib/lwlib-config.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/lwlib-config.c	Mon Aug 13 09:40:41 2007 +0200
@@ -25,6 +25,7 @@
    The alternatives to this range from obscure link errors, to obscure
    runtime errors that look a lot like bugs. */
 
+#include <config.h>
 #include "lwlib.h"
 
 #include <X11/Xlib.h>	/* to get XlibSpecificationRelease */
--- a/lwlib/lwlib-utils.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/lwlib-utils.c	Mon Aug 13 09:40:41 2007 +0200
@@ -18,10 +18,13 @@
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#include <config.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
 #include <memory.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #include <X11/Xatom.h>
 #include <X11/IntrinsicP.h>
--- a/lwlib/xlwmenu.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/xlwmenu.c	Mon Aug 13 09:40:41 2007 +0200
@@ -21,14 +21,19 @@
 
 /* Created by devin@lucid.com */
 
+#include <config.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
 #include <ctype.h>
 #include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
-#include <sys/types.h>
 #include <X11/Xos.h>
 #include <X11/IntrinsicP.h>
 #include <X11/StringDefs.h>
--- a/lwlib/xlwscrollbar.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/lwlib/xlwscrollbar.c	Mon Aug 13 09:40:41 2007 +0200
@@ -68,9 +68,12 @@
  *
  */
 
+#include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
+#endif
 
 #include <X11/IntrinsicP.h>
 #include <X11/StringDefs.h>
--- a/man/widget.texi	Mon Aug 13 09:39:46 2007 +0200
+++ b/man/widget.texi	Mon Aug 13 09:40:41 2007 +0200
@@ -13,7 +13,7 @@
 @comment  node-name,  next,  previous,  up
 @top The Emacs Widget Library
 
-Version: 1.9907
+Version: 1.9908
 
 @menu
 * Introduction::                
--- a/mule-doc/demo	Mon Aug 13 09:39:46 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-You need many fonts to read all.
-Please correct this incomplete list and add more!
-
----------------------------------------------------------
-Amharic	($(2"S!,!6!l(B)	$(2#Q!$!.(B
-Arabic			[2](38R(47d(3T!JSa(4W(3W[0](B
-Croatian		Zdravo
-Danish (Dansk)		Hej, Goddag
-English			Hello
-Esperanto		Saluton
-Estonian		Tere, Tervist
-FORTRAN			PROGRAM
-Finnish (Suomi)		Hei
-French (Fran,Ag(Bais)	Bonjour, Salut
-German (Deutsch Nord)	Guten Tag
-German (Deutsch S,A|(Bd)	Gr,A|_(B Gott
-Greek (,FGkk]mija(B)	,FCei\(B ,Fsar(B
-Hebrew			[2],Hylem[0](B
-Italiano		Ciao, Buon giorno
-Maltese			Ciao
-Nederlands, Vlaams	Hallo, Dag
-Norwegian (Norsk)	Hei, God dag
-Polish			Dzien Dobry, Hej
-Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!
-Spanish (Espa,Aq(Bol)	,A!(BHola!
-Swedish (Svenska)	Hej, Goddag
-Thai (,T@RIRd7B(B)		,TJ0GQ1J04U1$0CQ1:(B, ,TJ0GQ1J04U10$h1P(B
-Tigrigna ($(2!V#>!6!l(B)	$(2"C!$!,!V(B
-Turkish (T,A|(Brk,Ag(Be)	Merhaba
-Vietnamese (Ti,1*(Bng Vi,1.(Bt)	Ch,1`(Bo b,1U(Bn
-
-Japanese ($BF|K\8l(B)		$B$3$s$K$A$O(B, (I:]FAJ(B, $BqV$(DiQ(B
-Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B)	$ADc:C(B
-Cantonese ($(0GnM$(B,$(0N]0*Hd(B)		$(0*/=((B, $(0+$)p(B
-Hangul ($(CGQ1[(B)			$(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B
-
-Difference among chinese characters in GB, JIS, KSC, BIG5:
-	GB   -- $AT*Fx(B  $A?*7"(B  
-	JIS  -- $B855$(B  $B3+H/(B
-	KSC  -- $(Cj*Q((B  $(CKR[!(B
-	BIG5 -- $(0&x86(B  $(0DeBv(B
--- a/src/ChangeLog	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 09:40:41 2007 +0200
@@ -1,3 +1,43 @@
+1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
+
+	* keymap.c: Declare Fextent_in_region_p.
+
+	* s/linux.h: Can't use ORDINARY_LINK in linux until usage of -lPW
+	is determined more sensibly.
+
+1997-06-09  Hrvoje Niksic <hniksic@srce.hr>
+
+	* keydefs.c (get_relevant_extent_keymaps): Choose correct keymap
+	at extent boundaries.
+	
+Mon Jun  9 19:35:19 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* redisplay.c (pixel_to_glyph_translation):
+	  Fixed off by one error in computation of closest
+	  position when mouse is in the frame's right-side
+	  border area.
+
+Sat Jun  7 22:07:41 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* frame.c (delete_frame_internal):
+	  Calling Fselect_frame isn't sufficient to set the
+	  frame device's selected frame if the frame we're
+	  selecting is on a different device.  Call
+	  set_device_selected_frame apprpriately in that case.
+	  Also don't set the frame device's selected frame to a
+	  frame that's on another device.
+
+1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
+
+	* sysdep.c: MS Windows NT doesn't (yet) do child TTY processes.
+	From David Hobley <davidh@wr.com.au>
+	
+Sat Jun  7 22:00:54 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* src/device-x.c (x_delete_device):
+	  Add an EQ check so that we don't set Vdefault_x_device
+	  back to the device we're deleting.
+
 1997-06-05  Steven L Baur  <steve@altair.xemacs.org>
 
 	* frame.c (Fmake_frame): Correct checking of first_frame_on_device.
--- a/src/Makefile.in.in	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/Makefile.in.in	Mon Aug 13 09:40:41 2007 +0200
@@ -97,11 +97,10 @@
 /* On some machines #define register is done in config;
    do not let it interfere with this file.  */
 #undef register
-#undef inline
 
 /* Unless inhibited or changed, use -lg to link for debugging.  */
 #ifndef LIBS_DEBUG
-#define LIBS_DEBUG -lg
+#define LIBS_DEBUG "-lg"
 #endif
 
 #ifndef LD_SWITCH_CALL_SHARED
@@ -109,24 +108,24 @@
 #endif /* define a call_shared switch */
 
 #ifndef LD_SWITCH_SHARED
-#define LD_SWITCH_SHARED -c
+#define LD_SWITCH_SHARED "-c"
 #endif /* define a shared switch */
 
 #ifndef ORDINARY_LINK
 
 #ifndef CRT0_COMPILE
-#define CRT0_COMPILE $(CC) -c $(cflags) C_SWITCH_ASM
+#define CRT0_COMPILE $(CC) "-c" $(cflags) C_SWITCH_ASM
 #endif
 
 #ifndef START_FILES
 #ifdef NO_REMAP
 #ifdef COFF_ENCAPSULATE
-#define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o
+#define START_FILES "pre-crt0.o" "/usr/local/lib/gcc-crt0.o"
 #else /* ! defined (COFF_ENCAPSULATE) */
-#define START_FILES pre-crt0.o /lib/crt0.o
+#define START_FILES "pre-crt0.o" "/lib/crt0.o"
 #endif /* ! defined (COFF_ENCAPSULATE) */
 #else /* ! defined (NO_REMAP) */
-#define START_FILES ecrt0.o
+#define START_FILES "ecrt0.o"
 #endif /* ! defined (NO_REMAP) */
 #endif /* START_FILES */
 STARTFILES = START_FILES
@@ -142,16 +141,6 @@
 
 #endif /* not ORDINARY_LINK */
 
-/* Unless inhibited or changed, use -g to compile for debugging. */
-#ifndef C_DEBUG_SWITCH
-#define C_DEBUG_SWITCH -g
-#endif
-
-/* If user wants to optimize, this is how.  */
-#ifndef C_OPTIMIZE_SWITCH
-#define C_OPTIMIZE_SWITCH -O
-#endif
-
 /* cc switches needed to make the "asm" keyword work.
    Nothing special needed on most machines.  */
 #ifndef C_SWITCH_ASM
@@ -185,11 +174,11 @@
 
 LWLIB_LDFLAGS  = -L$(LWLIB_BUILDDIR)
 LWLIB_LIBS     =  -llw
-LWLIB_CPPFLAGS = -I$(LWLIB_SRCDIR)
+/* LWLIB_CPPFLAGS = -I$(LWLIB_SRCDIR) */
 LWLIB_DEPS = $(LWLIB_BUILDDIR)/liblw.a
 
-x_objs = balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o \
-	 glyphs-x.o objects-x.o redisplay-x.o xgccache.o xselect.o
+x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\
+ glyphs-x.o objects-x.o redisplay-x.o xgccache.o xselect.o
 
 #ifdef AIX4
 LIBI18N = -li18n
@@ -201,7 +190,7 @@
 /* -Demacs is needed to make some files produce the correct version
    for use in Emacs. */
 
-cppflags = $(CPPFLAGS) -Demacs -I. -I${srcdir} $(LWLIB_CPPFLAGS) $(c_switch_all)
+cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
 
 cflags= $(CFLAGS) $(cppflags)
 
@@ -230,7 +219,7 @@
    have to ask GCC explicitly where to find libgcc.a.  */
 
 #ifndef LINKER
-#define LINKER $(CC) -nostdlib
+#define LINKER $(CC) "-nostdlib"
 /* GCC passes any argument prefixed with -Xlinker directly to the
    linker.  See prefix-args.c for an explanation of why we do not do
    this with the shell "for" construct.
@@ -249,7 +238,7 @@
 #else /* __GNUC__ < 2 */
 
 #ifndef LIB_GCC
-#define LIB_GCC /usr/local/lib/gcc-gnulib
+#define LIB_GCC "/usr/local/lib/gcc-gnulib"
 #endif /* LIB_GCC */
 GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi`
 #endif /* __GNUC__ < 2 */
@@ -268,10 +257,9 @@
 #define YMF_PASS_LDFLAGS(flags) flags
 #endif
 
-/* Specify address for ld to start loading at,
-   if requested by configuration.  */
+/* Specify address for ld to start loading at, if requested by configuration. */
 #ifdef LD_TEXT_START_ADDR
-STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
+STARTFLAGS = "-T" LD_TEXT_START_ADDR "-e" "__start"
 #else
 STARTFLAGS =
 #endif
@@ -311,23 +299,24 @@
 /* NOTE: The last line cannot be all macros, because make will barf
    if they all come out null. */
 
-objs =	abbrev.o alloc.o blocktype.o buffer.o bytecode.o \
-	callint.o callproc.o casefiddle.o casetab.o chartab.o \
-	cmdloop.o cmds.o console.o console-stream.o \
-	data.o device.o dired.o doc.o doprnt.o dynarr.o \
-	editfns.o elhash.o emacs.o \
-	$(energize_objs) eval.o events.o $(extra_objs) \
-	event-stream.o $(event_unixoid_objs) extents.o faces.o \
-	fileio.o filelock.o filemode.o floatfns.o fns.o font-lock.o \
-	frame.o general.o getloadavg.o glyphs.o \
-	$(gui_objs) hash.o indent.o insdel.o intl.o \
-	keymap.o $(RTC_patch_objs) lread.o lstream.o \
-	macros.o marker.o md5.o minibuf.o objects.o opaque.o \
-	print.o process.o profile.o pure.o \
-	rangetab.o redisplay.o redisplay-output.o regex.o \
-	search.o signal.o sound.o \
-	specifier.o strftime.o symbols.o syntax.o sysdep.o \
-	undo.o $(x_objs) window.o
+objs=\
+ abbrev.o alloc.o blocktype.o buffer.o bytecode.o\
+ callint.o callproc.o casefiddle.o casetab.o chartab.o\
+ cmdloop.o cmds.o console.o console-stream.o\
+ data.o device.o dired.o doc.o doprnt.o dynarr.o\
+ editfns.o elhash.o emacs.o\
+ $(energize_objs) eval.o events.o $(extra_objs)\
+ event-stream.o $(event_unixoid_objs) extents.o faces.o\
+ fileio.o filelock.o filemode.o floatfns.o fns.o font-lock.o\
+ frame.o general.o getloadavg.o glyphs.o\
+ $(gui_objs) hash.o indent.o insdel.o intl.o\
+ keymap.o $(RTC_patch_objs) lread.o lstream.o\
+ macros.o marker.o md5.o minibuf.o objects.o opaque.o\
+ print.o process.o profile.o pure.o\
+ rangetab.o redisplay.o redisplay-output.o regex.o\
+ search.o signal.o sound.o\
+ specifier.o strftime.o symbols.o syntax.o sysdep.o\
+ undo.o $(x_objs) window.o
 
 #ifdef REL_ALLOC
 rallocdocsrc = ralloc.c
@@ -384,22 +373,19 @@
 
 #  ifdef LWLIB_USES_MOTIF
 #    ifdef EXTW_LINK
-#      define MOTIF_OTHER_FILES libextcli_Xm.a libextcli_Xm.so.1
+motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
 #    else
-#      define MOTIF_OTHER_FILES libextcli_Xm.a
+motif_other_files = libextcli_Xm.a
 #    endif
-#  else
-#    define MOTIF_OTHER_FILES
 #endif
 
 #  ifdef EXTW_LINK
-#    define OTHER_FILES MOTIF_OTHER_FILES \
-		        libextcli_Xt.a libextcli_Xt.so.1 \
-		        libextcli_Xlib.a libextcli_Xlib.so.1
-#  else
-#    define OTHER_FILES MOTIF_OTHER_FILES \
-		        libextcli_Xt.a libextcli_Xlib.a
+shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
 #  endif
+other_files=\
+ ${motif_other_files}\
+ libextcli_Xt.a libextcli_Xlib.a\
+ ${shared_other_files}
 # endif /* EXTERNAL_WIDGET */
 
 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs)
@@ -410,171 +396,137 @@
 otherobjs = $(BTL_objs) lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
 
 #ifdef LISP_FLOAT_TYPE
-#define FLOAT_LISP ${lispdir}prim/float-sup.elc
-#else
-#define FLOAT_LISP
+float_lisp = ${lispdir}prim/float-sup.elc
 #endif
 
 #ifdef HAVE_X_WINDOWS
 /* lisp files preloaded if compiled with support for X Windows */
 # ifdef HAVE_TOOLBARS
-#  define X11_TOOLBAR_LISP ${lispdir}x11/x-toolbar.elc
-# else
-#  define X11_TOOLBAR_LISP
+x11_toolbar_lisp = ${lispdir}x11/x-toolbar.elc
 # endif
 # ifdef HAVE_MENUBARS
-#  define X11_MENUBAR_LISP ${lispdir}x11/x-menubar.elc
-# else
-#  define X11_MENUBAR_LISP
+x11_menubar_lisp = ${lispdir}x11/x-menubar.elc
 # endif
 # ifdef HAVE_SCROLLBARS
-#  define X11_SCROLLBAR_LISP ${lispdir}x11/x-scrollbar.elc
-# else
-#  define X11_SCROLLBAR_LISP
+x11_scrollbar_lisp = ${lispdir}x11/x-scrollbar.elc
 # endif
-#define X11_LISP X11_MENUBAR_LISP \
-	${lispdir}x11/x-faces.elc \
-	${lispdir}x11/x-iso8859-1.elc ${lispdir}x11/x-mouse.elc \
-	${lispdir}x11/x-select.elc X11_SCROLLBAR_LISP \
-	X11_TOOLBAR_LISP ${lispdir}x11/x-misc.elc \
-	${lispdir}x11/x-init.elc
-#else
-#define X11_LISP
+x11_lisp=\
+ ${x11_menubar_lisp}\
+ ${lispdir}x11/x-faces.elc\
+ ${lispdir}x11/x-iso8859-1${null}.elc ${lispdir}x11/x-mouse.elc\
+ ${lispdir}x11/x-select.elc ${x11_scrollbar_lisp}\
+ ${x11_toolbar_lisp} ${lispdir}x11/x-misc.elc\
+ ${lispdir}x11/x-init.elc
 #endif
 
 #ifdef HAVE_TTY
 /* lisp files preloaded if compiled with support for tty */
-#define TTY_LISP ${lispdir}term/tty-init.elc
-#else
-#define TTY_LISP
+tty_lisp = ${lispdir}term/tty-init.elc
 #endif
 
 #ifdef MULE
 #ifdef HAVE_X_WINDOWS
-# define MULE_X11_LISP ${lispdir}mule/mule-x-init.elc
-#else
-# define MULE_X11_LISP
+mule_x11_lisp = ${lispdir}mule/mule-x-init.elc
 #endif
-#define MULE_LISP \
-	${lispdir}mule/mule-load.elc ${lispdir}mule/mule-coding.elc \
-	${lispdir}mule/mule-charset.elc ${lispdir}mule/mule-files.elc \
-	${lispdir}mule/mule-category.elc ${lispdir}mule/mule-misc.elc \
-	${lispdir}mule/mule-ccl.elc \
-	${lispdir}mule/mule-init.elc ${lispdir}mule/mule-cmds.elc \
-	${lispdir}mule/kinsoku.elc \
-	MULE_X11_LISP \
-	${lispdir}mule/arabic-hooks.elc \
-	${lispdir}mule/chinese-hooks.elc \
-	${lispdir}mule/cyrillic-hooks.elc \
-	${lispdir}mule/ethiopic-hooks.elc \
-	${lispdir}mule/european-hooks.elc \
-	${lispdir}mule/greek-hooks.elc \
-	${lispdir}mule/hebrew-hooks.elc	\
-	${lispdir}mule/ipa-hooks.elc \
-	${lispdir}mule/japanese-hooks.elc \
-	${lispdir}mule/korean-hooks.elc \
-	${lispdir}mule/thai-hooks.elc \
-	${lispdir}mule/vietnamese-hooks-1.elc \
-	${lispdir}mule/vietnamese-hooks-2.elc
-
-#define NOMULE_LISP
+mule_lisp=\
+ ${lispdir}mule/mule-load.elc ${lispdir}mule/mule-coding.elc\
+ ${lispdir}mule/mule-charset.elc ${lispdir}mule/mule-files.elc\
+ ${lispdir}mule/mule-category.elc ${lispdir}mule/mule-misc.elc\
+ ${lispdir}mule/mule-ccl.elc\
+ ${lispdir}mule/mule-init.elc ${lispdir}mule/mule-cmds.elc\
+ ${lispdir}mule/kinsoku.elc\
+ ${mule_x11_lisp}\
+ ${lispdir}mule/arabic-hooks.elc\
+ ${lispdir}mule/chinese-hooks.elc\
+ ${lispdir}mule/cyrillic-hooks.elc\
+ ${lispdir}mule/ethiopic-hooks.elc\
+ ${lispdir}mule/european-hooks.elc\
+ ${lispdir}mule/greek-hooks.elc\
+ ${lispdir}mule/hebrew-hooks.elc\
+ ${lispdir}mule/ipa-hooks.elc\
+ ${lispdir}mule/japanese-hooks.elc\
+ ${lispdir}mule/korean-hooks.elc\
+ ${lispdir}mule/thai-hooks.elc\
+ ${lispdir}mule/vietnamese-hooks-1${null}.elc\
+ ${lispdir}mule/vietnamese-hooks-2${null}.elc
 #else
-#define MULE_LISP
-#define NOMULE_LISP ${lispdir}prim/files-nomule.elc
+nomule_lisp = ${lispdir}prim/files-nomule.elc
 #endif
 
 #ifdef ENERGIZE
 /* Lisp files preloaded if compiled with support for Energize */
-#define ENERGIZE_LISP \
-	${lispdir}comint/gdb.elc \
-	${lispdir}comint/comint.elc ${lispdir}comint/shell.elc \
-	${lispdir}utils/ring.elc ${lispdir}packages/compile.elc \
-	${lispdir}modes/view-less.elc ${lispdir}emulators/evi.elc \
-	${lispdir}packages/font-lock.elc ${lispdir}packages/fast-lock.elc \
-	${lispdir}dired/dired.elc ${lispdir}dired/dired-x.elc \
-	${lispdir}dired/dired-lucid.elc ${lispdir}prim/userlock.elc \
-	${lispdir}energize/energize-init.elc \
-	${lispdir}energize/energize-mode.elc \
-	${lispdir}energize/energize-windows.elc \
-	${lispdir}energize/energize-menus.elc \
-	${lispdir}energize/energize-shell.elc \
-	${lispdir}energize/energize-visit-use.elc \
-	${lispdir}energize/energize-vi.elc \
-	${lispdir}energize/energize-font-lock.elc \
-	${lispdir}energize/energize-advice.elc
-#else
-#define ENERGIZE_LISP
+energize_lisp=\
+ ${lispdir}comint/gdb.elc\
+ ${lispdir}comint/comint.elc ${lispdir}comint/shell.elc\
+ ${lispdir}utils/ring.elc ${lispdir}packages/compile.elc\
+ ${lispdir}modes/view-less.elc ${lispdir}emulators/evi.elc\
+ ${lispdir}packages/font-lock.elc ${lispdir}packages/fast-lock.elc\
+ ${lispdir}dired/dired.elc ${lispdir}dired/dired-x.elc\
+ ${lispdir}dired/dired-lucid.elc ${lispdir}prim/userlock.elc\
+ ${lispdir}energize/energize-init.elc\
+ ${lispdir}energize/energize-mode.elc\
+ ${lispdir}energize/energize-windows.elc\
+ ${lispdir}energize/energize-menus.elc\
+ ${lispdir}energize/energize-shell.elc\
+ ${lispdir}energize/energize-visit-use.elc\
+ ${lispdir}energize/energize-vi.elc\
+ ${lispdir}energize/energize-font-lock.elc\
+ ${lispdir}energize/energize-advice.elc
 #endif
 
 #ifdef SUNPRO
 /* Lisp files preloaded if compiled with support for SunPro products */
-#define SUNPRO_LISP \
-	${lispdir}sunpro/sunpro-init.elc \
-	${lispdir}sunpro/sunpro-menubar.elc \
-	${lispdir}sunpro/sunpro-keys.elc \
-	${lispdir}eos/sun-eos-init.elc \
-	${lispdir}eos/sun-eos-load.elc \
-	${lispdir}eos/sun-eos-common.elc \
-	${lispdir}eos/sun-eos-editor.elc \
-	${lispdir}eos/sun-eos-browser.elc \
-	${lispdir}eos/sun-eos-debugger.elc \
-	${lispdir}eos/sun-eos-debugger-extra.elc \
-	${lispdir}eos/sun-eos-toolbar.elc \
-	${lispdir}eos/sun-eos-menubar.elc \
-	${lispdir}comint/comint.elc \
-	${lispdir}utils/ring.elc \
-	${lispdir}utils/annotations.elc \
-	${lispdir}modes/cc-mode.elc \
-	${lispdir}modes/imenu.elc \
-	${lispdir}utils/reporter.elc
-#else
-#define SUNPRO_LISP
+sunpro_lisp=\
+ ${lispdir}sunpro/sunpro-init.elc\
+ ${lispdir}sunpro/sunpro-menubar.elc\
+ ${lispdir}sunpro/sunpro-keys.elc\
+ ${lispdir}eos/sun-eos-init.elc\
+ ${lispdir}eos/sun-eos-load.elc\
+ ${lispdir}eos/sun-eos-common.elc\
+ ${lispdir}eos/sun-eos-editor.elc\
+ ${lispdir}eos/sun-eos-browser.elc\
+ ${lispdir}eos/sun-eos-debugger.elc\
+ ${lispdir}eos/sun-eos-debugger-extra.elc\
+ ${lispdir}eos/sun-eos-toolbar.elc\
+ ${lispdir}eos/sun-eos-menubar.elc\
+ ${lispdir}comint/comint.elc\
+ ${lispdir}utils/ring.elc\
+ ${lispdir}utils/annotations.elc\
+ ${lispdir}modes/cc-mode.elc\
+ ${lispdir}modes/imenu.elc\
+ ${lispdir}utils/reporter.elc
 #endif
 
 #ifdef TOOLTALK
 /* Lisp files preloaded if compiled with support for Tooltalk */
-#define TOOLTALK_LISP \
-	${lispdir}tooltalk/tooltalk-load.elc \
-	${lispdir}tooltalk/tooltalk-macros.elc \
-	${lispdir}tooltalk/tooltalk-util.elc \
-	${lispdir}tooltalk/tooltalk-init.elc
-#else
-#define TOOLTALK_LISP
+tooltalk_lisp=\
+ ${lispdir}tooltalk/tooltalk-load.elc\
+ ${lispdir}tooltalk/tooltalk-macros.elc\
+ ${lispdir}tooltalk/tooltalk-util.elc\
+ ${lispdir}tooltalk/tooltalk-init.elc
 #endif
 
 #ifdef LISP_COMMAND_LOOP
-#define CMDLOOP_LISP ${lispdir}prim/cmdloop1.elc
-#else
-#define CMDLOOP_LISP
+cmdloop_lisp = ${lispdir}prim/cmdloop1.elc
 #endif
 
 #ifdef HAVE_TOOLBARS
-#define TOOLBAR_LISP ${lispdir}prim/toolbar.elc
-#else
-#define TOOLBAR_LISP
+toolbar_lisp = ${lispdir}prim/toolbar.elc
 #endif
 #ifdef HAVE_MENUBARS
-#define MENUBAR_LISP ${lispdir}prim/menubar.elc
-#else
-#define MENUBAR_LISP
+menubar_lisp = ${lispdir}prim/menubar.elc
 #endif
 #ifdef HAVE_SCROLLBARS
-#define SCROLLBAR_LISP ${lispdir}prim/scrollbar.elc
-#else
-#define SCROLLBAR_LISP
+scrollbar_lisp = ${lispdir}prim/scrollbar.elc
 #endif
 #ifdef HAVE_DIALOGS
-#define DIALOG_LISP ${lispdir}prim/dialog.elc
-#else
-#define DIALOG_LISP
+dialog_lisp = ${lispdir}prim/dialog.elc
 #endif
 #ifdef HAVE_WINDOW_SYSTEM
-#define MOUSE_LISP \
-	${lispdir}prim/gui.elc \
-	${lispdir}prim/mouse.elc \
-	${lispdir}prim/mode-motion.elc
-#else
-#define MOUSE_LISP
+mouse_lisp=\
+ ${lispdir}prim/gui.elc\
+ ${lispdir}prim/mouse.elc\
+ ${lispdir}prim/mode-motion.elc
 #endif
 
 /* List of Lisp files loaded into the dumped Emacs.
@@ -585,62 +537,60 @@
     here because we do not want things to appear to be out-of-date just
     because the version number has been incremented. -- D.N.G. 8/28/93]
  */
-lisp=   ${lispdir}paths.el ${lispdir}prim/featurep.elc \
-	${lispdir}prim/loaddefs.elc ${lispdir}prim/auto-autoloads.elc \
-        ${lispdir}prim/loadup.el ${lispdir}prim/subr.elc \
-        ${lispdir}prim/cmdloop.elc CMDLOOP_LISP \
-	${lispdir}utils/text-props.elc MOUSE_LISP \
-        ${lispdir}prim/keymap.elc ${lispdir}prim/syntax.elc \
-        ${lispdir}prim/minibuf.elc ${lispdir}prim/faces.elc \
-	${lispdir}prim/objects.elc ${lispdir}prim/process.elc \
-        ${lispdir}prim/keydefs.elc ${lispdir}prim/device.elc \
-	${lispdir}prim/obsolete.elc ${lispdir}prim/glyphs.elc \
-	${lispdir}prim/extents.elc ${lispdir}prim/backquote.elc \
-	${lispdir}prim/events.elc ${lispdir}prim/console.elc \
-        ${lispdir}utils/map-ynp.elc ${lispdir}prim/modeline.elc \
-        ${lispdir}modes/list-mode.elc \
-	${lispdir}utils/derived.elc ${lispdir}cl/cl.elc \
-	${lispdir}cl/cl-defs.elc ${lispdir}prim/undo-stack.elc \
-        ${lispdir}prim/simple.elc ${lispdir}prim/help.elc \
-        ${lispdir}prim/files.elc ${lispdir}utils/lib-complete.elc \
-	${lispdir}prim/indent.elc ${lispdir}prim/frame.elc \
-	TOOLBAR_LISP ${lispdir}prim/format.elc \
-	${lispdir}prim/window.elc ${lispdir}prim/window-xemacs.elc \
-	${lispdir}prim/startup.elc \
-        ${lispdir}prim/lisp.elc ${lispdir}prim/page.elc \
-        ${lispdir}prim/register.elc ${lispdir}iso/iso8859-1.elc \
-        ${lispdir}prim/paragraphs.elc ${lispdir}modes/lisp-mode.elc \
-        ${lispdir}modes/text-mode.elc ${lispdir}prim/fill.elc \
-        ${lispdir}prim/isearch-mode.elc ${lispdir}prim/misc.elc \
-	${lispdir}packages/vc-hooks.elc \
-        ${lispdir}prim/replace.elc ${lispdir}prim/specifier.elc \
-        ${lispdir}modes/auto-show.elc SUNPRO_LISP TTY_LISP \
-        ${lispdir}bytecomp/bytecomp-runtime.elc FLOAT_LISP \
-        ${lispdir}prim/itimer.elc ${lispdir}prim/itimer-autosave.elc \
-	${lispdir}ediff/ediff-hook.elc \
-	${lispdir}custom/widget.elc ${lispdir}custom/custom.elc \
-	${lispdir}prim/cus-start.elc \
-	${lispdir}packages/fontl-hooks.elc SCROLLBAR_LISP \
-	${lispdir}prim/buffer.elc MENUBAR_LISP \
-	${lispdir}packages/buff-menu.elc DIALOG_LISP MULE_LISP NOMULE_LISP \
-	${lispdir}modes/abbrev.elc X11_LISP ENERGIZE_LISP TOOLTALK_LISP
+lisp=\
+ ${lispdir}paths.el ${lispdir}prim/featurep.elc\
+ ${lispdir}prim/loaddefs.elc ${lispdir}prim/auto-autoloads.elc\
+ ${lispdir}prim/loadup.el ${lispdir}prim/subr.elc\
+ ${lispdir}prim/cmdloop.elc ${cmdloop_lisp}\
+ ${lispdir}utils/text-props.elc ${mouse_lisp}\
+ ${lispdir}prim/keymap.elc ${lispdir}prim/syntax.elc\
+ ${lispdir}prim/minibuf.elc ${lispdir}prim/faces.elc\
+ ${lispdir}prim/objects.elc ${lispdir}prim/process.elc\
+ ${lispdir}prim/keydefs.elc ${lispdir}prim/device.elc\
+ ${lispdir}prim/obsolete.elc ${lispdir}prim/glyphs.elc\
+ ${lispdir}prim/extents.elc ${lispdir}prim/backquote.elc\
+ ${lispdir}prim/events.elc ${lispdir}prim/console.elc\
+ ${lispdir}utils/map-ynp.elc ${lispdir}prim/modeline.elc\
+ ${lispdir}modes/list-mode.elc\
+ ${lispdir}utils/derived.elc ${lispdir}cl/cl.elc\
+ ${lispdir}cl/cl-defs.elc ${lispdir}prim/undo-stack.elc\
+ ${lispdir}prim/simple.elc ${lispdir}prim/help.elc\
+ ${lispdir}prim/files.elc ${lispdir}utils/lib-complete.elc\
+ ${lispdir}prim/indent.elc ${lispdir}prim/frame.elc\
+ ${toolbar_lisp} ${lispdir}prim/format.elc\
+ ${lispdir}prim/window.elc ${lispdir}prim/window-xemacs.elc\
+ ${lispdir}prim/startup.elc\
+ ${lispdir}prim/lisp.elc ${lispdir}prim/page.elc\
+ ${lispdir}prim/register.elc ${lispdir}iso/iso8859-1${null}.elc\
+ ${lispdir}prim/paragraphs.elc ${lispdir}modes/lisp-mode.elc\
+ ${lispdir}modes/text-mode.elc ${lispdir}prim/fill.elc\
+ ${lispdir}prim/isearch-mode.elc ${lispdir}prim/misc.elc\
+ ${lispdir}packages/vc-hooks.elc\
+ ${lispdir}prim/replace.elc ${lispdir}prim/specifier.elc\
+ ${lispdir}modes/auto-show.elc ${sunpro_lisp} ${tty_lisp}\
+ ${lispdir}bytecomp/bytecomp-runtime.elc ${float_lisp}\
+ ${lispdir}prim/itimer.elc ${lispdir}prim/itimer-autosave.elc\
+ ${lispdir}ediff/ediff-hook.elc\
+ ${lispdir}custom/widget.elc ${lispdir}custom/custom.elc\
+ ${lispdir}prim/cus-start.elc\
+ ${lispdir}packages/fontl-hooks.elc ${scrollbar_lisp}\
+ ${lispdir}prim/buffer.elc ${menubar_lisp}\
+ ${lispdir}packages/buff-menu.elc ${dialog_lisp} ${mule_lisp} ${nomule_lisp}\
+ ${lispdir}modes/abbrev.elc ${x11_lisp} ${energize_lisp} ${tooltalk_lisp}
 
 /* Other Lisp files that are not dumped out but where it is convenient
    (or required?) for them to be byte-compiled early, before xemacs is
    dumped out.  Avoid listing them in ${lisp} because then the
    doc-snarfing routines get confused. */
-otherlisp= ${lispdir}bytecomp/bytecomp.elc \
-	   ${lispdir}bytecomp/byte-optimize.elc \
-	   ${lispdir}utils/advice.elc
+otherlisp=\
+ ${lispdir}bytecomp/bytecomp.elc\
+ ${lispdir}bytecomp/byte-optimize.elc\
+ ${lispdir}utils/advice.elc
 
 LIBES = $(LWLIB_LIBS) $(quantify_libs) $(ld_libs_all) LIBS_DEBUG $(GNULIB_VAR)
 
 /* Enable recompilation of certain other files depending on system type.  */
 
-#ifndef OTHER_FILES
-#define OTHER_FILES
-#endif
-
 /* Enable inclusion of object files in temacs depending on system type.  */
 #ifndef OBJECTS_SYSTEM
 #define OBJECTS_SYSTEM
@@ -650,7 +600,7 @@
 #define OBJECTS_MACHINE
 #endif
 
-all: xemacs OTHER_FILES
+all: xemacs ${other_files}
 
 #ifdef I18N3
 mo_dir = ${etcdir}
@@ -660,7 +610,7 @@
 LOADPATH =  EMACSLOADPATH="${lispdir}prim"
 DUMPENV = $(LOADPATH)
 
-release: temacs ${lisp} ${libsrc}DOC $(mo_file) OTHER_FILES
+release: temacs ${lisp} ${libsrc}DOC $(mo_file) ${other_files}
 #ifdef CANNOT_DUMP
 	ln temacs xemacs
 #else
@@ -688,7 +638,7 @@
 	touch release
 #endif /* ! defined (CANNOT_DUMP) */
 
-xemacs: temacs ${libsrc}DOC ${lisp} $(mo_file) OTHER_FILES
+xemacs: temacs ${libsrc}DOC ${lisp} $(mo_file) ${other_files}
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump
 	@if [ ! -f SATISFIED ]; then \
@@ -696,7 +646,7 @@
 	fi
 	@/bin/rm -f SATISFIED
 
-xemacs-no-site-file: temacs ${libsrc}DOC ${lisp} $(mo_file) OTHER_FILES
+xemacs-no-site-file: temacs ${libsrc}DOC ${lisp} $(mo_file) ${other_files}
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump no-site-file
 	@test ! -f SATISFIED && $(MAKE) xemacs-no-site-file
@@ -785,15 +735,15 @@
 #define MAKE_PARALLEL
 #endif
 
-temacs_deps = \
-	MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) \
-	${objs} ${otherobjs} OBJECTS_SYSTEM OBJECTS_MACHINE \
-	$(LWLIB_DEPS) $(dynodump_deps) prefix-args
+temacs_deps=\
+ MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES)\
+ ${objs} ${otherobjs} OBJECTS_SYSTEM OBJECTS_MACHINE\
+ $(LWLIB_DEPS) $(dynodump_deps) prefix-args
 
-temacs_link_args = \
-	YMF_PASS_LDFLAGS(${STARTFLAGS} ${ldflags} LD_SWITCH_CALL_SHARED) \
-	-o $@ ${STARTFILES} ${objs} ${otherobjs} \
-	OBJECTS_SYSTEM OBJECTS_MACHINE ${LIBES}
+temacs_link_args=\
+ ${STARTFLAGS} ${ldflags} LD_SWITCH_CALL_SHARED\
+ -o $@ ${STARTFILES} ${objs} ${otherobjs}\
+ OBJECTS_SYSTEM OBJECTS_MACHINE ${LIBES}
 
 temacs_deps: $(temacs_deps)
 
@@ -845,12 +795,12 @@
 
 #ifdef EXTERNAL_WIDGET
 
-# define EXTERNAL_CLIENT_MOTIF_OBJS_SHARED ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
-# define EXTERNAL_CLIENT_XT_OBJS_SHARED    ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
-# define EXTERNAL_CLIENT_XLIB_OBJS_SHARED  ExternalClient-Xlib-shared.o extw-Xlib-shared.o
-# define EXTERNAL_CLIENT_MOTIF_OBJS_NONSHARED ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
-# define EXTERNAL_CLIENT_XT_OBJS_NONSHARED    ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
-# define EXTERNAL_CLIENT_XLIB_OBJS_NONSHARED  ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
+external_client_motif_objs_shared    = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
+external_client_xt_objs_shared       = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
+external_client_xlib_objs_shared     = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
+external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
+external_client_xt_objs_nonshared    = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
+external_client_xlib_objs_nonshared  = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
 
 /* Add dependencies so things work right with a parallel make */
 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
@@ -896,25 +846,25 @@
 	$(CC) -c $(cflags) ${srcdir}/extw-Xlib.c
 	mv extw-Xlib.o extw-Xlib-nonshared.o
 
-libextcli_Xm.a: EXTERNAL_CLIENT_MOTIF_OBJS_NONSHARED
-	ar r libextcli_Xm.a EXTERNAL_CLIENT_MOTIF_OBJS_NONSHARED
+libextcli_Xm.a: ${external_client_motif_objs_nonshared}
+	ar r libextcli_Xm.a ${external_client_motif_objs_nonshared}
 
-libextcli_Xt.a: EXTERNAL_CLIENT_XT_OBJS_NONSHARED
-	ar r libextcli_Xt.a EXTERNAL_CLIENT_XT_OBJS_NONSHARED
+libextcli_Xt.a: ${external_client_xt_objs_nonshared}
+	ar r libextcli_Xt.a ${external_client_xt_objs_nonshared}
 
-libextcli_Xlib.a: EXTERNAL_CLIENT_XLIB_OBJS_NONSHARED
-	ar r libextcli_Xlib.a EXTERNAL_CLIENT_XLIB_OBJS_NONSHARED
+libextcli_Xlib.a: ${external_client_xlib_objs_nonshared}
+	ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared}
 
 #ifdef EXTW_LINK
 
-libextcli_Xm.so.1: EXTERNAL_CLIENT_MOTIF_OBJS_SHARED
-	EXTW_LINK(EXTERNAL_CLIENT_MOTIF_OBJS_SHARED, libextcli_Xm.so.1)
+libextcli_Xm.so.1: ${external_client_motif_objs_shared}
+	EXTW_LINK(${external_client_motif_objs_shared}, libextcli_Xm.so.1)
 
-libextcli_Xt.so.1: EXTERNAL_CLIENT_XT_OBJS_SHARED
-	EXTW_LINK(EXTERNAL_CLIENT_XT_OBJS_SHARED, libextcli_Xt.so.1)
+libextcli_Xt.so.1: ${external_client_xt_objs_shared}
+	EXTW_LINK(${external_client_xt_objs_shared}, libextcli_Xt.so.1)
 
-libextcli_Xlib.so.1: EXTERNAL_CLIENT_XLIB_OBJS_SHARED
-	EXTW_LINK(EXTERNAL_CLIENT_XLIB_OBJS_SHARED, libextcli_Xlib.so.1)
+libextcli_Xlib.so.1: ${external_client_xlib_objs_shared}
+	EXTW_LINK(${external_client_xlib_objs_shared}, libextcli_Xlib.so.1)
 
 #endif /* EXTW_LINK */
 
@@ -923,47 +873,28 @@
 prefix-args: ${srcdir}/prefix-args.c config.h
 	$(CC) $(cflags) ${srcdir}/prefix-args.c -o prefix-args
 
-/* These are needed for C compilation, on the systems that need them */
-#ifdef NEED_CPP
-CPP = ./localcpp
-localcpp:
-	cd ${cppdir} && ${MAKE} ${MFLAGS} EMACS=-DEMACS
-	ln ${cppdir}cpp localcpp  /* Name where cflags will refer to it */
-/* cc appears to be cretinous and require all of these to exist
-   if -B is specified -- we cannot use one local pass and let the
-   others be the standard ones.  What a loser.
-   We cannot even use ln, since they are probably
-   on different disks.  */
-	cp /lib/ccom localccom
-	-cp /lib/optim localoptim
-	-cp /lib/c2 localc2
-	cp /bin/as localas
-#else /* ! defined (NEED_CPP) */
-CPP = $(CC) -E
-#endif /* ! defined (NEED_CPP) */
-
 #ifdef SHORTNAMES
 shortnames:
 	cd ${shortnamesdir} && ${MAKE} ${MFLAGS}
 #endif
 
 config.h: ${srcdir}/config.h.in
-	@echo "The file config.h needs to be set up from config.h.in."
+	@echo "The file $@ needs to be set up from config.h.in."
 	@echo "Consult the file \`INSTALL' for instructions for building Emacs."
 	exit 1
 
 puresize_adjust.h: ${srcdir}/puresize.h
-	@echo "The file puresize_adjust still needs to be generated."
+	@echo "The file $@ still needs to be generated."
 	@echo "Please run 'make' from the top-level."
 	exit 1
 
 paths.h: ${srcdir}/paths.h.in
-	@echo "The file paths.h needs to be set up from paths.h.in."
+	@echo "The file $@ needs to be set up from paths.h.in."
 	@echo "Consult the file \`INSTALL' for instructions for building Emacs."
 	exit 1
 
 Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
-	@echo "The file Emacs.ad.h needs to be set up from ${srcdir}/${etcdir}Emacs.ad"
+	@echo "The file $@ needs to be set up from ${srcdir}/${etcdir}Emacs.ad"
 	@echo "Consult the file \`INSTALL' for instructions for building Emacs."
 	exit 1
 
@@ -1024,7 +955,7 @@
 #endif /* HAVE_NATIVE_SOUND */
 
 /* System-specific programs to be made.
-   OTHER_FILES, OBJECTS_SYSTEM and OBJECTS_MACHINE
+   ${other_files}, OBJECTS_SYSTEM and OBJECTS_MACHINE
    select which of these should be compiled.  */
 
 mostlyclean:
--- a/src/balloon-x.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/balloon-x.c	Mon Aug 13 09:40:41 2007 +0200
@@ -32,7 +32,7 @@
 /* ### start of hack */
 
 static unsigned long
-alloc_color (Display* dpy, const char* colorname, int light)
+alloc_color (Display* dpy, CONST char* colorname, int light)
 {
   Colormap cmap = DefaultColormap (dpy, DefaultScreen(dpy));
   unsigned long pixel = 0;
@@ -61,7 +61,7 @@
 }
 
 static XFontStruct *
-open_font (Display* dpy, const char* font_name)
+open_font (Display* dpy, CONST char* font_name)
 {
   XFontStruct* fontStruct = NULL;
 
--- a/src/balloon_help.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/balloon_help.c	Mon Aug 13 09:40:41 2007 +0200
@@ -30,6 +30,7 @@
  *
  */
 
+#include <config.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -43,7 +44,6 @@
 
 #include "balloon_help.h"
 
-#include "config.h"
 #ifndef WINDOWSNT
 #define max(x,y) (x>y?x:y)
 #endif
@@ -288,66 +288,22 @@
 get_shape (int last_shape, int x, int y, int width, int height,
 	   int screen_width, int screen_height)
 {
-  /* Can we use last_shape */
-  if (SHAPE_CONE_TOP_LEFT == last_shape)
-    {
-      if ((x + width < screen_width) && (y + height < screen_height))
-	{
-	  return last_shape;
-	}
-    }
-  else if (SHAPE_CONE_TOP_RIGHT == last_shape)
-    {
-      if ((x - width > 0) && (y + height < screen_height))
-	{
-	  return last_shape;
-	}
-    }
-  else if (SHAPE_CONE_BOTTOM_LEFT == last_shape)
-    {
-      if ((x + width < screen_width) && (y - height > 0))
-	{
-	  return last_shape;
-	}
-    }
-  else if (SHAPE_CONE_BOTTOM_RIGHT == last_shape)
-    {
-      if ((x - width > 0) && (y - height > 0))
-	{
-	  return last_shape;
-	}
-    }
+  /* Can we use last_shape? */
+  if (((last_shape == SHAPE_CONE_TOP_LEFT) &&
+       (x + width < screen_width) && (y + height < screen_height)) ||
+      ((last_shape == SHAPE_CONE_TOP_RIGHT) &&
+       (x - width > 0) && (y + height < screen_height)) ||
+      ((last_shape == SHAPE_CONE_BOTTOM_LEFT) &&
+       (x + width < screen_width) && (y - height > 0)) ||
+      ((last_shape == SHAPE_CONE_BOTTOM_RIGHT) &&
+       (x - width > 0) && (y - height > 0)))
+    return last_shape;
 
-  /* Try to pick a shape that will not get changed, ie if top left quadrant, top_left */
-  if (x < screen_width / 2)
-    {
-      if (y < screen_height / 2)
-	{
-	  return SHAPE_CONE_TOP_LEFT;
-	}
-      else
-	{
-	  return SHAPE_CONE_BOTTOM_LEFT;
-	}
-    }
-  else
-    {
-      if (y < screen_height / 2)
-	{
-	  return SHAPE_CONE_TOP_RIGHT;
-	}
-      else
-	{
-	  return SHAPE_CONE_BOTTOM_RIGHT;
-	}
-    }
-
-  /* ### if width or height is greater than 1/2 the width or height then we might
-     run off the screen */
-
-  abort ();
-
-  return 0;
+  /* Try to pick a shape that will not get changed,
+     e.g. if top left quadrant, top_left */
+  return (x < screen_width / 2) ?
+    (y < screen_height / 2 ? SHAPE_CONE_TOP_LEFT:  SHAPE_CONE_BOTTOM_LEFT) :
+    (y < screen_height / 2 ? SHAPE_CONE_TOP_RIGHT: SHAPE_CONE_BOTTOM_RIGHT);
 }
 
 static void
--- a/src/config.h.in	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/config.h.in	Mon Aug 13 09:40:41 2007 +0200
@@ -68,6 +68,9 @@
 #ifndef NeedFunctionPrototypes
 #define NeedFunctionPrototypes 1
 #endif
+#ifndef FUNCPROTO
+#define FUNCPROTO 15
+#endif
 #endif
 
 /* Define HAVE_WINDOW_SYSTEM if any windowing system is available. */
@@ -116,6 +119,7 @@
 #undef HAVE_X11_XLOCALE_H
 #undef HAVE_LINUX_VERSION_H
 #undef HAVE_INTTYPES_H
+#undef HAVE_LIMITS_H
 #undef STDC_HEADERS
 #undef TIME_WITH_SYS_TIME
 #undef WORDS_BIGENDIAN
@@ -636,23 +640,25 @@
 #define LONGBITS (8 * SIZEOF_LONG)
 #endif
 
+#ifndef NOT_C_CODE
 /* Does the keyword `inline' exist?  */
 #undef HAVE_INLINE
 #undef inline
 
-#ifdef HAVE_INLINE
-# ifdef __GNUC__
-#  ifdef DONT_EXTERN_INLINE_FUNCTIONS
-#   define INLINE inline
+# ifdef HAVE_INLINE
+#  ifdef __GNUC__
+#   ifdef DONT_EXTERN_INLINE_FUNCTIONS
+#    define INLINE inline
+#   else
+#    define INLINE extern inline
+#   endif
 #  else
-#   define INLINE extern inline
-#  endif
+#   define INLINE static inline
+#  endif /* __GNUC__ */
 # else
-#  define INLINE static inline
-# endif /* __GNUC__ */
-#else
-# define INLINE static
-#endif /* HAVE_INLINE */
+#  define INLINE static
+# endif /* HAVE_INLINE */
+#endif /* C code */
 
 /* We want to avoid saving the signal mask if possible, because
    that necessitates a system call. */
--- a/src/database.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/database.c	Mon Aug 13 09:40:41 2007 +0200
@@ -31,7 +31,7 @@
 #error database.c being compiled, but HAVE_DATABASE not defined!
 #endif /* HAVE_DATABASE */
 
-#include <database.h>         /* Our include file */
+#include "database.h"         /* Our include file */
 
 #ifdef HAVE_BERKELEY_DB
 /* Work around Berkeley DB's use of int types which are defined
--- a/src/device-x.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/device-x.c	Mon Aug 13 09:40:41 2007 +0200
@@ -391,7 +391,8 @@
       Vdefault_x_device = Qnil;
       DEVICE_LOOP_NO_BREAK (devcons, concons)
 	{
-	  if (DEVICE_X_P (XDEVICE (XCAR (devcons))))
+	  if (DEVICE_X_P (XDEVICE (XCAR (devcons))) &&
+	      !EQ (device, XCAR (devcons)))
 	    {
 	      Vdefault_x_device = XCAR (devcons);
 	      goto double_break;
--- a/src/energize.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/energize.c	Mon Aug 13 09:40:41 2007 +0200
@@ -16,7 +16,7 @@
 /* Display Context for the icons */
 #include "console-x.h"
 #include <Xm/DialogS.h>
-#include "lwlib.h"
+#include "../lwlib/lwlib.h"
 #include "objects-x.h"
 
 #include "events.h"
--- a/src/event-Xt.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/event-Xt.c	Mon Aug 13 09:40:41 2007 +0200
@@ -26,7 +26,7 @@
 #include "lisp.h"
 
 #include "console-x.h"
-#include "lwlib.h"
+#include "../lwlib/lwlib.h"
 #include "EmacsFrame.h"
 
 #include "blocktype.h"
@@ -65,7 +65,7 @@
 #undef MOD_SHIFT
 #endif
 
-#include <events-mod.h>
+#include "events-mod.h"
 
 static void enqueue_Xt_dispatch_event (Lisp_Object event);
 
--- a/src/events.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/events.c	Mon Aug 13 09:40:41 2007 +0200
@@ -48,7 +48,7 @@
 #undef MOD_SHIFT
 #endif
 
-#include <events-mod.h>
+#include "events-mod.h"
 
 /* Where old events go when they are explicitly deallocated.
    The event chain here is cut loose before GC, so these will be freed
--- a/src/glyphs-x.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/glyphs-x.h	Mon Aug 13 09:40:41 2007 +0200
@@ -31,7 +31,7 @@
 #ifdef HAVE_X_WINDOWS
 
 #include "xintrinsic.h"
-#include "lwlib.h"
+#include "../lwlib/lwlib.h"
 
 /****************************************************************************
  *                         Image-Instance Object                            *
--- a/src/gui-x.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/gui-x.h	Mon Aug 13 09:40:41 2007 +0200
@@ -24,7 +24,7 @@
 #ifndef _XEMACS_XLWLIB_H_
 #define _XEMACS_XLWLIB_H_
 
-#include "lwlib.h"
+#include "../lwlib/lwlib.h"
 
 widget_value *xmalloc_widget_value (void);
 
--- a/src/keymap.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/keymap.c	Mon Aug 13 09:40:41 2007 +0200
@@ -49,7 +49,7 @@
 #undef MOD_SHIFT
 #endif
 
-#include <events-mod.h>
+#include "events-mod.h"
 
 
 /* A keymap contains four slots:
@@ -2417,6 +2417,12 @@
    margin, we should still consult the kemyap of that glyph's extent,
    which may not itself be under the mouse.
  */
+
+extern Lisp_Object Fextent_in_region_p(Lisp_Object extent,
+				       Lisp_Object from,
+				       Lisp_Object to,
+				       Lisp_Object flags);
+
 static void
 get_relevant_extent_keymaps (Lisp_Object pos, Lisp_Object buffer_or_string,
                              Lisp_Object glyph,
@@ -2436,14 +2442,17 @@
   if (!NILP (pos))
     {
       Lisp_Object extent;
-      for (extent = Fextent_at (pos, buffer_or_string, Qkeymap, Qnil, Qnil);
+      for (extent = Fextent_at (pos, buffer_or_string, Qkeymap, Qnil, Qat);
 	   !NILP (extent);
-	   extent = Fextent_at (pos, buffer_or_string, Qkeymap, extent, Qnil))
+	   extent = Fextent_at (pos, buffer_or_string, Qkeymap, extent, Qat))
 	{
-	  Lisp_Object keymap = Fextent_property (extent, Qkeymap, Qnil);
-	  if (!NILP (keymap))
-	    relevant_map_push (get_keymap (keymap, 1, 1), closure);
-	  QUIT;
+	  if (!NILP (Fextent_in_region_p (extent, pos, pos, Qnil)))
+	    {
+	      Lisp_Object keymap = Fextent_property (extent, Qkeymap, Qnil);
+	      if (!NILP (keymap))
+		relevant_map_push (get_keymap (keymap, 1, 1), closure);
+	      QUIT;
+	    }
 	}
     }
 }
--- a/src/lisp.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/lisp.h	Mon Aug 13 09:40:41 2007 +0200
@@ -39,6 +39,18 @@
 #include <stdio.h>		/* NULL, etc. */
 #include <ctype.h>
 #include <stdarg.h>
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+/* Define INT_MAX, DBL_DIG if not in limits.h */
+#ifndef INT_MAX
+#define INT_MAX ((int) ((1U << (INTBITS - 1)) - 1))
+#endif
+#ifndef DBL_DIG
+#define DBL_DIG 16
+#endif
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -292,10 +304,6 @@
 #define REGISTER register
 #endif
 
-#ifndef INT_MAX
-#define INT_MAX ((int) ((1U << (INTBITS - 1)) - 1))
-#endif
-
 #if defined (__GNUC__) && (__GNUC__ >= 2)
 /* Entomological studies have revealed that the following junk is
    necessary under GCC.  GCC has a compiler bug where incorrect
@@ -1153,10 +1161,6 @@
 #define float_next(f) ((f)->data.next)
 #define float_data(f) ((f)->data.d)
 
-#ifndef DBL_DIG
-# define DBL_DIG 16
-#endif
-
 #define XFLOATINT(n) extract_float (n)
 
 #define CHECK_INT_OR_FLOAT(x)					\
--- a/src/mule-wnnfns.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/mule-wnnfns.c	Mon Aug 13 09:40:41 2007 +0200
@@ -291,8 +291,14 @@
 void w2y (w_char *w);
 void c2m (unsigned char *cp, unsigned char *mp, unsigned char lb);
 static void puts2 (char *s);
+static int dai_end (int no, int server);
 static int yes_or_no (unsigned char *s);
 
+ /* Why doesn't wnn have a prototype for these? */
+typedef unsigned int letter;
+int cwnn_yincod_pzy(w_char *, w_char, int);
+int cwnn_pzy_yincod(letter *, letter *, int);
+
 static struct wnn_buf *wnnfns_buf[NSERVER];
 static struct wnn_env *wnnfns_env_norm[NSERVER];
 static struct wnn_env *wnnfns_env_rev[NSERVER];
@@ -350,12 +356,12 @@
       strcpy (langname, "ko_KR");
       break;
     }
-  strncpy (envname, XSTRING (lname)->_data, 32);
-  if (EQ(hname, Qnil)) strcpy (hostname, "");
+  strncpy (envname, (char *) XSTRING_DATA (lname), 32);
+  if (NILP (hname)) strcpy (hostname, "");
   else
     {
       CHECK_STRING (hname);
-      strncpy (hostname, XSTRING (hname)->_data, 32);
+      strncpy (hostname, (char *) XSTRING_DATA (hname), 32);
     }
   CHECK_STRING (lname);
   /* 97/4/16 jhod@po.iijnet.or.jp
@@ -496,12 +502,15 @@
     {
       dicinfo--;
       w2m (dicinfo->comment, comment, lb);
-      val = Fcons (Fcons (make_int (dicinfo->dic_no),
-			  list4 (make_string (dicinfo->fname, strlen
-					      (dicinfo->fname)),
-				 make_string (comment, strlen (comment)),
-				 make_int (dicinfo->gosuu),
-				 make_int (dicinfo->nice))), val);
+      /* #### The following has not been Mule-ized!!
+         fname and comment must be ASCII strings! */
+      val =
+	Fcons (Fcons (make_int (dicinfo->dic_no),
+		      list4 (make_string ((Bufbyte *) (dicinfo->fname),
+					  strlen (dicinfo->fname)),
+			     make_string (comment, strlen ((char *) comment)),
+			     make_int (dicinfo->gosuu),
+			     make_int (dicinfo->nice))), val);
     }
   return val;
 }
@@ -512,8 +521,8 @@
 */ 
      (dicno, comment))
 {
-  w_char		wbuf[512];
-  int	snum;
+  w_char wbuf[512];
+  int snum;
   CHECK_INT (dicno);
   CHECK_STRING (comment);
   if ((snum = check_wnn_server_type ()) == -1) return Qnil;
@@ -534,13 +543,13 @@
   if ((snum = check_wnn_server_type ()) == -1) return Qnil;
   if (EQ(rev, Qnil))
     {
-      if ((!wnnfns_buf[snum]) || (!wnnfns_env_norm[snum])) return;
+      if ((!wnnfns_buf[snum]) || (!wnnfns_env_norm[snum])) return Qnil;
       jl_env_set (wnnfns_buf[snum], wnnfns_env_norm[snum]);
       wnnfns_norm = 1;
     }
   else
     {
-      if ((!wnnfns_buf[snum]) || (!wnnfns_env_rev[snum])) return;
+      if ((!wnnfns_buf[snum]) || (!wnnfns_env_rev[snum])) return Qnil;
       jl_env_set (wnnfns_buf[snum], wnnfns_env_rev[snum]);
       wnnfns_norm = 0;
     }
@@ -618,7 +627,7 @@
   if (!wnnfns_buf[snum]) return Qnil;
   jl_get_zenkouho_kanji (wnnfns_buf[snum], XINT (kouhoNo), wbuf);
   w2m (wbuf, kanji_buf, lb);
-  return make_string (kanji_buf, strlen (kanji_buf));
+  return make_string (kanji_buf, strlen ((char *) kanji_buf));
 }
 
 DEFUN ("wnn-server-zenkouho-bun", Fwnn_zenkouho_bun, 0, 0, 0, /*
@@ -743,10 +752,10 @@
   for (i = yomilen; i >= jirilen; i--) wbuf[i+1] = wbuf[i];
   wbuf[jirilen] = '+';
   w2m (wbuf, cbuf, lb);
-  val = Fcons (make_string (cbuf, strlen (cbuf)), val);
+  val = Fcons (make_string (cbuf, strlen ((char *) cbuf)), val);
   jl_get_kanji (wnnfns_buf[snum], bun_no, bun_no + 1, wbuf);
   w2m (wbuf, cbuf, lb);
-  val = Fcons (make_string (cbuf, strlen (cbuf)), val);
+  val = Fcons (make_string (cbuf, strlen ((char *) cbuf)), val);
   return val;
 }
 
@@ -780,7 +789,7 @@
   no = XINT (bunNo);
   kanji_len = jl_get_kanji (wnnfns_buf[snum], no, no + 1, wbuf);
   w2m (wbuf, kanji_buf, lb);
-  return Fcons (make_string (kanji_buf, strlen (kanji_buf)),
+  return Fcons (make_string (kanji_buf, strlen ((char *) kanji_buf)),
 		make_int (kanji_len));
 }
 
@@ -802,7 +811,7 @@
   no = XINT (bunNo);
   yomi_len = jl_get_yomi (wnnfns_buf[snum], no, no + 1, wbuf);
   w2m (wbuf, yomi_buf, lb);
-  return Fcons (make_string (yomi_buf, strlen (yomi_buf)),
+  return Fcons (make_string (yomi_buf, strlen ((char *) yomi_buf)),
 		make_int (yomi_len));
 }
 
@@ -926,11 +935,11 @@
       val = Fcons (make_int (info_buf->hinshi), val);
       val = Fcons (make_int (info_buf->hindo), val);
       w2m (info_buf->com, cbuf, lb);
-      val = Fcons (make_string (cbuf, strlen (cbuf)), val);
+      val = Fcons (make_string (cbuf, strlen ((char *) cbuf)), val);
       w2m (info_buf->kanji, cbuf, lb);
-      val = Fcons (make_string (cbuf, strlen (cbuf)), val);
+      val = Fcons (make_string (cbuf, strlen ((char *) cbuf)), val);
       w2m (info_buf->yomi, cbuf, lb);
-      val = Fcons (make_string (cbuf, strlen (cbuf)), val);
+      val = Fcons (make_string (cbuf, strlen ((char *) cbuf)), val);
       return val;
     }
 }
@@ -986,7 +995,7 @@
     {
       wordinfo--;
       w2m (wordinfo->kanji, kanji_buf, lb);
-      val = Fcons (Fcons (make_string (kanji_buf, strlen (kanji_buf)),
+      val = Fcons (Fcons (make_string (kanji_buf, strlen ((char *) kanji_buf)),
 			  list4 (make_int (wordinfo->hinshi),
 				 make_int (wordinfo->hindo),
 				 make_int (wordinfo->dic_no),
@@ -1116,7 +1125,7 @@
 */
      ())
 {
-  char mbuf[256];
+  unsigned char mbuf[256];
   char 			*msgp;
   int			snum;
   unsigned char		lb;
@@ -1144,8 +1153,8 @@
   if (!wnnfns_buf[snum]) return Qnil;
 /*  msgp = msg_get (wnn_msg_cat, XINT (errno), 0, 0);*/
   msgp = wnn_perror_lang (langname);
-  c2m (msgp, mbuf, lb);
-  return make_string (mbuf, strlen (mbuf));
+  c2m ((unsigned char *) msgp, mbuf, lb);
+  return make_string (mbuf, strlen ((char *) mbuf));
 }
 
 
@@ -1173,7 +1182,7 @@
   if ((snum = check_wnn_server_type ()) == -1) return Qnil;
   if (!wnnfns_buf[snum]) return Qnil;
   if (jl_fuzokugo_get (wnnfns_buf[snum], fname) < 0) return Qnil;
-  return make_string (fname, strlen (fname));
+  return make_string ((Bufbyte *) fname, strlen (fname));
 }
 
 
@@ -1238,7 +1247,7 @@
     {
       area--;
       w2m (*area, cbuf, lb);
-      val = Fcons (make_string (cbuf, strlen (cbuf)), val);
+      val = Fcons (make_string (cbuf, strlen ((char *) cbuf)), val);
     }
   return val;
 }
@@ -1258,7 +1267,7 @@
   if (!wnnfns_buf[snum]) return Qnil;
   if ((wname = jl_hinsi_name (wnnfns_buf[snum], XINT (no))) == 0) return Qnil;
   w2m (wname, name, lb);
-  return make_string (name, strlen (name));
+  return make_string (name, strlen ((char *) name));
 }
 #ifdef	WNN6
 DEFUN ("wnn-server-fisys-dict-add", Fwnn_fisys_dict_add, 3, MANY, 0, /*
@@ -2004,8 +2013,8 @@
 void
 w2y (w_char *w)
 {
-  unsigned long		pbuf[5000], ybuf[5000];
-  unsigned long		*pin;
+  letter		pbuf[5000], ybuf[5000];
+  unsigned int		*pin;
   w_char *y;
   int len;
 
@@ -2049,7 +2058,7 @@
   *mp = 0;
 }
 
-int
+static int
 dai_end (int no, int server)
 {
   for (no++; no < jl_bun_suu (wnnfns_buf[server])
--- a/src/redisplay.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/redisplay.c	Mon Aug 13 09:40:41 2007 +0200
@@ -7573,7 +7573,7 @@
 		      else
 			*closest =
 			  Dynarr_atp (db->runes,
-				      Dynarr_length (db->runes) - 1)->bufpos;
+				      Dynarr_length (db->runes) - 2)->bufpos;
 		    }
 
 		  if (dl->modeline)
--- a/src/regex.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/regex.c	Mon Aug 13 09:40:41 2007 +0200
@@ -3249,20 +3249,19 @@
 compile_extended_range (CONST char **p_ptr, CONST char *pend, char *translate,
 			reg_syntax_t syntax, Lisp_Object rtab)
 {
-  Emchar this_char;
-
-  CONST char *p = *p_ptr;
-  EMACS_INT range_start, range_end;
+  Emchar this_char, range_start, range_end;
+  CONST Bufbyte *p;
   
-  if (p == pend)
+  if (*p_ptr == pend)
     return REG_ERANGE;
 
+  p = (CONST Bufbyte *) *p_ptr;
+  range_end = charptr_emchar (p);
   p--; /* back to '-' */
   DEC_CHARPTR (p); /* back to start of range */
   /* We also want to fetch the endpoints without translating them; the 
      appropriate translation is done in the bit-setting loop below.  */
-  range_start = charptr_emchar ((CONST Bufbyte *) p);
-  range_end = charptr_emchar ((CONST Bufbyte *) (*p_ptr));
+  range_start = charptr_emchar (p);
   INC_CHARPTR (*p_ptr);
 
   /* If the start is after the end, the range is empty.  */
@@ -3637,7 +3636,7 @@
 	case categoryspec:
 	case notcategoryspec:
 	  bufp->can_be_null = 1;
-	  return;
+	  return 0;
 /* end if category patch */
 #endif /* MULE */
 
--- a/src/s/bsdos2.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/bsdos2.h	Mon Aug 13 09:40:41 2007 +0200
@@ -4,5 +4,12 @@
 
 #include "bsd386.h"
 
+/* mrb was here */
+
+#define ORDINARY_LINK
+
+#if 0
+#define	START_FILES	pre-crt0.o /usr/lib/crt0.o
+#endif
+
 #define	TEXT_START	0x1020	/* for QMAGIC */
-#define	START_FILES	pre-crt0.o /usr/lib/crt0.o
--- a/src/s/freebsd.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/freebsd.h	Mon Aug 13 09:40:41 2007 +0200
@@ -82,14 +82,6 @@
 #define BSD 199506
 #endif
 
-/* FreeBSD defines INT_MAX in /usr/include/limits.h.
-   Unless INT_MAX is already defined in lisp.h, XEmacs goes right
-   ahead and rolls its own.
-   We make sure that the system's definition is used throughout. */
-#ifdef emacs
-#include <limits.h>
-#endif
-
 /* Needed to avoid hanging when child process writes an error message
    and exits -- enami tsugutomo <enami@ba2.so-net.or.jp>.  */
 #define vfork fork
--- a/src/s/linux.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/linux.h	Mon Aug 13 09:40:41 2007 +0200
@@ -167,25 +167,29 @@
    since libc-4.4.1.  So -lipc was deleted.  */
 #define LIBS_SYSTEM
 
+#if 0 /* these options should either be cross-platform or removed - mrb */
 /* XFree86 is built with -DFUNCPROTO=11 -DNARROWPROTO so we better build
    XEmacs with these switches too so that X functions get called correctly.
    At least XawScrollbarSetThumb needs this. */ 
 #define C_SWITCH_SYSTEM -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE
 #endif
+#define C_SWITCH_SYSTEM -DNARROWPROTO -D_BSD_SOURCE
+#endif
+
 
 /* XEmacs change: configure doesn't find this because math.h aliases
    rint to __rint so that it's not found. */
 #define HAVE_RINT 1
 
 #ifdef __ELF__
-#define UNEXEC unexelf.o
+#define UNEXEC "unexelf.o"
 #define UNEXEC_USE_MAP_PRIVATE
 #endif
 
 #ifdef LINUX_QMAGIC
 
 #define HAVE_TEXT_START
-#define UNEXEC unexsunos4.o
+#define UNEXEC "unexsunos4.o"
 #define N_PAGSIZ(x) PAGE_SIZE
 
 #else /* not LINUX_QMAGIC */
@@ -282,3 +286,12 @@
 #if defined __GLIBC__ && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2)
 # define GETPGRP_NEEDS_ARG
 #endif
+
+/*#ifdef __ELF__*/
+#if 0	/* This is broken -sb */
+/* mrb - Ordinary link is simple and effective */
+#define ORDINARY_LINK
+#undef START_FILES
+#undef LIB_STANDARD
+#undef LIB_GCC
+#endif /* __ELF__ */
--- a/src/s/netbsd.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/netbsd.h	Mon Aug 13 09:40:41 2007 +0200
@@ -5,8 +5,6 @@
 /* Get most of the stuff from bsd4.3 */
 #include "bsd4-3.h"
 
-/* limits that lisp.h might have to guess otherwise */
-#include <limits.h>
 #undef BSD
 
 #ifndef NOT_C_CODE
--- a/src/s/sol2-5.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sol2-5.h	Mon Aug 13 09:40:41 2007 +0200
@@ -4,23 +4,6 @@
 
 #include "sol2-4.h"
 
-#if 0 /* A recent patch in unexelf.c should eliminate the need for this.  */
-/* Don't use the shared libraries for -lXt and -lXaw,
-   to work around a linker bug in Solaris 2.5.
-   (This also affects the other libraries used specifically for
-   the X toolkit, which may not be necessary.)  */
-#define LIBXT_STATIC
-
-#ifdef __GNUC__
-#define STATIC_OPTION -Xlinker -Bstatic
-#define DYNAMIC_OPTION -Xlinker -Bdynamic
-#else
-#define STATIC_OPTION -Bstatic
-#define DYNAMIC_OPTION -Bdynamic
-#endif
- 
-#endif /* 0 */
-
 #ifndef NOT_C_CODE
 /* Solaris 2.5 is the first Solaris that has getpagesize(), srandom()
    and random(), but they forgot to add prototypes to the header
@@ -28,7 +11,7 @@
 int getpagesize (void);
 long random (void);
 void srandom (unsigned int seed);
-#endif /* NOT_C_CODE */
+#endif /* C_CODE */
 
 /* 2.5 now has random back in libc but we don't want to use it. */
 #undef HAVE_RANDOM
--- a/src/s/sol2-6.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sol2-6.h	Mon Aug 13 09:40:41 2007 +0200
@@ -8,4 +8,4 @@
 #ifdef UNEXEC
 #undef UNEXEC
 #endif
-#define UNEXEC unexsol2-6.o
+#define UNEXEC "unexsol2-6.o"
--- a/src/s/sol2-static.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sol2-static.h	Mon Aug 13 09:40:41 2007 +0200
@@ -10,31 +10,31 @@
 #undef LD_SWITCH_SYSTEM
 #ifndef __GNUC__
 # ifdef USE_LCC
-#  define LD_SWITCH_SYSTEM -R /usr/openwin/lib -Bstatic
+#  define LD_SWITCH_SYSTEM "-R /usr/openwin/lib -Bstatic"
 # else 
-#  define LD_SWITCH_SYSTEM -R/usr/openwin/lib -Bstatic
+#  define LD_SWITCH_SYSTEM "-R/usr/openwin/lib -Bstatic"
 #endif
 #else /* GCC */
 /* jwz: note that we need "-Xlinker -Bstatic" and not just "-static" */
-#define LD_SWITCH_SYSTEM -Xlinker -R/usr/openwin/lib -Xlinker -Bstatic
+#define LD_SWITCH_SYSTEM "-Xlinker -R/usr/openwin/lib -Xlinker -Bstatic"
 #endif /* GCC */
 
 /* static linking and Solaris don't mix real well */
 #undef LIB_STANDARD
 #ifndef __GNUC__
 # ifdef I18N4
-#  define LIB_STANDARD -lw -Bdynamic -lc -ldl -Bstatic
+#  define LIB_STANDARD "-lw -Bdynamic -lc -ldl -Bstatic"
 # else /* !I18N4 */
-#  define LIB_STANDARD -lw -lc -Bdynamic -ldl -Bstatic
+#  define LIB_STANDARD "-lw -lc -Bdynamic -ldl -Bstatic"
 # endif /* !I18N4 */
 #else
-# define LIB_STANDARD -lw -lc -Xlinker -Bdynamic -ldl
+# define LIB_STANDARD "-lw -lc -Xlinker -Bdynamic -ldl"
 #endif
 
 #undef LIBS_SYSTEM
 #ifdef NOT_C_CODE
 # undef LIBS_SYSTEM
-# define LIBS_SYSTEM -lsocket -lnsl -lintl -lelf -lgen
+# define LIBS_SYSTEM "-lsocket -lnsl -lintl -lelf -lgen"
 #else
-# define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen
+# define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen"
 #endif
--- a/src/s/sol2.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sol2.h	Mon Aug 13 09:40:41 2007 +0200
@@ -18,37 +18,12 @@
 
 #define POSIX
 
-#ifndef NOT_C_CODE
-/* The standard Solaris library nsl has this function in it which is
-   supposed to only be in the BSD compat stuff.  Yuck.  Of course,
-   there isn't a prototype for it other than in /usr/ucbinclude. */
-int gethostname (char *, size_t);
-/* Another missing prototype, added in Solaris 2.5 */
-extern void *__builtin_alloca(size_t);
-
-/* Get non-ANSI functions from ANSI header files in cc -Xc mode.
-   Sun has promised to fix setjmp.h */
-#if __STDC__ == 1
-#ifndef __GNUC__
-#define _POSIX_C_SOURCE 1
-#include <setjmp.h>
-#undef _POSIX_C_SOURCE
-#endif /* __GNUC__ */
-#endif /* __STDC__ */
-
-/* XEmacs: Solaris include files miss this. */
-struct timeval;
-int utimes (char *file, struct timeval *tvp);
-
-/* XEmacs addition: to this to avoid having problems when we later
-   define INT_MAX etc. */
-#include <limits.h>
-#endif /* C_CODE */
+#ifdef NOT_C_CODE
 
 /* XEmacs change -- some Motif packages need -lgen to get regex and regcmp */
 
 #undef LIBS_SYSTEM
-#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen -ldl
+#define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen -ldl"
 
 /* SYSTEM_MALLOC must be defined if dbx/RTC is going to be used.  dbx/RTC does
    not work with a static definition of malloc(). */
@@ -62,13 +37,31 @@
    is *not* in 19.29 and is almost certainly incorrect.
  */
 
-/* XEmacs change from Georg.Nikodym@Canada.Sun.COM. */
-#ifdef UNEXEC
 #undef UNEXEC
-#endif
-#define UNEXEC unexsol2.o
+#define UNEXEC "unexsol2.o"
+
+#else /* C_CODE */
+/* The standard Solaris library nsl has this function in it which is
+   supposed to only be in the BSD compat stuff.  Yuck.  Of course,
+   there isn't a prototype for it other than in /usr/ucbinclude. */
+int gethostname (char *, size_t);
+/* Another missing prototype, added in Solaris 2.5 */
+extern void *__builtin_alloca(size_t);
+
+/* XEmacs: Solaris include files miss this. */
+struct timeval;
+int utimes (char *file, struct timeval *tvp);
+
+/* Get non-ANSI functions from ANSI header files in cc -Xc mode.
+   Sun has promised to fix setjmp.h */
+#if __STDC__ == 1 && defined(__SUNPRO_C)
+#define _POSIX_C_SOURCE 1
+#include <setjmp.h>
+#undef _POSIX_C_SOURCE
+#endif /* cc -Xc */
 
 /* XEmacs: Solaris has sigsetjmp but using it leads to core dumps at
    least under 2.4 */
 #undef _setjmp
 #define _setjmp setjmp
+#endif /* C_CODE */
--- a/src/s/sunos4-0-shr.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sunos4-0-shr.h	Mon Aug 13 09:40:41 2007 +0200
@@ -16,7 +16,7 @@
 
 /*  Misleading!  Actually gets loaded after crt0.o */
 #undef START_FILES
-#define START_FILES pre-crt0.o
+#define START_FILES "pre-crt0.o"
 
 /*
  *  Kludge!  can't get at symbol "start" in std crt0.o
@@ -31,7 +31,7 @@
 #endif
 
 #undef UNEXEC
-#define UNEXEC	unexsunos4.o
+#define UNEXEC	"unexsunos4.o"
 #ifndef RUN_TIME_REMAP
 #define RUN_TIME_REMAP
 #endif
@@ -55,9 +55,9 @@
    did not work.  With X11R6, it does work; and since normally
    only the dynamic libraries are available, we should use them.  */
 #ifdef __GNUC__
-#define LIBXMU -Xlinker -Bstatic -lXmu -Xlinker -Bdynamic
+#define LIBXMU "-Xlinker -Bstatic -lXmu -Xlinker -Bdynamic"
 #else
-#define LIBXMU -Bstatic -lXmu -Bdynamic
+#define LIBXMU "-Bstatic -lXmu -Bdynamic"
 #endif
 
 #endif  /* not HAVE_X11R6 */
--- a/src/s/sunos4-0.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sunos4-0.h	Mon Aug 13 09:40:41 2007 +0200
@@ -31,12 +31,12 @@
 # ifndef LD_SWITCH_SYSTEM
 #  ifdef USE_GCC
 /* of course gcc has to take different args than the rest of the universe */
-#   define LD_SWITCH_SYSTEM -static
+#   define LD_SWITCH_SYSTEM "-static"
 #  else
-#   define LD_SWITCH_SYSTEM -Bstatic
+#   define LD_SWITCH_SYSTEM "-Bstatic"
 #  endif
 # endif
-# define UNEXEC unexsunos4.o
+# define UNEXEC "unexsunos4.o"
 #endif
 
 #define RUN_TIME_REMAP
@@ -48,7 +48,7 @@
 
 /* XEmacs change -- Sun CC needs this to default to ANSI */
 #if __SUNPRO_C
-#define C_SWITCH_SYSTEM -Xa
+#define C_SWITCH_SYSTEM "-Xa"
 #endif
 
 /* #### XEmacs: #define of SYSTEM_MALLOC removed.  Is this OK?  FSF says:
@@ -69,7 +69,7 @@
  */
 /* Since lcc is not going to be heavily used anymore if it ever was, I'm
    putting broken-sun.h back in. */
-#include "broken-sun.h"
+#include "../broken-sun.h"
 extern char *strdup ();
 extern char *ttyname (int);
 extern void tzsetwall (void);
--- a/src/s/sunos4-1-2-shr.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sunos4-1-2-shr.h	Mon Aug 13 09:40:41 2007 +0200
@@ -5,9 +5,9 @@
 #ifdef NOT_C_CODE
 # ifdef USE_GCC
   /* of course gcc has to take different args than the rest of the universe */
-#  define LD_SWITCH_SYSTEM -dynamic
+#  define LD_SWITCH_SYSTEM "-dynamic"
 # else
-#  define LD_SWITCH_SYSTEM -Bdynamic
+#  define LD_SWITCH_SYSTEM "-Bdynamic"
 # endif
 #endif
 
--- a/src/s/sunos4-1-3-shr.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sunos4-1-3-shr.h	Mon Aug 13 09:40:41 2007 +0200
@@ -5,9 +5,9 @@
 #ifdef NOT_C_CODE
 # ifdef USE_GCC
   /* of course gcc has to take different args than the rest of the universe */
-#  define LD_SWITCH_SYSTEM -dynamic
+#  define LD_SWITCH_SYSTEM "-dynamic"
 # else
-#  define LD_SWITCH_SYSTEM -Bdynamic
+#  define LD_SWITCH_SYSTEM "-Bdynamic"
 # endif
 #endif
 
--- a/src/s/sunos4-1-4-shr.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sunos4-1-4-shr.h	Mon Aug 13 09:40:41 2007 +0200
@@ -5,9 +5,9 @@
 #ifdef NOT_C_CODE
 # ifdef USE_GCC
   /* of course gcc has to take different args than the rest of the universe */
-#  define LD_SWITCH_SYSTEM -dynamic
+#  define LD_SWITCH_SYSTEM "-dynamic"
 # else
-#  define LD_SWITCH_SYSTEM -Bdynamic
+#  define LD_SWITCH_SYSTEM "-Bdynamic"
 # endif
 #endif
 
--- a/src/s/sunos4-1-shr.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sunos4-1-shr.h	Mon Aug 13 09:40:41 2007 +0200
@@ -5,9 +5,9 @@
 #ifdef NOT_C_CODE
 # ifdef USE_GCC
   /* of course gcc has to take different args than the rest of the universe */
-#  define LD_SWITCH_SYSTEM -dynamic
+#  define LD_SWITCH_SYSTEM "-dynamic"
 # else
-#  define LD_SWITCH_SYSTEM -Bdynamic
+#  define LD_SWITCH_SYSTEM "-Bdynamic"
 # endif
 #endif
 
--- a/src/s/sunos4-1.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/s/sunos4-1.h	Mon Aug 13 09:40:41 2007 +0200
@@ -34,7 +34,7 @@
 /* XEmacs change: -lresolve should be added only if we have RES_INIT,
    not if we don't */
 #ifdef HAVE_RES_INIT
-#define LIBS_SYSTEM -lresolv
+#define LIBS_SYSTEM "-lresolv"
 #endif
 /* #endif */
 
--- a/src/sysdep.c	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/sysdep.c	Mon Aug 13 09:40:41 2007 +0200
@@ -373,7 +373,7 @@
 	       Can you say "race condition"?
 	       
 	       I assume that the system calls sigpause() or sigsuspend()
-	       provide this atomicness.  If you're getting hangs in
+	       to provide this atomicness.  If you're getting hangs in
 	       sigpause()/sigsuspend(), then your OS doesn't
 	       implement this properly (this applies under hpux9,
 	       for example).  Try defining BROKEN_WAIT_FOR_SIGNAL. */
@@ -1324,6 +1324,8 @@
 
 /* It's wrong to encase these into #ifdef HAVE_TTY because we need
    them for child TTY processes.  */
+/* However, this does break NT support while we don't do child TTY processes */
+#ifndef WINDOWSNT
 
 /* Set *TC to the parameters associated with the terminal FD.
    Return zero if all's well, or -1 if we ran into an error we
@@ -1464,6 +1466,7 @@
   return 0;
 }
 
+#endif /* WINDOWSNT */
 
 /* ------------------------------------------------------ */
 /*                 Initializing a device                  */
--- a/src/xmmanagerp.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/xmmanagerp.h	Mon Aug 13 09:40:41 2007 +0200
@@ -20,18 +20,6 @@
 
 /* Synched up with: Not in FSF. */
 
-/* Motif attempts to use old '/ * * /' method of pasting tokens together
-   unless __STDC__ > 0.  Bad idea, because the SunPro C compiler defines
-   __STDC__ to 0 in "lenient ANSI mode" (which is what you need to
-   compile Emacs in).  Unfortunately, some compilers don't let you mess
-   around with __STDC__, so ... */
-
-#if defined(__SUNPRO_C) && (__STDC__ == 0)
-# undef __STDC__
-# define __STDC__ 1
-# define __STDC__CHANGED__
-#endif
-
 /* ManagerP.h doesn't exist in old versions of Motif; the stuff is
    in XmP.h instead */
 
@@ -41,9 +29,3 @@
 #else
 # include <Xm/XmP.h>
 #endif
-
-#ifdef __STDC__CHANGED__
-# undef __STDC__
-# define __STDC__ 0
-# undef __STDC__CHANGED__
-#endif
--- a/src/xmprimitivep.h	Mon Aug 13 09:39:46 2007 +0200
+++ b/src/xmprimitivep.h	Mon Aug 13 09:40:41 2007 +0200
@@ -20,18 +20,6 @@
 
 /* Synched up with: Not in FSF. */
 
-/* Motif attempts to use old '/ * * /' method of pasting tokens together
-   unless __STDC__ > 0.  Bad idea, because the SunPro C compiler defines
-   __STDC__ to 0 in "lenient ANSI mode" (which is what you need to
-   compile Emacs in).  Unfortunately, some compilers don't let you mess
-   around with __STDC__, so ... */
-
-#if defined(__SUNPRO_C) && (__STDC__ == 0)
-# undef __STDC__
-# define __STDC__ 1
-# define __STDC__CHANGED__
-#endif
-
 /* PrimitiveP.h doesn't exist in old versions of Motif; the stuff is
    in XmP.h instead */
 
@@ -41,9 +29,3 @@
 #else
 # include <Xm/XmP.h>
 #endif
-
-#ifdef __STDC__CHANGED__
-# undef __STDC__
-# define __STDC__ 0
-# undef __STDC__CHANGED__
-#endif