changeset 432:3a7e78e1142d r21-2-24

Import from CVS: tag r21-2-24
author cvs
date Mon, 13 Aug 2007 11:29:58 +0200
parents a97165e56215
children 892ca416f0fb
files CHANGES-beta ChangeLog PROBLEMS configure configure.in configure.usage etc/NEWS lib-src/ChangeLog lib-src/etags.c lisp/ChangeLog lisp/about.el lisp/font-lock.el lwlib/ChangeLog lwlib/lwlib-Xlw.c lwlib/xlwtabs.c man/ChangeLog man/xemacs/startup.texi nt/ChangeLog nt/xemacs.mak src/ChangeLog src/callproc.c src/dbxrc src/elhash.c src/events.h src/faces.h src/file-coding.c src/fileio.c src/input-method-xlib.c src/lrecord.h src/nas.c src/nt.c src/ntproc.c src/process-nt.c src/redisplay.h src/s/windowsnt.h src/sound.c src/sysdep.c src/sysdep.h src/sysdir.h src/sysfile.h src/systty.h tests/ChangeLog version.sh
diffstat 43 files changed, 994 insertions(+), 537 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 11:29:10 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 11:29:58 2007 +0200
@@ -1,5 +1,10 @@
 							-*- indented-text -*-
 to 21.2.24 "Hecate"
+-- (coding-system-list) deals properly with coding system aliases, Shenghuo ZHU
+-- configure support for ESD sound rewritte, Martin Buchholz
+-- directory separator fix from Mike Alexander
+-- Windows process support cleanup, Adrian Aichner
+-- NT now encapsulates fstat to get correct file mod time, Adrian Aichner
 
 to 21.2.23 "Hebe"
 -- MS-Windows selection fixes from Mike Alexander
--- a/ChangeLog	Mon Aug 13 11:29:10 2007 +0200
+++ b/ChangeLog	Mon Aug 13 11:29:58 2007 +0200
@@ -1,3 +1,29 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.24 is released.
+
+1999-12-13  Martin Buchholz  <martin@xemacs.org>
+
+	* configure.in: 
+	* configure.usage:
+	- Autodetect NAS.  Change Docs accordingly.
+
+	* configure.in: Warn if configure --with-xpm --without-x11.
+
+1999-12-09  Martin Buchholz  <martin@xemacs.org>
+
+	* configure.in: Clean up sound support.
+	- variable `old_nas' was used but never set.
+	- change `with_esd' to `with_esd_sound' for consistency.
+	- Don't trust the output of `esd-config --libs`; test it.
+	- Add `esd-config --cflags` to c_switch_site.
+	- Die if ESD sound requested, but not available.
+	- ESD is not dependent on X, therefore use LIBS, not libs_x.
+
+1999-12-07  Martin Buchholz  <martin@xemacs.org>
+
+	* configure.in (--with-sound): Variable with_esd was mispelled.
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.23 is released.
--- a/PROBLEMS	Mon Aug 13 11:29:10 2007 +0200
+++ b/PROBLEMS	Mon Aug 13 11:29:58 2007 +0200
@@ -41,8 +41,8 @@
 There have been reports of egcs-1.1 not compiling XEmacs correctly on
 Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K.
 
-*** Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using
-`-fno-strength-reduce'.
+*** Don't use -O2 or -O3 with Cygwin 1.0, CodeFusion-99070 or gcc 2.7.2 on x86
+without also using `-fno-strength-reduce'.
 
 gcc will generate incorrect code otherwise.  This bug is present in at
 least 2.6.x and 2.7.[0-2].  This bug has been fixed in GCC 2.7.2.1 and
@@ -50,6 +50,25 @@
 
 This problem is known to be fixed in egcs (or pgcc) 1.0 or later.
 
+Unfortunately, later releases of Cygnus-released compilers (not the
+Net-released ones) have a bug with the same `problem signature'.
+
+If you're lucky, you'll get an error while compiling that looks like:
+
+event-stream.c:3189: internal error--unrecognizable insn:
+(insn 256 14 15 (set (reg/v:SI 24)
+        (minus:SI (reg/v:SI 25)
+            (const_int 2))) -1 (insn_list 11 (nil))
+    (nil))
+    0       0 [main]
+
+If you're unlucky, your code will simply execute incorrectly.
+
+*** Don't use gcc-2.95.2 with -mcpu=ultrasparc on Solaris 2.6.
+
+gcc will assume a 64-bit operating system, even though you've
+merely told it to assume a 64-bit instruction set.
+
 *** Don't use -O2 with gcc 2.7.2 under Intel architectures without also
 using `-fno-caller-saves'.
 
--- a/configure	Mon Aug 13 11:29:10 2007 +0200
+++ b/configure	Mon Aug 13 11:29:58 2007 +0200
@@ -459,8 +459,8 @@
 	      nas )          with_nas_sound=yes ;;
 	      nonas )        with_nas_sound=no ;;
 
-	      esd )	     with_esd=yes ;;
-	      noesd )        with_esh=no ;;
+	      esd )	     with_esd_sound=yes ;;
+	      noesd )        with_esd_sound=no ;;
 
 	      * ) bogus_sound=yes ;;
 	    esac
@@ -470,12 +470,12 @@
 		(echo "$progname: Usage error:"
 echo " " "Valid types for the \`--$optname' option are:
   $types.
-The default is native,esd."
+The default is to autodetect all sound support."
 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
 	    elif test -n "$new_sdefault" ; then
 		with_native_sound=$new_sdefault
 		with_nas_sound=$new_sdefault
-		with_esd=$new_sdefault
+		with_esd_sound=$new_sdefault
 		new_sdefault=	# reset this
 	    fi
 	    sound_notfirst=true
@@ -6197,7 +6197,7 @@
 fi
 
 if test "$with_x11" != "yes"; then
-            for feature in tooltalk cde offix wmcommand xim xmu
+            for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound
   do
     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
@@ -8004,12 +8004,6 @@
   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"gui-x.o\""
  fi
-else
-  if test "$with_nas_sound" = "nas"; then
-    echo "Attempt to Build NAS sound without X"
-    echo "Please remove NAS configuration or build with X"
-    exit 1
-  fi
 fi
 
 
@@ -8033,7 +8027,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:8037: checking for Mule-related features" >&5
+echo "configure:8031: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -8058,15 +8052,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8062: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8065 "configure"
+echo "configure:8056: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8059 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8097,12 +8091,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:8101: checking for strerror in -lintl" >&5
+echo "configure:8095: 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 8106 "configure"
+#line 8100 "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
@@ -8113,7 +8107,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8146,18 +8140,18 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:8150: checking for Mule input methods" >&5
+echo "configure:8144: checking for Mule input methods" >&5
         case "$with_xim" in "" | "yes" )
     echo "checking for XIM" 1>&6
-echo "configure:8153: checking for XIM" >&5
+echo "configure:8147: checking for XIM" >&5
     
 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
-echo "configure:8156: checking for XOpenIM in -lX11" >&5
+echo "configure:8150: checking for XOpenIM in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 8161 "configure"
+#line 8155 "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
@@ -8168,7 +8162,7 @@
 XOpenIM()
 ; return 0; }
 EOF
-if { (eval echo configure:8172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8192,12 +8186,12 @@
         if test "$have_motif $have_lesstif" = "yes no"; then
       
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:8196: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:8190: 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 8201 "configure"
+#line 8195 "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
@@ -8208,7 +8202,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:8212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8273,15 +8267,15 @@
 
     if test "$with_xfs" = "yes" ; then
     echo "checking for XFontSet" 1>&6
-echo "configure:8277: checking for XFontSet" >&5
+echo "configure:8271: checking for XFontSet" >&5
     
 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:8280: checking for XmbDrawString in -lX11" >&5
+echo "configure:8274: checking for XmbDrawString in -lX11" >&5
 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 8285 "configure"
+#line 8279 "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
@@ -8292,7 +8286,7 @@
 XmbDrawString()
 ; return 0; }
 EOF
-if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8332,15 +8326,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:8336: checking for wnn/jllib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8339 "configure"
+echo "configure:8330: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8333 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8365,10 +8359,10 @@
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8369: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8372 "configure"
+echo "configure:8363: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8366 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8391,7 +8385,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8420,12 +8414,12 @@
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:8424: checking for crypt in -lcrypt" >&5
+echo "configure:8418: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcrypt "
 cat > conftest.$ac_ext <<EOF
-#line 8429 "configure"
+#line 8423 "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
@@ -8436,7 +8430,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8471,12 +8465,12 @@
     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
     
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:8475: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:8469: checking for jl_dic_list_e in -lwnn" >&5
 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn "
 cat > conftest.$ac_ext <<EOF
-#line 8480 "configure"
+#line 8474 "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
@@ -8487,7 +8481,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8505,12 +8499,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
-echo "configure:8509: checking for jl_dic_list_e in -lwnn4" >&5
+echo "configure:8503: checking for jl_dic_list_e in -lwnn4" >&5
 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn4 "
 cat > conftest.$ac_ext <<EOF
-#line 8514 "configure"
+#line 8508 "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
@@ -8521,7 +8515,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8539,12 +8533,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
-echo "configure:8543: checking for jl_dic_list_e in -lwnn6" >&5
+echo "configure:8537: checking for jl_dic_list_e in -lwnn6" >&5
 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn6 "
 cat > conftest.$ac_ext <<EOF
-#line 8548 "configure"
+#line 8542 "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
@@ -8555,7 +8549,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8573,12 +8567,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
-echo "configure:8577: checking for dic_list_e in -lwnn6_fromsrc" >&5
+echo "configure:8571: checking for dic_list_e in -lwnn6_fromsrc" >&5
 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn6_fromsrc "
 cat > conftest.$ac_ext <<EOF
-#line 8582 "configure"
+#line 8576 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8589,7 +8583,7 @@
 dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8637,12 +8631,12 @@
     if test "$with_wnn6" != "no"; then
       
 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
-echo "configure:8641: checking for jl_fi_dic_list in -l$libwnn" >&5
+echo "configure:8635: checking for jl_fi_dic_list in -l$libwnn" >&5
 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$libwnn "
 cat > conftest.$ac_ext <<EOF
-#line 8646 "configure"
+#line 8640 "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
@@ -8653,7 +8647,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:8657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8688,15 +8682,15 @@
   if test "$with_canna" != "no"; then
     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
-echo "configure:8692: checking for canna/jrkanji.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8695 "configure"
+echo "configure:8686: checking for canna/jrkanji.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8689 "configure"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8723,15 +8717,15 @@
     c_switch_site="$c_switch_site -I/usr/local/canna/include"
     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
-echo "configure:8727: checking for canna/jrkanji.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8730 "configure"
+echo "configure:8721: checking for canna/jrkanji.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8724 "configure"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8759,15 +8753,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:8763: checking for canna/RK.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8766 "configure"
+echo "configure:8757: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8760 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8790,12 +8784,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:8794: checking for RkBgnBun in -lRKC" >&5
+echo "configure:8788: 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 8799 "configure"
+#line 8793 "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
@@ -8806,7 +8800,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:8810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8829,12 +8823,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:8833: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:8827: 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 8838 "configure"
+#line 8832 "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
@@ -8845,7 +8839,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:8849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8894,12 +8888,12 @@
   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
     
 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
-echo "configure:8898: checking for layout_object_getvalue in -li18n" >&5
+echo "configure:8892: checking for layout_object_getvalue in -li18n" >&5
 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -li18n "
 cat > conftest.$ac_ext <<EOF
-#line 8903 "configure"
+#line 8897 "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
@@ -8910,7 +8904,7 @@
 layout_object_getvalue()
 ; return 0; }
 EOF
-if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8996,10 +8990,10 @@
 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9000: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9003 "configure"
+echo "configure:8994: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8997 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9022,7 +9016,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9063,10 +9057,10 @@
       * ) for ac_func in realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9067: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9070 "configure"
+echo "configure:9061: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9064 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9089,7 +9083,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9125,10 +9119,10 @@
 for ac_func in getloadavg
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9129: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9132 "configure"
+echo "configure:9123: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9126 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9151,7 +9145,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9187,12 +9181,12 @@
 
     
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:9191: checking for kstat_open in -lkstat" >&5
+echo "configure:9185: 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 9196 "configure"
+#line 9190 "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
@@ -9203,7 +9197,7 @@
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9237,12 +9231,12 @@
 
     
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:9241: checking for kvm_read in -lkvm" >&5
+echo "configure:9235: 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 9246 "configure"
+#line 9240 "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
@@ -9253,7 +9247,7 @@
 kvm_read()
 ; return 0; }
 EOF
-if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9287,16 +9281,16 @@
 fi
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:9291: checking whether netdb declares h_errno" >&5
-cat > conftest.$ac_ext <<EOF
-#line 9293 "configure"
+echo "configure:9285: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 9287 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -9316,16 +9310,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:9320: checking for sigsetjmp" >&5
-cat > conftest.$ac_ext <<EOF
-#line 9322 "configure"
+echo "configure:9314: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 9316 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:9329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9323: \"$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
@@ -9345,11 +9339,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:9349: checking whether localtime caches TZ" >&5
+echo "configure:9343: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 9353 "configure"
+#line 9347 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -9384,7 +9378,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -9414,9 +9408,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
-echo "configure:9418: checking whether gettimeofday accepts one or two arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 9420 "configure"
+echo "configure:9412: checking whether gettimeofday accepts one or two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 9414 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -9438,7 +9432,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""two" 1>&6
 else
@@ -9460,19 +9454,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:9464: checking for inline" >&5
+echo "configure:9458: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 9469 "configure"
+#line 9463 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:9476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -9522,17 +9516,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:9526: checking for working alloca.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9529 "configure"
+echo "configure:9520: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9523 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:9536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -9556,10 +9550,10 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:9560: checking for alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9563 "configure"
+echo "configure:9554: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9557 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -9587,7 +9581,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -9626,10 +9620,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:9630: checking whether alloca needs Cray hooks" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9633 "configure"
+echo "configure:9624: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9627 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -9653,10 +9647,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:9657: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9660 "configure"
+echo "configure:9651: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9654 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9679,7 +9673,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9709,10 +9703,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:9713: checking stack direction for C alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9716 "configure"
+echo "configure:9707: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9710 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -9731,7 +9725,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -9760,15 +9754,15 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:9764: checking for vfork.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9767 "configure"
+echo "configure:9758: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9761 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9796,10 +9790,10 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:9800: checking for working vfork" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9803 "configure"
+echo "configure:9794: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9797 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -9894,7 +9888,7 @@
   }
 }
 EOF
-if { (eval echo configure:9898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
@@ -9920,10 +9914,10 @@
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:9924: checking for working strcoll" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9927 "configure"
+echo "configure:9918: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9921 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -9933,7 +9927,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -9961,10 +9955,10 @@
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9965: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9968 "configure"
+echo "configure:9959: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9962 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9987,7 +9981,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -10015,10 +10009,10 @@
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:10019: checking whether getpgrp takes no argument" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10022 "configure"
+echo "configure:10013: checking whether getpgrp takes no argument" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10016 "configure"
 #include "confdefs.h"
 
 /*
@@ -10073,7 +10067,7 @@
 }
 
 EOF
-if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_getpgrp_void=yes
 else
@@ -10100,10 +10094,10 @@
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:10104: checking for working mmap" >&5
+echo "configure:10098: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 10107 "configure"
+#line 10101 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -10136,7 +10130,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:10140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   have_mmap=yes
 else
@@ -10171,15 +10165,15 @@
 
 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:10175: checking for termios.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10178 "configure"
+echo "configure:10169: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10172 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10222,15 +10216,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:10226: checking for termio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10229 "configure"
+echo "configure:10220: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10223 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10262,10 +10256,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:10266: checking for socket" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10269 "configure"
+echo "configure:10260: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10263 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -10288,7 +10282,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -10303,15 +10297,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:10307: checking for netinet/in.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10310 "configure"
+echo "configure:10301: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10304 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10328,15 +10322,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:10332: checking for arpa/inet.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10335 "configure"
+echo "configure:10326: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10329 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10361,9 +10355,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:10365: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:10359: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 10367 "configure"
+#line 10361 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10374,7 +10368,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:10378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SOCKADDR_SUN_LEN
@@ -10392,9 +10386,9 @@
 fi
 rm -f conftest*
       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
-echo "configure:10396: checking "for ip_mreq struct in netinet/in.h"" >&5
+echo "configure:10390: checking "for ip_mreq struct in netinet/in.h"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 10398 "configure"
+#line 10392 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10404,7 +10398,7 @@
 static struct ip_mreq x;
 ; return 0; }
 EOF
-if { (eval echo configure:10408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_MULTICAST
@@ -10435,10 +10429,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:10439: checking for msgget" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10442 "configure"
+echo "configure:10433: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10436 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -10461,7 +10455,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -10476,15 +10470,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:10480: checking for sys/ipc.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10483 "configure"
+echo "configure:10474: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10477 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10501,15 +10495,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:10505: checking for sys/msg.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10508 "configure"
+echo "configure:10499: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10502 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10547,15 +10541,15 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:10551: checking for dirent.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10554 "configure"
+echo "configure:10545: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10548 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10582,15 +10576,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:10586: checking for sys/dir.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10589 "configure"
+echo "configure:10580: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10583 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10623,15 +10617,15 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:10627: checking for nlist.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10630 "configure"
+echo "configure:10621: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10624 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10661,22 +10655,22 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:10665: checking "for sound support"" >&5
+echo "configure:10659: checking "for sound support"" >&5
 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
 
 if test "$with_native_sound" != "no"; then
     if test -n "$native_sound_lib"; then
     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
-echo "configure:10672: checking for multimedia/audio_device.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10675 "configure"
+echo "configure:10666: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10669 "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:10680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10724,12 +10718,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:10728: checking for ALopenport in -laudio" >&5
+echo "configure:10722: 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 10733 "configure"
+#line 10727 "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
@@ -10740,7 +10734,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10771,12 +10765,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:10775: checking for AOpenAudio in -lAlib" >&5
+echo "configure:10769: 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 10780 "configure"
+#line 10774 "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
@@ -10787,7 +10781,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10825,15 +10819,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:10829: checking for ${dir}/soundcard.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10832 "configure"
+echo "configure:10823: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10826 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10884,8 +10878,78 @@
   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
 fi
 
-if test "$with_nas_sound" = "yes"; then
-  { test "$extra_verbose" = "yes" && cat << \EOF
+if test "$with_nas_sound" != "no"; then
+  ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
+echo "configure:10885: checking for audio/audiolib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10888 "configure"
+#include "confdefs.h"
+#include <audio/audiolib.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+    
+echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
+echo "configure:10911: checking for AuOpenServer in -laudio" >&5
+ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -laudio "
+cat > conftest.$ac_ext <<EOF
+#line 10916 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char AuOpenServer();
+
+int main() {
+AuOpenServer()
+; return 0; }
+EOF
+if { (eval echo configure:10927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  have_nas_sound=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test "$have_nas_sound" = "yes"; then
+    with_nas_sound=yes
+    { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_NAS_SOUND
 EOF
 cat >> confdefs.h <<\EOF
@@ -10893,12 +10957,12 @@
 EOF
 }
 
-  extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
+    extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"nas.o\""
  fi
-  libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
-      cat > conftest.$ac_ext <<EOF
-#line 10902 "configure"
+    libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
+            cat > conftest.$ac_ext <<EOF
+#line 10966 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -10907,7 +10971,7 @@
   :
 else
   rm -rf conftest*
-  { test "$extra_verbose" = "yes" && cat << \EOF
+  old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining NAS_NO_ERROR_JUMP
 EOF
 cat >> confdefs.h <<\EOF
@@ -10918,12 +10982,18 @@
 fi
 rm -f conftest*
 
-fi
-
-# Extract the first word of "esd-config", so it can be a program name with args.
+  else
+    test "$with_nas_sound" = "yes" && \
+      { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
+    with_nas_sound=no
+  fi
+fi
+
+if test "$with_esd_sound" != "no"; then
+  # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:10927: checking for $ac_word" >&5
+echo "configure:10997: checking for $ac_word" >&5
 
 if test -n "$have_esd_config"; then
   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
@@ -10947,15 +11017,64 @@
   echo "$ac_t""no" 1>&6
 fi
 
-if test -z "$with_esd"; then
-  with_esd=$have_esd_config
-fi
-
-if test "$with_esd" = "yes"; then
-  if test "$have_esd_config" = "no"; then
-    echo "*** esd-config was not found in your PATH. Disabling esd support."
-    with_esd=no
-  else
+  if test "$have_esd_config" = "yes"; then
+    save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
+    c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
+    LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
+    echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
+echo "configure:11026: checking for esd_play_stream" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11029 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char esd_play_stream(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char esd_play_stream();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
+choke me
+#else
+esd_play_stream();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_esd_play_stream=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_esd_play_stream=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_esd_sound=yes
+else
+  echo "$ac_t""no" 1>&6
+c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
+fi
+
+  fi
+
+  if test "$have_esd_sound" = "yes"; then
+    with_esd_sound=yes
+    need_miscplay=yes
+    extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"esd.o\""
+ fi
     { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_ESD_SOUND
 EOF
@@ -10964,26 +11083,23 @@
 EOF
 }
 
-    need_miscplay=yes
-    extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
-   echo "    xemacs will be linked with \"esd.o\""
- fi
-    libs_x="`esd-config --libs` $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$libs_x"; fi
-  fi
-fi
-
-if test "$need_miscplay" = "yes"; then
-  extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
+  else
+    test "$with_esd_sound" = "yes" && \
+      { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
+    with_esd_sound=no
+  fi
+fi
+
+test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"miscplay.o\""
  fi
-fi
 
 
 test -z "$with_tty" && with_tty=yes
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:10987: checking for TTY-related features" >&5
+echo "configure:11103: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -10999,12 +11115,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:11003: checking for tgetent in -lncurses" >&5
+echo "configure:11119: 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 11008 "configure"
+#line 11124 "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
@@ -11015,7 +11131,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11048,15 +11164,15 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:11052: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11055 "configure"
+echo "configure:11168: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11171 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11078,15 +11194,15 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:11082: checking for ncurses/term.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11085 "configure"
+echo "configure:11198: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11201 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11116,15 +11232,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:11120: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11123 "configure"
+echo "configure:11236: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11239 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11159,12 +11275,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:11163: checking for tgetent in -l$lib" >&5
+echo "configure:11279: 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 11168 "configure"
+#line 11284 "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
@@ -11175,7 +11291,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11206,12 +11322,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:11210: checking for tgetent in -lcurses" >&5
+echo "configure:11326: 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 11215 "configure"
+#line 11331 "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
@@ -11222,7 +11338,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11240,12 +11356,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:11244: checking for tgetent in -ltermcap" >&5
+echo "configure:11360: 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 11249 "configure"
+#line 11365 "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
@@ -11256,7 +11372,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11304,15 +11420,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:11308: checking for gpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11311 "configure"
+echo "configure:11424: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11427 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11335,12 +11451,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:11339: checking for Gpm_Open in -lgpm" >&5
+echo "configure:11455: 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 11344 "configure"
+#line 11460 "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
@@ -11351,7 +11467,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:11355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11401,20 +11517,20 @@
 
 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
   != "no no no" && echo "checking for database support" 1>&6
-echo "configure:11405: checking for database support" >&5
+echo "configure:11521: checking for database support" >&5
 
 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
-echo "configure:11410: checking for ndbm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11413 "configure"
+echo "configure:11526: checking for ndbm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11529 "configure"
 #include "confdefs.h"
 #include <ndbm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11444,12 +11560,12 @@
 if test "$with_database_gdbm" != "no"; then
   
 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:11448: checking for dbm_open in -lgdbm" >&5
+echo "configure:11564: 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 11453 "configure"
+#line 11569 "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
@@ -11460,7 +11576,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:11464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11488,10 +11604,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:11492: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11495 "configure"
+echo "configure:11608: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11611 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -11514,7 +11630,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -11533,12 +11649,12 @@
 
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:11537: checking for dbm_open in -ldbm" >&5
+echo "configure:11653: 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 11542 "configure"
+#line 11658 "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
@@ -11549,7 +11665,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:11553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11590,10 +11706,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
-echo "configure:11594: checking for Berkeley db.h" >&5
+echo "configure:11710: checking for Berkeley db.h" >&5
   for path in "db/db.h" "db.h"; do
     cat > conftest.$ac_ext <<EOF
-#line 11597 "configure"
+#line 11713 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -11611,7 +11727,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -11627,9 +11743,9 @@
 
   if test "$with_database_berkdb" != "no"; then
     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
-echo "configure:11631: checking for Berkeley DB version" >&5
+echo "configure:11747: checking for Berkeley DB version" >&5
     cat > conftest.$ac_ext <<EOF
-#line 11633 "configure"
+#line 11749 "configure"
 #include "confdefs.h"
 #include <$db_h_path>
 #if DB_VERSION_MAJOR > 1
@@ -11648,10 +11764,10 @@
 rm -f conftest*
 
     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
-echo "configure:11652: checking for $dbfunc" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11655 "configure"
+echo "configure:11768: checking for $dbfunc" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11771 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $dbfunc(); below.  */
@@ -11674,7 +11790,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$dbfunc=yes"
 else
@@ -11693,12 +11809,12 @@
 
     
 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
-echo "configure:11697: checking for $dbfunc in -ldb" >&5
+echo "configure:11813: checking for $dbfunc in -ldb" >&5
 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldb "
 cat > conftest.$ac_ext <<EOF
-#line 11702 "configure"
+#line 11818 "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
@@ -11709,7 +11825,7 @@
 $dbfunc()
 ; return 0; }
 EOF
-if { (eval echo configure:11713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11773,12 +11889,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:11777: checking for SOCKSinit in -lsocks" >&5
+echo "configure:11893: 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 11782 "configure"
+#line 11898 "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
@@ -11789,7 +11905,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:11793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11844,19 +11960,19 @@
 
 if test "$with_modules" != "no"; then
   echo "checking for module support" 1>&6
-echo "configure:11848: checking for module support" >&5
+echo "configure:11964: checking for module support" >&5
 
     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:11852: checking for dlfcn.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 11855 "configure"
+echo "configure:11968: checking for dlfcn.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11971 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11874,12 +11990,12 @@
   
     
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:11878: checking for dlopen in -ldl" >&5
+echo "configure:11994: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldl "
 cat > conftest.$ac_ext <<EOF
-#line 11883 "configure"
+#line 11999 "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
@@ -11890,7 +12006,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:11894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11909,12 +12025,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
-echo "configure:11913: checking for dlopen in -lc" >&5
+echo "configure:12029: checking for dlopen in -lc" >&5
 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lc "
 cat > conftest.$ac_ext <<EOF
-#line 11918 "configure"
+#line 12034 "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
@@ -11925,7 +12041,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:11929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11964,12 +12080,12 @@
   else
     
 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:11968: checking for shl_load in -ldld" >&5
+echo "configure:12084: checking for shl_load in -ldld" >&5
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldld "
 cat > conftest.$ac_ext <<EOF
-#line 11973 "configure"
+#line 12089 "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
@@ -11980,7 +12096,7 @@
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:11984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12007,12 +12123,12 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
-echo "configure:12011: checking for dld_init in -ldld" >&5
+echo "configure:12127: checking for dld_init in -ldld" >&5
 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldld "
 cat > conftest.$ac_ext <<EOF
-#line 12016 "configure"
+#line 12132 "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
@@ -12023,7 +12139,7 @@
 dld_init()
 ; return 0; }
 EOF
-if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12068,7 +12184,7 @@
 xealias=$internal_configuration
 
 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
-echo "configure:12072: checking how to build dynamic libraries for ${xehost}" >&5
+echo "configure:12188: checking how to build dynamic libraries for ${xehost}" >&5
 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
 case "$xehost" in
 *-*-linux-gnu*) ;;
@@ -12096,9 +12212,9 @@
   XEGCC=yes
 else
   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:12100: checking checking whether we are using GNU C" >&5
+echo "configure:12216: checking checking whether we are using GNU C" >&5
   cat > conftest.$ac_ext <<EOF
-#line 12102 "configure"
+#line 12218 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -12120,7 +12236,7 @@
 fi
 
 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
-echo "configure:12124: checking how to produce PIC code" >&5
+echo "configure:12240: checking how to produce PIC code" >&5
 wl=
 
 can_build_shared=yes
@@ -12213,18 +12329,18 @@
   
   # Check to make sure the dll_cflags actually works.
   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
-echo "configure:12217: checking if PIC flag ${dll_cflags} really works" >&5
+echo "configure:12333: checking if PIC flag ${dll_cflags} really works" >&5
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $dll_cflags -DPIC"
   cat > conftest.$ac_ext <<EOF
-#line 12221 "configure"
+#line 12337 "configure"
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
-if { (eval echo configure:12228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
@@ -12255,7 +12371,7 @@
 xldf=
 xcldf=
 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
-echo "configure:12259: checking if C compiler can produce shared libraries" >&5
+echo "configure:12375: checking if C compiler can produce shared libraries" >&5
 if test "$XEGCC" = yes; then
   xcldf="-shared"
   xldf="-shared"
@@ -12306,14 +12422,14 @@
   xe_libs=
   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
   cat > conftest.$ac_ext <<EOF
-#line 12310 "configure"
+#line 12426 "configure"
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
-if { (eval echo configure:12317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cc_produces_so=yes
 else
@@ -12338,7 +12454,7 @@
   if test "$XEGCC" = yes; then
     # Check if gcc -print-prog-name=ld gives a path.
     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:12342: checking for ld used by GCC" >&5
+echo "configure:12458: checking for ld used by GCC" >&5
     ac_prog=`($CC -print-prog-name=ld) 2>&5`
     case "$ac_prog" in
     # Accept absolute paths.
@@ -12363,7 +12479,7 @@
     esac
   else
     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:12367: checking for GNU ld" >&5
+echo "configure:12483: checking for GNU ld" >&5
   fi
 
   if test -z "$LTLD"; then
@@ -12401,7 +12517,7 @@
 
 # Check to see if it really is or isn't GNU ld.
 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
-echo "configure:12405: checking if the linker is GNU ld" >&5
+echo "configure:12521: checking if the linker is GNU ld" >&5
 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
   xe_gnu_ld=yes
@@ -12428,7 +12544,7 @@
   # OK - only NOW do we futz about with ld.
   # See if the linker supports building shared libraries.
   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
-echo "configure:12432: checking whether the linker supports shared libraries" >&5
+echo "configure:12548: checking whether the linker supports shared libraries" >&5
   dll_ld=$CC
   dll_ldflags=$LDFLAGS
   ld_shlibs=yes
@@ -12643,10 +12759,10 @@
     for ac_func in dlerror _dlerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12647: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 12650 "configure"
+echo "configure:12763: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 12766 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -12669,7 +12785,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:12673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -12708,11 +12824,11 @@
 fi
 
 cat > conftest.$ac_ext <<EOF
-#line 12712 "configure"
+#line 12828 "configure"
 #include "confdefs.h"
 int main(int c,char *v[]){return 0;}
 EOF
-if { (eval echo configure:12716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:12832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
@@ -13378,10 +13494,11 @@
 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
+
 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
-test "$with_nas_sound" = yes && echo "  Compiling in network sound (NAS) support."
-test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
-test "$with_esd" = yes && echo "  Compiling in support for Enlightened Sound Daemon."
+test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
+test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
+test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
 
 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
--- a/configure.in	Mon Aug 13 11:29:10 2007 +0200
+++ b/configure.in	Mon Aug 13 11:29:58 2007 +0200
@@ -617,8 +617,8 @@
 	      nas )          with_nas_sound=yes ;;
 	      nonas )        with_nas_sound=no ;;
 
-	      esd )	     with_esd=yes ;;
-	      noesd )        with_esh=no ;;
+	      esd )	     with_esd_sound=yes ;;
+	      noesd )        with_esd_sound=no ;;
 
 	      * ) bogus_sound=yes ;;
 	    esac
@@ -627,11 +627,11 @@
 		types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
 		USAGE_ERROR(["Valid types for the \`--$optname' option are:
   $types.
-The default is native,esd."])
+The default is to autodetect all sound support."])
 	    elif test -n "$new_sdefault" ; then
 		with_native_sound=$new_sdefault
 		with_nas_sound=$new_sdefault
-		with_esd=$new_sdefault
+		with_esd_sound=$new_sdefault
 		new_sdefault=	# reset this
 	    fi
 	    sound_notfirst=true
@@ -2568,7 +2568,7 @@
   dnl if test "$with_tty" = "no" ; then
   dnl   AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.])
   dnl fi
-  for feature in tooltalk cde offix wmcommand xim xmu
+  for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound
   do
     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
        AC_MSG_WARN([--with-$feature ignored:  Not valid without X support])
@@ -3008,12 +3008,6 @@
   test "$with_dialogs"    != "no"      && XE_ADD_OBJS(dialog-x.o)
   test "$with_toolbars"   != "no"      && XE_ADD_OBJS(toolbar-x.o)
   test "$all_widgets" != "no no no no no" && XE_ADD_OBJS(gui-x.o)
-else
-  if test "$with_nas_sound" = "nas"; then
-    echo "Attempt to Build NAS sound without X"
-    echo "Please remove NAS configuration or build with X"
-    exit 1
-  fi
 fi
 
 dnl ----------------------
@@ -3470,35 +3464,50 @@
   test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS)
 fi
 
-if test "$with_nas_sound" = "yes"; then
-  AC_DEFINE(HAVE_NAS_SOUND)
-  XE_ADD_OBJS(nas.o)
-  XE_PREPEND(-laudio, libs_x)
-  dnl If the nas library does not contain the error jump point,
-  dnl then we force safer behavior.
-  AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)])
+dnl NAS Sound support
+if test "$with_nas_sound" != "no"; then
+  AC_CHECK_HEADER(audio/audiolib.h, [
+    AC_CHECK_LIB(audio, AuOpenServer, have_nas_sound=yes)])
+  if test "$have_nas_sound" = "yes"; then
+    with_nas_sound=yes
+    AC_DEFINE(HAVE_NAS_SOUND)
+    XE_ADD_OBJS(nas.o)
+    XE_PREPEND(-laudio, libs_x)
+    dnl If the nas library does not contain the error jump point,
+    dnl then we force safer behavior.
+    AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[old_nas=yes; AC_DEFINE(NAS_NO_ERROR_JUMP)])
+  else
+    test "$with_nas_sound" = "yes" && \
+      XE_DIE("Required NAS sound support cannot be provided.")
+    with_nas_sound=no
+  fi
 fi
 
-AC_CHECK_PROG(have_esd_config, esd-config, yes, no)
-if test -z "$with_esd"; then
-  with_esd=$have_esd_config
-fi
-
-if test "$with_esd" = "yes"; then
-  if test "$have_esd_config" = "no"; then
-    echo "*** esd-config was not found in your PATH. Disabling esd support."
-    with_esd=no
-  else
-    AC_DEFINE(HAVE_ESD_SOUND)
+dnl ESD Sound support
+if test "$with_esd_sound" != "no"; then
+  AC_CHECK_PROG(have_esd_config, esd-config, yes, no)
+  if test "$have_esd_config" = "yes"; then
+    save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
+    XE_APPEND(`esd-config --cflags`, c_switch_site)
+    XE_PREPEND(`esd-config --libs`, LIBS)
+    AC_CHECK_FUNC(esd_play_stream,
+      have_esd_sound=yes,
+      c_switch_site="$save_c_switch_site" LIBS="$save_LIBS")
+  fi
+
+  if test "$have_esd_sound" = "yes"; then
+    with_esd_sound=yes
     need_miscplay=yes
     XE_ADD_OBJS(esd.o)
-    XE_PREPEND(`esd-config --libs`, libs_x)
+    AC_DEFINE(HAVE_ESD_SOUND)
+  else
+    test "$with_esd_sound" = "yes" && \
+      XE_DIE("Required ESD sound support cannot be provided.")
+    with_esd_sound=no
   fi
 fi
 
-if test "$need_miscplay" = "yes"; then
-  XE_ADD_OBJS(miscplay.o)
-fi
+test "$need_miscplay" = "yes" && XE_ADD_OBJS(miscplay.o)
 
 dnl ---------------------
 dnl TTY-dependent options
@@ -4175,10 +4184,11 @@
 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
+
 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
-test "$with_nas_sound" = yes && echo "  Compiling in network sound (NAS) support."
-test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
-test "$with_esd" = yes && echo "  Compiling in support for Enlightened Sound Daemon."
+test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
+test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
+test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
 
 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
--- a/configure.usage	Mon Aug 13 11:29:10 2007 +0200
+++ b/configure.usage	Mon Aug 13 11:29:58 2007 +0200
@@ -124,8 +124,10 @@
 --with-sound=TYPE,[TYPE],... Compile with native sound support.
 			Valid types are `native', `nas' and `esd'.
 			Prefix a type with 'no' to disable.
-			The first option can be `none' or `all' to change
-			the default which is: native,esd
+			The first option can be `none' or `all'.
+			`none' is a synonym for `nonative,nonas,noesd'.
+			`all' is a synonym for native,nas,esd or `all'.
+			The default is to autodetect all sound support.
 --native-sound-lib=LIB  Native sound support library.  Needed on Suns
                         with --with-sound=both because both sound libraries
                         are called libaudio.
--- a/etc/NEWS	Mon Aug 13 11:29:10 2007 +0200
+++ b/etc/NEWS	Mon Aug 13 11:29:58 2007 +0200
@@ -187,9 +187,9 @@
 Olivier Galibert has written a portable dumper for XEmacs, based on
 initial work by Kyle Jones.  Normally, XEmacs C sources link into an
 executable called `temacs', which loads the Lisp code and "unexecs"
-into a proper `xemacs' executable.  The unexec() process is unreliable
-and makes XEmacs hard to port to new operating systems, or even to new
-releases of old systems.
+into a proper `xemacs' executable.  The unexec() process is hard to
+implement correctly and makes XEmacs very hard to port to new
+operating systems, or even to new releases of old systems.
 
 A portable dumper is a different approach to dumping: instead of
 dumping full-fledged executable, it only dumps out the initialized
@@ -248,8 +248,8 @@
 buttons, scrollbars, combo boxes, edit fields and progress gauges in a
 buffer.  As a side effect subwindow support now works once again.
 
-All of this is still very experimental.  This support is currently
-only available under MS-Windows.  (#### Is this true?)
+All of this is still very experimental.  This feature is currently
+more complete under MS-Windows.
 
 ** user-init-directory is now an absolute, unexpanded path.
 Previously, `user-init-directory' used to be relative to
--- a/lib-src/ChangeLog	Mon Aug 13 11:29:10 2007 +0200
+++ b/lib-src/ChangeLog	Mon Aug 13 11:29:58 2007 +0200
@@ -1,3 +1,17 @@
+1999-12-14  Martin Buchholz  <martin@xemacs.org>
+
+	* config.values.sh: Only update config.values.in if changed.
+	No external dependencies except perl.
+	No temporary files.
+
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.24 is released.
+
+1999-12-13  Martin Buchholz  <martin@xemacs.org>
+
+	* etags.c: Fix warning: `_GNU_SOURCE' redefined.
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.23 is released.
--- a/lib-src/etags.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/lib-src/etags.c	Mon Aug 13 11:29:58 2007 +0200
@@ -37,9 +37,6 @@
 #define	TRUE	1
 #define	FALSE	0
 
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE		/* enables some compiler checks on GNU */
-#endif
 #ifndef DEBUG
 # define DEBUG FALSE
 #endif
@@ -53,6 +50,10 @@
 # define LONG_OPTIONS		/* accept long options */
 #endif /* HAVE_CONFIG_H */
 
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1		/* enables some compiler checks on GNU */
+#endif
+
 #ifdef MSDOS
 # include <fcntl.h>
 # include <sys/param.h>
--- a/lisp/ChangeLog	Mon Aug 13 11:29:10 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 11:29:58 2007 +0200
@@ -1,3 +1,11 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.24 is released.
+
+1999-12-12  Gunnar Evermann  <ge204@eng.cam.ac.uk>
+
+	* about.el (about-hackers): Update my email address.
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.23 is released.
--- a/lisp/about.el	Mon Aug 13 11:29:10 2007 +0200
+++ b/lisp/about.el	Mon Aug 13 11:29:58 2007 +0200
@@ -1313,7 +1313,7 @@
        (print-short "Jonathan Edwards" "edwards@intranet.com")
        (print-short "Eric Eide" "eeide@asylum.cs.utah.edu")
        (print-short "EKR" "ekr@terisa.com")
-       (print-short "Gunnar Evermann" "Gunnar.Evermann@nats.informatik.uni-hamburg.de")
+       (print-short "Gunnar Evermann" "ge204@eng.cam.ac.uk")
        (print-short "Oscar Figueiredo" "Oscar.Figueiredo@di.epfl.ch")
        (print-short "David Fletcher" "frodo@tsunami.com")
        (print-short "Paul Flinders" "ptf@delcam.co.uk")
--- a/lisp/font-lock.el	Mon Aug 13 11:29:10 2007 +0200
+++ b/lisp/font-lock.el	Mon Aug 13 11:29:58 2007 +0200
@@ -611,7 +611,11 @@
   '((((class color) (background dark)) (:foreground "light coral"))
     (((class color) (background light)) (:foreground "green4"))
     (t (:bold t)))
-  "Font Lock mode face used to highlight documentation strings."
+  "Font Lock mode face used to highlight documentation strings.
+This is currently supported only in Lisp-like modes, which are those
+with \"lisp\" or \"scheme\" in their name.  You can explicitly make
+a mode Lisp-like by putting a non-nil `font-lock-lisp-like' property
+on the major mode's symbol."
   :group 'font-lock-faces)
 
 (defface font-lock-keyword-face
--- a/lwlib/ChangeLog	Mon Aug 13 11:29:10 2007 +0200
+++ b/lwlib/ChangeLog	Mon Aug 13 11:29:58 2007 +0200
@@ -1,3 +1,30 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.24 is released.
+
+1999-12-14  Andy Piper  <andy@xemacs.org>
+
+	* xlwtabs.c (TabsResize): reset need_layout so that we don't go
+	into infloop death.
+
+1999-12-14  Andy Piper  <andy@xemacs.org>
+
+	* xlwtabs.c (TabsSetValues): re-allocate GCs if font has changed.
+
+1999-12-13  Andy Piper  <andy@xemacs.org>
+
+	* xlwtabs.c (TabsResize): We need to expose the tabs after
+	clearing the window they are in.
+
+1999-12-08  Andy Piper  <andy@xemacs.org>
+
+	* xlwtabs.c: sync with Tabs 2.1.
+
+1999-12-07  Andy Piper  <andy@xemacs.org>
+
+	* lwlib-Xlw.c (lw_lucid_widget_p): make sure we pick up the
+	clip-window as well.
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.23 is released.
--- a/lwlib/lwlib-Xlw.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/lwlib/lwlib-Xlw.c	Mon Aug 13 11:29:58 2007 +0200
@@ -524,6 +524,10 @@
       XtClass (((CompositeWidget)widget)->composite.children [0])
 	== xlwMenuWidgetClass;
 #endif
+#ifdef HAVE_WIDGETS
+  if (the_class == emacsManagerWidgetClass)
+    return True;
+#endif
   return False;
 }
 
--- a/lwlib/xlwtabs.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/lwlib/xlwtabs.c	Mon Aug 13 11:29:58 2007 +0200
@@ -18,7 +18,7 @@
  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
- /* Synched up with: Tabs.c 1.23 */
+ /* Synched up with: Tabs.c 1.25 */
  
  /*
  * Tabs.c - Index Tabs composite widget
@@ -568,7 +568,11 @@
 			  cw-bw*2,ch-bw*2, bw) ;
 	    }
 	  if( XtIsRealized(w) )
-	    XClearWindow(XtDisplay((Widget)tw), XtWindow((Widget)tw)) ;
+	    {
+	      XClearWindow(XtDisplay((Widget)tw), XtWindow((Widget)tw)) ;
+	      tw->tabs.needs_layout = False ;
+	      XtClass(tw)->core_class.expose((Widget)tw,NULL,None) ;
+	    }
 	}
 
 	tw->tabs.needs_layout = False ;
@@ -629,7 +633,8 @@
 	/* TODO: if any color changes, need to recompute GCs and redraw */
 
 	if( tw->core.background_pixel != curtw->core.background_pixel ||
-	    tw->core.background_pixmap != curtw->core.background_pixmap )
+	    tw->core.background_pixmap != curtw->core.background_pixmap ||
+	    tw->tabs.font != curtw->tabs.font )
 	  if( XtIsRealized(new) )
 	  {
 	    TabsFreeGCs(tw) ;
@@ -644,7 +649,8 @@
 	 * Window system will handle the redraws.
 	 */
 
-	if( tw->tabs.topWidget != curtw->tabs.topWidget ) {
+	if( tw->tabs.topWidget != curtw->tabs.topWidget ) 
+	{
 	  if( XtIsRealized(tw->tabs.topWidget) )
 	  {
 	    Widget		w = tw->tabs.topWidget ;
@@ -661,9 +667,9 @@
 
 	    needRedraw = True ;
 	  }
-	  }
 	  else
 	    tw->tabs.needs_layout = True ;
+	}
 
 	return needRedraw ;
 }
@@ -827,7 +833,8 @@
 #ifdef	COMMENT
 	  MaxChild(tw, &cw, &ch) ;
 #endif	/* COMMENT */
-	  PreferredSize2(tw, tw->tabs.max_cw,tw->tabs.max_ch, &wid, &hgt) ;
+	  PreferredSize2(tw,
+	  	cw=tw->tabs.max_cw, ch=tw->tabs.max_ch, &wid, &hgt) ;
 
 	  /* Ask to be resized to accommodate. */
 
@@ -1082,9 +1089,9 @@
 	switch( params[0][0] ) {
 	  case 'u':		/* up */
 	  case 'U':
-	    if( idx == 0 )
-	      idx = nc ;
-	    newtop = tw->composite.children[idx-1] ;
+	    if( --idx < 0 )
+	      idx = nc-1 ;
+	    newtop = tw->composite.children[idx] ;
 	    break ;
 
 	  case 'd':		/* down */
@@ -1096,6 +1103,7 @@
 
 	  case 'h':
 	  case 'H':
+	  default:
 	      newtop = tw->composite.children[0] ;
 	      break ;
 
@@ -1141,6 +1149,7 @@
 
 	else
 	{
+	  /* find index of currently highlit child */
 	  for(idx=0, childP=tw->composite.children; idx < nc; ++idx, ++childP )
 	    if( tw->tabs.hilight == *childP )
 	      break ;
@@ -1148,9 +1157,9 @@
 	  switch( params[0][0] ) {
 	    case 'u':		/* up */
 	    case 'U':
-	      if( idx == 0 )
-		idx = nc ;
-	      newhl = tw->composite.children[idx-1] ;
+	      if( --idx < 0 )
+		idx = nc-1 ;
+	      newhl = tw->composite.children[idx] ;
 	      break ;
 
 	    case 'd':		/* down */
@@ -1169,6 +1178,10 @@
 	    case 'E':
 		newhl = tw->composite.children[nc-1] ;
 		break ;
+
+	    default:
+		newhl = tw->tabs.hilight ;
+		break ;
 	  }
 	}
 
--- a/man/ChangeLog	Mon Aug 13 11:29:10 2007 +0200
+++ b/man/ChangeLog	Mon Aug 13 11:29:58 2007 +0200
@@ -1,3 +1,13 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.24 is released.
+
+1999-12-07  Gunnar Evermann  <ge204@eng.cam.ac.uk>
+
+	* xemacs/startup.texi (Startup Paths): fix typo: EMACSPACKAGEPATH
+	instead of PACKAGEPATH 
+	From Marcus Harnisch <harnisch@mikrom.de>
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.23 is released.
--- a/man/xemacs/startup.texi	Mon Aug 13 11:29:10 2007 +0200
+++ b/man/xemacs/startup.texi	Mon Aug 13 11:29:58 2007 +0200
@@ -89,7 +89,7 @@
 respectively.  If two components are present, they locate the early and
 late hierarchies.  If only one component is present, it locates the late
 hierarchy.  At run time, the package path may also be specified via the
-@code{PACKAGEPATH} environment variable.
+@code{EMACSPACKAGEPATH} environment variable.
 
 An XEmacs package is laid out just like a normal installed XEmacs lisp
 directory.  It may have @file{lisp}, @file{etc}, @file{info}, and
--- a/nt/ChangeLog	Mon Aug 13 11:29:10 2007 +0200
+++ b/nt/ChangeLog	Mon Aug 13 11:29:58 2007 +0200
@@ -1,3 +1,7 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.24 is released.
+
 1999-11-28  Adrian Aichner  <aichner@ecf.teradyne.com>
 
 	* xemacs.mak (depend): Only update `depend' if there were changes.
--- a/nt/xemacs.mak	Mon Aug 13 11:29:10 2007 +0200
+++ b/nt/xemacs.mak	Mon Aug 13 11:29:58 2007 +0200
@@ -1229,7 +1229,9 @@
 	$(DEL) *.info*
 
 depend:
-	mkdepend -f xemacs.mak -p$(OUTDIR)\ -o.obj -w9999 -- $(TEMACS_CPP_FLAGS) --  $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) $(DOC_SRC7) $(DOC_SRC8) $(DOC_SRC9) $(LASTFILE_SRC)\lastfile.c $(LIB_SRC)\make-docfile.c $(LIB_SRC)\run.c
+	cd $(SRCDIR)
+	perl ./make-src-depend > depend.tmp
+	perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
 
 $(XEMACS)\Installation:
 	@type > $(XEMACS)\Installation <<
--- a/src/ChangeLog	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 11:29:58 2007 +0200
@@ -1,3 +1,32 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.24 is released.
+
+1999-12-13  Martin Buchholz  <martin@xemacs.org>
+
+	* sound.c (vars_of_sound): Provide esd-sound if HAVE_ESD_SOUND
+
+	* nas.c: Fix compiler warnings.  Ansify.  C++ compilation support.
+
+1999-12-13  Kazuyuki IENAGA <ienaga@jsys.co.jp>
+
+	* input-method-xlib.c: Make sure src/ does not use Athena, except
+	indirectly through lwlib.
+
+1999-12-13  Gunnar Evermann  <ge204@eng.cam.ac.uk>
+
+	* dbxrc (pobj):	Add opaque_ptr, remove opaque_list.
+
+1999-12-10  Shenghuo ZHU <zsh@cs.rochester.edu>
+
+	* file-coding.c (add_coding_system_to_list_mapper): 
+	- (coding-system-list) should list aliases correctly.
+
+1999-12-07  Andy Piper  <andy@xemacs.org>
+
+	* fileio.c (vars_of_fileio): directory separator fix from Mike Alexander.
+	* windowsnt.h (ditto):
+
 1999-11-27  Adrian Aichner  <aichner@ecf.teradyne.com>
 
 	* sysfile.h: Encapsulate `fstat' for Windows NT just like stat to
--- a/src/callproc.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/callproc.c	Mon Aug 13 11:29:58 2007 +0200
@@ -104,6 +104,9 @@
 {
   int fd = XINT (Fcar (fdpid));
   int pid = XINT (Fcdr (fdpid));
+#ifdef WINDOWSNT
+  HANDLE pHandle;
+#endif
 
   if (!call_process_exited &&
       EMACS_KILLPG (pid, SIGINT) == 0)
@@ -114,7 +117,17 @@
     /* #### "c-G" -- need non-consing Single-key-description */
     message ("Waiting for process to die...(type C-g again to kill it instantly)");
 
+#ifdef WINDOWSNT
+    pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
+    if (pHandle == NULL)
+      {
+	warn_when_safe (Qprocess, Qwarning,
+			"cannot open process (PID %d) for cleanup", pid);
+      }
+    wait_for_termination (pHandle);
+#else
     wait_for_termination (pid);
+#endif
 
     /* "Discard" the unwind protect.  */
     XCAR (fdpid) = Qnil;
@@ -170,6 +183,9 @@
   Lisp_Object infile, buffer, current_dir, display, path;
   int fd[2];
   int filefd;
+#ifdef WINDOWSNT
+  HANDLE pHandle;
+#endif
   int pid;
   char buf[16384];
   char *bufptr = buf;
@@ -359,6 +375,23 @@
 #ifdef WINDOWSNT
     pid = child_setup (filefd, fd1, fd_error, new_argv,
                        (char *) XSTRING_DATA (current_dir));
+    if (!INTP (buffer))
+      {
+	/* OpenProcess() as soon after child_setup as possible.  It's too
+	   late once the process terminated. */
+	pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
+#if 0
+	if (pHandle == NULL)
+	  {
+	    /* #### seems to cause crash in unbind_to(...) below. APA */
+	    warn_when_safe (Qprocess, Qwarning,
+			    "cannot open process to wait for");
+	  }
+#endif
+      }
+    /* Close STDERR into the parent process.  We no longer need it. */
+    if (fd_error >= 0)
+      close (fd_error);
 #else  /* not WINDOWSNT */
     pid = fork ();
 
@@ -394,12 +427,14 @@
   if (!NILP (fork_error))
     signal_error (Qfile_error, fork_error);
 
+#ifndef WINDOWSNT
   if (pid < 0)
     {
       if (fd[0] >= 0)
 	close (fd[0]);
       report_file_error ("Doing fork", Qnil);
     }
+#endif
 
   if (INTP (buffer))
     {
@@ -507,7 +542,11 @@
 
     QUIT;
     /* Wait for it to terminate, unless it already has.  */
+#ifdef WINDOWSNT
+    wait_for_termination (pHandle);
+#else
     wait_for_termination (pid);
+#endif
 
     /* Don't kill any children that the subprocess may have left behind
        when exiting.  */
--- a/src/dbxrc	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/dbxrc	Mon Aug 13 11:29:58 2007 +0200
@@ -279,8 +279,8 @@
     pstruct Lisp_Marker
   elif lrecord_type_p opaque; then
     pstruct Lisp_Opaque
-  elif lrecord_type_p opaque_list; then
-    pstruct Lisp_Opaque_List
+  elif lrecord_type_p opaque_ptr; then
+    pstruct Lisp_Opaque_Ptr
   elif lrecord_type_p popup_data; then
     pstruct popup_data
   elif lrecord_type_p process; then
--- a/src/elhash.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/elhash.c	Mon Aug 13 11:29:58 2007 +0200
@@ -931,7 +931,7 @@
 static void
 enlarge_hash_table (Lisp_Hash_Table *ht)
 {
-  size_t new_size = 
+  size_t new_size =
     hash_table_size ((size_t) ((double) ht->size * ht->rehash_size));
   resize_hash_table (ht, new_size);
 }
--- a/src/events.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/events.h	Mon Aug 13 11:29:58 2007 +0200
@@ -437,7 +437,7 @@
 
 struct Lisp_Timeout
 {
-  struct lcrecord_header header; 
+  struct lcrecord_header header;
   int id; /* Id we use to identify the timeout over its lifetime */
   int interval_id; /* Id for this particular interval; this may
 		      be different each time the timeout is
--- a/src/faces.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/faces.h	Mon Aug 13 11:29:58 2007 +0200
@@ -258,7 +258,7 @@
 
 extern Lisp_Object Qstrikethru, Vbuilt_in_face_specifiers, Vdefault_face;
 extern Lisp_Object Vleft_margin_face, Vpointer_face, Vright_margin_face;
-extern Lisp_Object Vtext_cursor_face, Vvertical_divider_face; 
+extern Lisp_Object Vtext_cursor_face, Vvertical_divider_face;
 extern Lisp_Object Vtoolbar_face, Vgui_element_face, Vwidget_face;
 
 void mark_all_faces_as_clean (void);
--- a/src/file-coding.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/file-coding.c	Mon Aug 13 11:29:58 2007 +0200
@@ -571,8 +571,7 @@
     (struct coding_system_list_closure *) coding_system_list_closure;
   Lisp_Object *coding_system_list = cscl->coding_system_list;
 
-  *coding_system_list = Fcons (XCODING_SYSTEM (value)->name,
-			       *coding_system_list);
+  *coding_system_list = Fcons (key, *coding_system_list);
   return 0;
 }
 
--- a/src/fileio.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/fileio.c	Mon Aug 13 11:29:58 2007 +0200
@@ -4333,5 +4333,9 @@
 on other platforms, it is initialized so that Lisp code can find out
 what the normal separator is.
 */ );
-  Vdirectory_sep_char = make_char ('/');
+#ifdef WINDOWSNT
+  Vdirectory_sep_char = make_char ('\\');
+#else
+   Vdirectory_sep_char = make_char ('/');
+#endif
 }
--- a/src/input-method-xlib.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/input-method-xlib.c	Mon Aug 13 11:29:58 2007 +0200
@@ -81,7 +81,6 @@
 
 #ifdef THIS_IS_X11R6
 #include <X11/IntrinsicP.h>
-#include <X11/Xaw/XawImP.h>
 #endif
 
 #ifndef XIM_XLIB
@@ -323,9 +322,6 @@
   static XtResource resources[] =
   {
     /*  name              class          represent'n   field    default value */
-#ifdef THIS_IS_X11R6
-    res(XtNinputMethod,   XtCInputMethod, XtRString,   inputmethod, (XtPointer) NULL),
-#endif
     res(XtNximStyles,     XtCXimStyles,  XtRXimStyles, styles,  (XtPointer) DefaultXIMStyles),
     res(XtNfontSet,       XtCFontSet,    XtRFontSet,   fontset, (XtPointer) XtDefaultFontSet),
     res(XtNximForeground, XtCForeground, XtRPixel,     fg,      (XtPointer) XtDefaultForeground),
--- a/src/lrecord.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/lrecord.h	Mon Aug 13 11:29:58 2007 +0200
@@ -237,7 +237,7 @@
 
     XD_LO_LINK
   Link in a linked list of objects of the same type.
-  
+
     XD_OPAQUE_PTR
   Pointer to undumpable data.  Must be NULL when dumping.
 
--- a/src/nas.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/nas.c	Mon Aug 13 11:29:58 2007 +0200
@@ -146,10 +146,18 @@
 #else
 	   char *server
 #endif
+	   );
+char *
+init_play (
+#ifdef XTOOLKIT
+	   Display *display
+#else
+	   char *server
+#endif
 	   )
 {
   char *err_message;
-  SIGTYPE (*old_sigpipe) ();
+  SIGTYPE (*old_sigpipe) (int);
 
 #ifdef XTOOLKIT
   char * server = DisplayString (display);
@@ -223,7 +231,7 @@
   return NULL;
 }
 
-void
+static void
 close_down_play (void)
 
 {
@@ -238,7 +246,7 @@
  \********************************************************************/
 
 static void
-doneCB (AuServer       *aud,
+doneCB (AuServer       *auserver,
 	AuEventHandlerRec *handler,
 	AuEvent        *ev,
 	AuPointer       data)
@@ -274,23 +282,23 @@
 
   if (list == NULL)
     {
-      unsigned char *my_buf;
+      AuPointer my_buf;
 
       if (buf==NULL)
 	{
-	  if ((my_buf=malloc (SoundNumBytes (s)))==NULL)
+	  if ((my_buf= (AuPointer) malloc (SoundNumBytes (s)))==NULL)
 	    {
 	      return;
 	    }
 
-	  if (SoundReadFile (my_buf, SoundNumBytes (s), s) != SoundNumBytes (s))
+	  if (SoundReadFile ((char *) my_buf, SoundNumBytes (s), s) != SoundNumBytes (s))
 	    {
 	      free (my_buf);
 	      return;
 	    }
 	}
       else
-	my_buf=buf;
+	my_buf = (AuPointer) buf;
 
       id = AuSoundCreateBucketFromData (aud, 
 					s,
@@ -322,6 +330,7 @@
 #endif /* CACHE_SOUNDS */
 
 
+void wait_for_sounds (void);
 void 
 wait_for_sounds (void)
 
@@ -335,11 +344,12 @@
     }
 }
 
+int play_sound_file (char *sound_file, int volume);
 int
 play_sound_file (char *sound_file,
 		 int volume)
 {
-  SIGTYPE (*old_sigpipe) ();
+  SIGTYPE (*old_sigpipe) (int);
 
 #ifdef ROBUST_PLAY
   old_sigpipe=signal (SIGPIPE, sigpipe_handle);
@@ -427,6 +437,7 @@
   return 1;
 }
 
+int play_sound_data (unsigned char *data, int length, int volume);
 int
 play_sound_data (unsigned char *data,
 		 int length, 
@@ -434,7 +445,7 @@
 {
   Sound s;
   int offset;
-  SIGTYPE (*old_sigpipe) ();
+  SIGTYPE (*old_sigpipe) (int);
 
 #if !defined (XTEVENTS)
   AuEvent         ev;
@@ -613,11 +624,11 @@
 /* Create a name from the sound. */
 
 static char *
-NameFromData (CONST unsigned char *buf,
+NameFromData (CONST char *buf,
 	      int len)
 
 {
-  unsigned char name[9];
+  char name[9];
   int i;
   char *s;
 
@@ -642,11 +653,11 @@
 
   if (i==8)
     {
-      strcpy (s=malloc (10), name);
+      strcpy (s = (char *) malloc (10), name);
     }
   else 
     {
-      strcpy (s=malloc (15), "short sound");
+      strcpy (s = (char *) malloc (15), "short sound");
     }
 
   return s;
@@ -729,15 +740,15 @@
 /* These functions here are for faking file I/O from buffer. */
 
 /* The "file" position */
-static int file_posn;
+static size_t file_posn;
 /* The length of the "file" */
-static int file_len;
+static size_t file_len;
 /* The actual "file" data. */
-CONST static char* file_data;
+static CONST void* file_data;
 
 /* Like fopen, but for a buffer in memory */
 static void
-dopen(CONST char* data, int length)
+dopen (CONST void* data, size_t length)
 {
    file_data = data;
    file_len = length;
@@ -746,15 +757,13 @@
 
 /* Like fread, but for a buffer in memory */
 static int
-dread(char* buf, int size, int nitems)
+dread (void* buf, size_t size, size_t nitems)
 {
-  int nread;
-
-  nread = size * nitems;
+  size_t nread = size * nitems;
   
   if (file_posn + nread <= file_len)
     {
-      memcpy(buf, file_data + file_posn, size * nitems);
+      memcpy(buf, (char *) file_data + file_posn, size * nitems);
       file_posn += nread;
       return nitems;
     }
@@ -766,19 +775,17 @@
 
 /* Like fgetc, but for a buffer in memory */
 static int
-dgetc()
+dgetc (void)
 {
-  int ch;
-  
   if (file_posn < file_len)
-    return file_data[file_posn++];
+    return ((char *)file_data)[file_posn++];
   else
     return -1;
 }
 
 /* Like fseek, but for a buffer in memory */
 static int
-dseek(long offset, int from)
+dseek (long offset, int from)
 {
   if (from == 0)
     file_posn = offset;
@@ -791,7 +798,7 @@
 }
 
 /* Like ftell, but for a buffer in memory */
-static int
+static long
 dtell()
 {
   return file_posn;
@@ -981,20 +988,20 @@
   if (!(s = (Sound) malloc (sizeof (SoundRec))))
     return NULL;
 
-  if ((s->formatInfo = SndOpenDataForReading (data, length)) != NULL)
+  if ((s->formatInfo = SndOpenDataForReading ((char *) data, length)) != NULL)
     {
-      if (!(SoundFileInfo[SoundFileFormatSnd].toSound) (s))
+      if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatSnd].toSound)) (s))
 	{
-	  SndCloseFile (s->formatInfo);
+	  SndCloseFile ((SndInfo *) (s->formatInfo));
 	  free (s);
 	  return NULL;
 	}
     }
-  else if ((s->formatInfo = WaveOpenDataForReading (data, length)) != NULL)
+  else if ((s->formatInfo = WaveOpenDataForReading ((char *) data, length)) != NULL)
     {
-      if (!(SoundFileInfo[SoundFileFormatWave].toSound) (s))
+      if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatWave].toSound)) (s))
 	{
-	  WaveCloseFile (s->formatInfo);
+	  WaveCloseFile ((WaveInfo *) (s->formatInfo));
 	  free (s);
 	  return NULL;
 	}
@@ -1002,4 +1009,3 @@
 
   return s;
 }
-
--- a/src/nt.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/nt.c	Mon Aug 13 11:29:58 2007 +0200
@@ -1315,6 +1315,40 @@
 
 #endif
 
+/* Since stat is encapsulated on Windows NT, we need to encapsulate
+   the equally broken fstat as well. */
+int
+fstat (int handle, struct stat *buffer)
+{
+  int ret;
+  BY_HANDLE_FILE_INFORMATION lpFileInfo;
+  /* Initialize values */
+  buffer->st_mode = 0;
+  buffer->st_size = 0;
+  buffer->st_dev = 0;
+  buffer->st_rdev = 0;
+  buffer->st_atime = 0;
+  buffer->st_ctime = 0;
+  buffer->st_mtime = 0;
+  buffer->st_nlink = 0;
+  ret = GetFileInformationByHandle((HANDLE) handle, &lpFileInfo);
+  if (!ret)
+    {
+      return -1;
+    }
+  else
+    {
+      buffer->st_mtime = convert_time (lpFileInfo.ftLastWriteTime);
+      buffer->st_atime = convert_time (lpFileInfo.ftLastAccessTime);
+      if (buffer->st_atime == 0) buffer->st_atime = buffer->st_mtime;
+      buffer->st_ctime = convert_time (lpFileInfo.ftCreationTime);
+      if (buffer->st_ctime == 0) buffer->st_ctime = buffer->st_mtime;
+      buffer->st_size = lpFileInfo.nFileSizeLow;
+      buffer->st_nlink = (short) lpFileInfo.nNumberOfLinks;
+      return 0;
+    }
+}
+
 /* MSVC stat function can't cope with UNC names and has other bugs, so
    replace it with our own.  This also allows us to calculate consistent
    inode values without hacks in the main Emacs code. */
--- a/src/ntproc.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/ntproc.c	Mon Aug 13 11:29:58 2007 +0200
@@ -445,16 +445,8 @@
   cp->procinfo.hThread=NULL;
   cp->procinfo.hProcess=NULL;
 
-  /* Hack for Windows 95, which assigns large (ie negative) pids */
-  if (cp->pid < 0)
-    cp->pid = -cp->pid;
+  /* pid must fit in a Lisp_Int */
 
-  /* pid must fit in a Lisp_Int */
-#ifdef USE_UNION_TYPE
-  cp->pid = (cp->pid & ((1U << VALBITS) - 1));
-#else
-  cp->pid = (cp->pid & VALMASK);
-#endif
 
   *pPid = cp->pid;
   
--- a/src/process-nt.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/process-nt.c	Mon Aug 13 11:29:58 2007 +0200
@@ -658,9 +658,7 @@
 	kick_status_notify ();
       }
 
-    /* Hack to support Windows 95 negative pids */
-    return ((int)pi.dwProcessId < 0
-	    ? -(int)pi.dwProcessId : (int)pi.dwProcessId);
+    return ((int)pi.dwProcessId);
   }
 }
 
@@ -719,7 +717,8 @@
 static void
 nt_send_process (Lisp_Object proc, struct lstream* lstream)
 {
-  struct Lisp_Process *p = XPROCESS (proc);
+  volatile Lisp_Object vol_proc = proc;
+  struct Lisp_Process *volatile p = XPROCESS (proc);
 
   /* use a reasonable-sized buffer (somewhere around the size of the
      stream buffer) so as to avoid inundating the stream with blocked
@@ -749,7 +748,7 @@
 	  p->core_dumped = 0;
 	  p->tick++;
 	  process_tick++;
-	  deactivate_process (proc);
+	  deactivate_process (*((Lisp_Object *) (&vol_proc)));
 	  error ("Broken pipe error sending to process %s; closed it",
 		 XSTRING_DATA (p->name));
 	}
@@ -890,6 +889,12 @@
 	  /* Ok, got an answer */
 	  if (WSAGETASYNCERROR(msg.lParam) == NO_ERROR)
 	    success = 1;
+	  else
+	    {
+	      warn_when_safe(Qstream, Qwarning,
+			     "cannot get IP address for host \"%s\"",
+			     XSTRING_DATA (host));
+	    }
 	  goto done;
 	}
       else if (msg.message == WM_TIMER && msg.wParam == SOCK_TIMER_ID)
@@ -980,7 +985,6 @@
   retval = connect (s, (struct sockaddr *) &address, sizeof (address));
   if (retval != NO_ERROR && WSAGetLastError() != WSAEWOULDBLOCK)
     goto connect_failed;
-
   /* Wait while connection is established */
   while (1)
     {
@@ -1023,6 +1027,10 @@
 
  connect_failed:  
   closesocket (s);
+  warn_when_safe(Qstream, Qwarning,
+		 "failure to open network stream to host \"%s\" for service \"%s\"",
+		 XSTRING_DATA (host),
+		 XSTRING_DATA (service));
   report_file_error ("connection failed", list2 (host, name));
 }
 
--- a/src/redisplay.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/redisplay.h	Mon Aug 13 11:29:58 2007 +0200
@@ -97,7 +97,7 @@
 
    #### This should really be made smaller.
 */
-   
+
 typedef struct rune rune;
 struct rune
 {
@@ -121,12 +121,12 @@
 				   this. */
                                 /* #### This isn't used as an rvalue anywhere!
                                    remove! */
-                                   
-  
+
+
   short xpos;			/* horizontal starting position in pixels */
   short width;			/* pixel width of rune */
-       
-  
+
+
   unsigned char cursor_type;	/* is this rune covered by the cursor? */
   unsigned char type;		/* type of rune object */
                                 /* We used to do bitfields here, but if I
--- a/src/s/windowsnt.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/s/windowsnt.h	Mon Aug 13 11:29:58 2007 +0200
@@ -125,7 +125,8 @@
 /* XEmacs file I/O for DOS text files requires FILE_CODING */
 #define FILE_CODING
 
-#define DIRECTORY_SEP '\\'
+extern Lisp_Object Vdirectory_sep_char;
+#define DIRECTORY_SEP ((char)XCHARVAL(Vdirectory_sep_char))
 
 /* Define this to be the separator between devices and paths */
 #define DEVICE_SEP ':'
--- a/src/sound.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/sound.c	Mon Aug 13 11:29:58 2007 +0200
@@ -562,6 +562,9 @@
 #ifdef HAVE_NAS_SOUND
   Fprovide (intern ("nas-sound"));
 #endif
+#ifdef HAVE_ESD_SOUND
+  Fprovide (intern ("esd-sound"));
+#endif
 
   DEFVAR_INT ("bell-volume", &bell_volume /*
 *How loud to be, from 0 to 100.
--- a/src/sysdep.c	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/sysdep.c	Mon Aug 13 11:29:58 2007 +0200
@@ -234,8 +234,11 @@
 #endif /* NO_SUBPROCESSES */
 
 
-void
-wait_for_termination (int pid)
+#ifdef WINDOWSNT
+void wait_for_termination (HANDLE pHandle)
+#else
+void wait_for_termination (int pid)
+#endif
 {
   /* #### With the new improved SIGCHLD handling stuff, there is much
      less danger of race conditions and some of the comments below
@@ -345,6 +348,49 @@
 
      Since implementations may add their own error indicators on top,
      we ignore it by default.  */
+#elif defined (WINDOWSNT)
+  int ret = 0, status = 0;
+  if (pHandle == NULL)
+    {
+      warn_when_safe (Qprocess, Qwarning, "Cannot wait for unknown process to terminate");
+      return;
+    }
+  do
+    {
+      QUIT;
+      ret = WaitForSingleObject(pHandle, 100);
+    }
+  while (ret == WAIT_TIMEOUT);
+  if (ret == WAIT_FAILED)
+    {
+      warn_when_safe (Qprocess, Qwarning, "waiting for process failed");
+    }
+  if (ret == WAIT_ABANDONED)
+    {
+      warn_when_safe (Qprocess, Qwarning,
+		      "process to wait for has been abandoned");
+    }
+  if (ret == WAIT_OBJECT_0)
+    {
+      ret = GetExitCodeProcess(pHandle, &status);
+      if (ret)
+	{
+	  synch_process_alive = 0;
+	  synch_process_retcode = status;
+	}
+      else
+	{
+	  /* GetExitCodeProcess() didn't return a valid exit status,
+	     nothing to do.  APA */
+	  warn_when_safe (Qprocess, Qwarning,
+			  "failure to obtain process exit value");
+	}
+    }
+  if (pHandle != NULL && !CloseHandle(pHandle)) 
+    {
+      warn_when_safe (Qprocess, Qwarning,
+		      "failure to close unknown process");
+    }
 #elif defined (EMACS_BLOCK_SIGNAL) && !defined (BROKEN_WAIT_FOR_SIGNAL) && defined (SIGCHLD)
   while (1)
     {
@@ -376,7 +422,7 @@
 	   Try defining BROKEN_WAIT_FOR_SIGNAL. */
 	EMACS_WAIT_FOR_SIGNAL (SIGCHLD);
     }
-#else /* not HAVE_WAITPID and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */
+#else /* not HAVE_WAITPID and not WINDOWSNT and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */
   /* This approach is kind of cheesy but is guaranteed(?!) to work
      for all systems. */
   while (1)
@@ -578,7 +624,11 @@
 static void
 sys_subshell (void)
 {
+#ifdef WINDOWSNT
+  HANDLE pid;
+#else
   int pid;
+#endif
   struct save_signal saved_handlers[5];
   Lisp_Object dir;
   unsigned char *str = 0;
@@ -617,7 +667,7 @@
  xyzzy:
 
 #ifdef WINDOWSNT
-  pid = -1;
+  pid = NULL;
 #else /* not WINDOWSNT */
 
   pid = fork ();
@@ -651,7 +701,7 @@
 #ifdef WINDOWSNT
       /* Waits for process completion */
       pid = _spawnlp (_P_WAIT, sh, sh, NULL);
-      if (pid == -1)
+      if (pid == NULL)
         write (1, "Can't execute subshell", 22);
 
 #else   /* not WINDOWSNT */
@@ -3038,6 +3088,15 @@
 #endif /* ENCAPSULATE_READLINK */
 
 
+#ifdef ENCAPSULATE_FSTAT
+int
+sys_fstat (int fd, struct stat *buf)
+{
+  return fstat (fd, buf);
+}
+#endif /* ENCAPSULATE_FSTAT */
+
+
 #ifdef ENCAPSULATE_STAT
 int
 sys_stat (CONST char *path, struct stat *buf)
--- a/src/sysdep.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/sysdep.h	Mon Aug 13 11:29:58 2007 +0200
@@ -44,7 +44,12 @@
 
 /* Wait for subprocess with process id `pid' to terminate and
    make sure it will get eliminated (not remain forever as a zombie) */
+#ifdef WINDOWSNT
+#include <windows.h>
+void wait_for_termination (HANDLE pid);
+#else
 void wait_for_termination (int pid);
+#endif
 
 /* flush any pending output
  * (may flush input as well; it does not matter the way we use it)
--- a/src/sysdir.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/sysdir.h	Mon Aug 13 11:29:58 2007 +0200
@@ -26,7 +26,7 @@
 
 #ifdef SYSV_SYSTEM_DIR
 # include <dirent.h>
-#elif defined (NONSYSTEM_DIR_LIBRARY) 
+#elif defined (NONSYSTEM_DIR_LIBRARY)
 # include "ndir.h"
 #elif defined (MSDOS)
 # include <dirent.h>
--- a/src/sysfile.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/sysfile.h	Mon Aug 13 11:29:58 2007 +0200
@@ -380,6 +380,18 @@
 # define sys_readlink readlink
 #endif
 
+#ifdef ENCAPSULATE_FSTAT
+int sys_fstat (int fd, struct stat *buf);
+#endif
+#if defined (ENCAPSULATE_FSTAT) && !defined (DONT_ENCAPSULATE)
+# undef fstat
+/* Need to use arguments to avoid messing with struct stat */
+# define fstat(fd, buf) sys_fstat (fd, buf)
+#endif
+#if !defined (ENCAPSULATE_FSTAT) && defined (DONT_ENCAPSULATE)
+# define sys_fstat fstat
+#endif
+
 #ifdef ENCAPSULATE_STAT
 int sys_stat (CONST char *path, struct stat *buf);
 #endif
--- a/src/systty.h	Mon Aug 13 11:29:10 2007 +0200
+++ b/src/systty.h	Mon Aug 13 11:29:58 2007 +0200
@@ -338,7 +338,7 @@
    if we're run from sh. */
 #  define EMACS_SET_PROCESS_GROUP(pg)
 #elif defined(__MINGW32__)
-#  define EMACS_SEPARATE_PROCESS_GROUP() 
+#  define EMACS_SEPARATE_PROCESS_GROUP()
 #else
 /* Under NeXTstep, a process group of 0 is not the same as specifying
    your own process ID, so we go ahead and specify it explicitly. */
--- a/tests/ChangeLog	Mon Aug 13 11:29:10 2007 +0200
+++ b/tests/ChangeLog	Mon Aug 13 11:29:58 2007 +0200
@@ -1,3 +1,7 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.24 is released.
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.23 is released.
--- a/version.sh	Mon Aug 13 11:29:10 2007 +0200
+++ b/version.sh	Mon Aug 13 11:29:58 2007 +0200
@@ -2,8 +2,8 @@
 emacs_is_beta=t
 emacs_major_version=21
 emacs_minor_version=2
-emacs_beta_version=23
-xemacs_codename="Hebe"
+emacs_beta_version=24
+xemacs_codename="Hecate"
 infodock_major_version=4
 infodock_minor_version=0
 infodock_build_version=8