http://ftp.x.org/contrib/applications/xscreensaver-3.08.tar.gz
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:32 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:32 +0000 (00:42 -0500)
-rw-r--r-- 1 zblaxell zblaxell 1025962 Mar 14  1999 xscreensaver-3.08.tar.gz
04d20491cbfcb787bf99e8101a0dca35f6906cda  xscreensaver-3.08.tar.gz

35 files changed:
Makefile.in
README
config.h.in
configure
configure.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/prefs.c
driver/prefs.h
driver/test-passwd.c
driver/timers.c
driver/xscreensaver-command.c
driver/xscreensaver-command.man
driver/xscreensaver-demo.man
driver/xscreensaver.c
driver/xscreensaver.h
driver/xscreensaver.man
hacks/Makefile.in
hacks/bsod.c
hacks/compile_axp.com
hacks/compile_decc.com
hacks/deluxe.c [new file with mode: 0644]
hacks/demon.c
hacks/glx/README
hacks/glx/lament.man
hacks/noseguy.c
hacks/penetrate.c [new file with mode: 0644]
hacks/swirl.c
hacks/t3d.c
hacks/t3d.man
setup.com
utils/version.h
utils/xshm.c
xscreensaver.lsm
xscreensaver.spec

index 0c7821b24365da3150a3d93bcda54a88df86a7f1..29d883d06c5c104248324bf8de0c28d3bd9168fd 100644 (file)
@@ -85,7 +85,7 @@ tar:
 # nearly impossible to customize --help blurb.  This horrid set of regexps
 # go through and clean up the help text, by inserting whitespace and ripping
 # out options we don't use.  Odds are good that this will fail with any version
-# of autoconf other than 2.12.
+# of autoconf other than the ones I've tried (2.12 and 2.13.)
 #
 configure::
        autoconf
diff --git a/README b/README
index e3183370819289c927de65e53faa4e04be32660d..8e9538000dada267ce67a2053bf3b6e9de77ca3c 100644 (file)
--- a/README
+++ b/README
@@ -77,6 +77,13 @@ http://www.jwz.org/xscreensaver/.
 
                               ============
 
+Changes since 3.07:   * Fixed some bugs in my port of `t3d'.
+                      * Added `penetrate' and `deluxe' hacks.
+                      * When linking against Motif 2.x, also link against XPM.
+                      * Added support for using /proc/interrupts for idle
+                        detection on Linux.  Now xscreensaver shouldn't kick
+                        in when the user is active on a non-X virtual console.
+                      * Upgraded to autoconf 2.13.
 Changes since 3.06:   * Configure tweaks (sometimes -lXmu wasn't getting linked
                         in properly; check for _Xsetlocale in -lXintl.)
                       * Portability fixes for sonar.c.
index ae3554ad9daa7a68d5dc13767a9d5d976e4306e3..e27f8d8c091de4a8dc7e05ead4fdb9ae964f321d 100644 (file)
  */
 #undef HAVE_DPMS_EXTENSION
 
+/*  Define this if you have a Linux-like /proc/interrupts file which can be
+ *  examined to determine when keyboard activity has occurred.
+ */
+#undef HAVE_PROC_INTERRUPTS
+
+
 
 /* *************************************************************************
                           CONFIGURING GRAPHICS TOOLKITS
index aaf89b17e2a8c7673c164df2087d2a56380dcd0b..e4f7748957a24c3aa12296aecea8f9290406f16a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
+# Generated automatically using autoconf version 2.13 
 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
 # This configure script is free software; the Free Software Foundation
@@ -57,6 +57,10 @@ ac_help="$ac_help
                           if possible (this is the default).
   --without-dpms-ext      Do not compile in support for this extension."
 ac_help="$ac_help
+  --with-proc-interrupts  Include support for consulting the /proc/interrupts
+                          file to notice keyboard activity, if possible.
+  --without-proc-interrupts   Do not compile in support for this method."
+ac_help="$ac_help
 
 X Client Toolkit options:
 
@@ -160,6 +164,7 @@ mandir='${prefix}/man'
 # Initialize some other variables.
 subdirs=
 MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
 # Maximum number of lines to put in a shell here document.
 ac_max_here_lines=12
 
@@ -434,7 +439,7 @@ EOF
     verbose=yes ;;
 
   -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
+    echo "configure generated by autoconf version 2.13"
     exit 0 ;;
 
   -with-* | --with-*)
@@ -604,9 +609,11 @@ ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
+ac_exeext=
+ac_objext=o
 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -646,26 +653,26 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
 
 # Make sure we can run config.sub.
-if $ac_config_sub sun4 >/dev/null 2>&1; then :
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:666: checking host system type" >&5
+echo "configure:673: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
 NONE)
   case $nonopt in
   NONE)
-    if host_alias=`$ac_config_guess`; then :
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
     fi ;;
   *) host_alias=$nonopt ;;
   esac ;;
 esac
 
-host=`$ac_config_sub $host_alias`
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
@@ -675,15 +682,16 @@ echo "$ac_t""$host" 1>&6
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:690: checking for $ac_word" >&5
+echo "configure:697: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="gcc"
@@ -704,16 +712,17 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:719: checking for $ac_word" >&5
+echo "configure:727: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
-  for ac_dir in $PATH; do
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@@ -748,25 +757,61 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:778: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
-cat > conftest.$ac_ext <<EOF
-#line 777 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 821 "configure"
 #include "confdefs.h"
+
 main(){return(0);}
 EOF
-if { (eval echo configure:781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -780,18 +825,24 @@ else
   ac_cv_prog_cc_works=no
 fi
 rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:801: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:806: checking whether we are using GNU C" >&5
+echo "configure:857: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -800,7 +851,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -811,11 +862,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-  ac_test_CFLAGS="${CFLAGS+set}"
-  ac_save_CFLAGS="$CFLAGS"
-  CFLAGS=
-  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:830: checking whether ${CC-cc} accepts -g" >&5
+else
+  GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:885: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -830,22 +885,26 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
     CFLAGS="-g -O2"
   else
-    CFLAGS="-O2"
+    CFLAGS="-g"
   fi
 else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
 fi
 
 
 if test -z "$GCC"; then
   echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
-echo "configure:860: checking how to request ANSI compilation" >&5
+echo "configure:919: checking how to request ANSI compilation" >&5
   case "$host" in
     *-hpux*)
       echo "$ac_t""HPUX: adding -Ae" 1>&6
@@ -869,16 +928,16 @@ fi
 
 
 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
-echo "configure:884: checking whether the compiler works on ANSI C" >&5
+echo "configure:943: checking whether the compiler works on ANSI C" >&5
 if test "$cross_compiling" = yes; then
   { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 889 "configure"
+#line 948 "configure"
 #include "confdefs.h"
  main(int ac, char **av) { return 0; } 
 EOF
-if { (eval echo configure:893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   echo "$ac_t""yes" 1>&6
 else
@@ -927,7 +986,7 @@ esac
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:942: checking how to run the C preprocessor" >&5
+echo "configure:1001: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -942,14 +1001,14 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 957 "configure"
+#line 1016 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 else
@@ -959,14 +1018,31 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 974 "configure"
+#line 1033 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 1050 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 else
@@ -978,6 +1054,8 @@ else
 fi
 rm -f conftest*
 fi
+rm -f conftest*
+fi
 rm -f conftest*
   ac_cv_prog_CPP="$CPP"
 fi
@@ -994,28 +1072,30 @@ echo "$ac_t""$CPP" 1>&6
 # SunOS /usr/etc/install
 # IRIX /sbin/install
 # AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1013: checking for a BSD compatible install" >&5
+echo "configure:1092: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS=":"
   for ac_dir in $PATH; do
     # Account for people who put trailing slashes in PATH elements.
     case "$ac_dir/" in
     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
     *)
       # OSF1 and SCO ODT 3.0 have their own names for install.
-      for ac_prog in ginstall installbsd scoinst install; do
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
         if test -f $ac_dir/$ac_prog; then
          if test $ac_prog = install &&
             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
            # AIX install.  It has an incompatible calling convention.
-           # OSF/1 installbsd also uses dspmsg, but is usable.
            :
          else
            ac_cv_path_install="$ac_dir/$ac_prog -c"
@@ -1045,11 +1125,13 @@ echo "$ac_t""$INSTALL" 1>&6
 # It thinks the first close brace ends the variable substitution.
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 INSTALL_DIRS='${INSTALL} -d'
    echo $ac_n "checking whether \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1064: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
+echo "configure:1146: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
    rm -rf conftestdir
    if mkdir conftestdir; then
       cd conftestdir >&-
@@ -1060,7 +1142,7 @@ echo "configure:1064: checking whether \"\${INSTALL} -d\" creates intermediate d
       else
         echo "$ac_t""no" 1>&6
         echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1075: checking whether \"mkdir -p\" creates intermediate directories" >&5
+echo "configure:1157: checking whether \"mkdir -p\" creates intermediate directories" >&5
         rm -rf dir1
         mkdir -p dir1/dir2 >&- 2>&-
         if test -d dir1/dir2/. ; then
@@ -1075,7 +1157,7 @@ echo "configure:1075: checking whether \"mkdir -p\" creates intermediate directo
    fi
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1090: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1172: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1103,12 +1185,12 @@ fi
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1118: checking for working const" >&5
+echo "configure:1200: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1123 "configure"
+#line 1205 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1157,7 +1239,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1178,21 +1260,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1193: checking for inline" >&5
+echo "configure:1275: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1200 "configure"
+#line 1282 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1219,12 +1301,12 @@ esac
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1234: checking for ANSI C header files" >&5
+echo "configure:1316: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1239 "configure"
+#line 1321 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1232,8 +1314,8 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1329: \"$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*
   ac_cv_header_stdc=yes
@@ -1249,7 +1331,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1264 "configure"
+#line 1346 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1267,7 +1349,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1282 "configure"
+#line 1364 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1288,7 +1370,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1303 "configure"
+#line 1385 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1299,7 +1381,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1323,12 +1405,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1338: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1420: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1343 "configure"
+#line 1425 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1337,7 +1419,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1358,12 +1440,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1373: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1455: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1378 "configure"
+#line 1460 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1379,7 +1461,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1404,12 +1486,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1419: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1501: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1424 "configure"
+#line 1506 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1417,7 +1499,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1442,7 +1524,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1457: checking for opendir in -ldir" >&5
+echo "configure:1539: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1450,7 +1532,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1465 "configure"
+#line 1547 "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
@@ -1461,7 +1543,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1558: \"$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
@@ -1483,7 +1565,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1498: checking for opendir in -lx" >&5
+echo "configure:1580: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1491,7 +1573,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1506 "configure"
+#line 1588 "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
@@ -1502,7 +1584,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1599: \"$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
@@ -1526,12 +1608,12 @@ fi
 
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1541: checking for mode_t" >&5
+echo "configure:1623: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1546 "configure"
+#line 1628 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1540,7 +1622,7 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_mode_t=yes
 else
@@ -1559,12 +1641,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1574: checking for pid_t" >&5
+echo "configure:1656: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1579 "configure"
+#line 1661 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1573,7 +1655,7 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_pid_t=yes
 else
@@ -1592,12 +1674,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1607: checking for size_t" >&5
+echo "configure:1689: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1612 "configure"
+#line 1694 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1606,7 +1688,7 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_size_t=yes
 else
@@ -1625,12 +1707,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1640: checking return type of signal handlers" >&5
+echo "configure:1722: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1645 "configure"
+#line 1727 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1647,7 +1729,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1667,12 +1749,12 @@ EOF
 
 
 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:1682: checking how to call gettimeofday" >&5
+echo "configure:1764: checking how to call gettimeofday" >&5
 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1687 "configure"
+#line 1769 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                  #include <sys/time.h>
@@ -1681,7 +1763,7 @@ struct timeval tv; struct timezone tzp;
                  gettimeofday(&tv, &tzp);
 ; return 0; }
 EOF
-if { (eval echo configure:1696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=2
 else
@@ -1689,7 +1771,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 1704 "configure"
+#line 1786 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                  #include <sys/time.h>
@@ -1697,7 +1779,7 @@ int main() {
 struct timeval tv; gettimeofday(&tv);
 ; return 0; }
 EOF
-if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_gettimeofday_args=1
 else
@@ -1737,12 +1819,12 @@ fi
 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1752: checking for $ac_func" >&5
+echo "configure:1834: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1757 "configure"
+#line 1839 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1765,7 +1847,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1862: \"$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
@@ -1792,12 +1874,12 @@ done
 for ac_func in sigaction syslog
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1807: checking for $ac_func" >&5
+echo "configure:1889: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1812 "configure"
+#line 1894 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1820,7 +1902,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1917: \"$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
@@ -1849,18 +1931,18 @@ for ac_hdr in unistd.h crypt.h sys/select.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1864: checking for $ac_hdr" >&5
+echo "configure:1946: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1869 "configure"
+#line 1951 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1956: \"$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"
@@ -1921,7 +2003,7 @@ HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1936: checking for X" >&5
+echo "configure:2018: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -1983,13 +2065,13 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 1998 "configure"
+#line 2080 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:2085: \"$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*
   # We can compile using X headers with no special include directory.
@@ -2057,14 +2139,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2072 "configure"
+#line 2154 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -2170,17 +2252,17 @@ else
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:2185: checking whether -R must be followed by a space" >&5
+echo "configure:2267: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 2188 "configure"
+#line 2270 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -2196,14 +2278,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 2211 "configure"
+#line 2293 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -2235,7 +2317,7 @@ rm -f conftest*
     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:2250: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2332: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2243,7 +2325,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2258 "configure"
+#line 2340 "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
@@ -2254,7 +2336,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2351: \"$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
@@ -2276,7 +2358,7 @@ fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:2291: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2373: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2284,7 +2366,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2299 "configure"
+#line 2381 "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
@@ -2295,7 +2377,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2392: \"$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
@@ -2324,12 +2406,12 @@ fi
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2339: checking for gethostbyname" >&5
+echo "configure:2421: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2344 "configure"
+#line 2426 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2352,7 +2434,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -2373,7 +2455,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2388: checking for gethostbyname in -lnsl" >&5
+echo "configure:2470: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2381,7 +2463,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2396 "configure"
+#line 2478 "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
@@ -2392,7 +2474,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2489: \"$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
@@ -2422,12 +2504,12 @@ fi
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:2437: checking for connect" >&5
+echo "configure:2519: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2442 "configure"
+#line 2524 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -2450,7 +2532,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -2471,7 +2553,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2486: checking for connect in -lsocket" >&5
+echo "configure:2568: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2479,7 +2561,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2494 "configure"
+#line 2576 "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
@@ -2490,7 +2572,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2587: \"$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
@@ -2514,12 +2596,12 @@ fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:2529: checking for remove" >&5
+echo "configure:2611: checking for remove" >&5
 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2534 "configure"
+#line 2616 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -2542,7 +2624,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -2563,7 +2645,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:2578: checking for remove in -lposix" >&5
+echo "configure:2660: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2571,7 +2653,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2586 "configure"
+#line 2668 "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
@@ -2582,7 +2664,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2679: \"$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
@@ -2606,12 +2688,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:2621: checking for shmat" >&5
+echo "configure:2703: checking for shmat" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2626 "configure"
+#line 2708 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -2634,7 +2716,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -2655,7 +2737,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2670: checking for shmat in -lipc" >&5
+echo "configure:2752: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2663,7 +2745,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2678 "configure"
+#line 2760 "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
@@ -2674,7 +2756,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2771: \"$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
@@ -2707,15 +2789,15 @@ fi
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:2722: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2804: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lICE  $LIBS"
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2730 "configure"
+#line 2812 "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
@@ -2726,7 +2808,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2823: \"$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
@@ -2751,6 +2833,11 @@ fi
 fi
 
 
+if test "$have_x" != yes; then
+  { echo "configure: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." 1>&2; exit 1; }
+fi
+
+
 # Try and find the app-defaults directory.
 # It sucks that autoconf doesn't do this already...
 #
@@ -2763,7 +2850,7 @@ fi
 
 
     echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
-echo "configure:2778: checking for X app-defaults directory" >&5
+echo "configure:2865: checking for X app-defaults directory" >&5
 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2910,7 +2997,7 @@ APPDEFAULTS=$ac_x_app_defaults
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 2925 "configure"
+#line 3012 "configure"
 #include "confdefs.h"
 #include <X11/XHPlib.h>
 EOF
@@ -2931,7 +3018,7 @@ rm -f conftest*
 # Check for the availability of the XPointer typedef, and define it otherwise.
 #
 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
-echo "configure:2946: checking for XPointer" >&5
+echo "configure:3033: checking for XPointer" >&5
 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2942,14 +3029,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 2957 "configure"
+#line 3044 "configure"
 #include "confdefs.h"
 #include <X11/Xlib.h>
 int main() {
 XPointer foo = (XPointer) 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_xpointer=yes
 else
@@ -3083,7 +3170,7 @@ case "$host" in
 
       # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
       echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
-echo "configure:3098: checking for regcmp in -lgen" >&5
+echo "configure:3185: checking for regcmp in -lgen" >&5
 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3091,7 +3178,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3106 "configure"
+#line 3193 "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
@@ -3102,7 +3189,7 @@ int main() {
 regcmp()
 ; return 0; }
 EOF
-if { (eval echo configure:3117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3204: \"$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
@@ -3139,18 +3226,18 @@ have_xmu=no
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
-echo "configure:3154: checking for X11/Xmu/Error.h" >&5
+echo "configure:3241: checking for X11/Xmu/Error.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3159 "configure"
+#line 3246 "configure"
 #include "confdefs.h"
 #include <X11/Xmu/Error.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3251: \"$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"
@@ -3194,7 +3281,7 @@ if test "$have_xmu" = yes ; then
   case "$host" in
     *-sunos4*)
     echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
-echo "configure:3209: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:3296: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3207,14 +3294,14 @@ else
                    # with X libraries because we know it's SunOS.
                    LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
                    cat > conftest.$ac_ext <<EOF
-#line 3222 "configure"
+#line 3309 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_sunos_xmu_bug=no
 else
@@ -3230,21 +3317,21 @@ fi
 echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
     if test "$ac_cv_sunos_xmu_bug" = yes ; then
       echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
-echo "configure:3245: checking whether the compiler understands -static" >&5
+echo "configure:3332: checking whether the compiler understands -static" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LDFLAGS="$LDFLAGS"
                      LDFLAGS="$LDFLAGS -static"
                      cat > conftest.$ac_ext <<EOF
-#line 3252 "configure"
+#line 3339 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_static=yes
 else
@@ -3289,7 +3376,7 @@ fi
 
     /*)
      echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
-echo "configure:3304: checking for SGI SCREEN_SAVER headers" >&5
+echo "configure:3391: checking for SGI SCREEN_SAVER headers" >&5
      d=$with_sgi/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3299,7 +3386,7 @@ echo "configure:3304: checking for SGI SCREEN_SAVER headers" >&5
      fi
 
      echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
-echo "configure:3314: checking for SGI SCREEN_SAVER libs" >&5
+echo "configure:3401: checking for SGI SCREEN_SAVER libs" >&5
      d=$with_sgi/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3337,18 +3424,18 @@ if test "$with_sgi" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
-echo "configure:3352: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3439: checking for X11/extensions/XScreenSaver.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3357 "configure"
+#line 3444 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XScreenSaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3449: \"$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"
@@ -3400,7 +3487,7 @@ fi
 
     /*)
      echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
-echo "configure:3415: checking for MIT-SCREEN-SAVER headers" >&5
+echo "configure:3502: checking for MIT-SCREEN-SAVER headers" >&5
      d=$with_mit/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3410,7 +3497,7 @@ echo "configure:3415: checking for MIT-SCREEN-SAVER headers" >&5
      fi
 
      echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
-echo "configure:3425: checking for MIT-SCREEN-SAVER libs" >&5
+echo "configure:3512: checking for MIT-SCREEN-SAVER libs" >&5
      d=$with_mit/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3449,18 +3536,18 @@ if test "$have_sgi" != yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
-echo "configure:3464: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3551: checking for X11/extensions/scrnsaver.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3469 "configure"
+#line 3556 "configure"
 #include "confdefs.h"
 #include <X11/extensions/scrnsaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3561: \"$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"
@@ -3503,7 +3590,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3518: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3605: checking for XScreenSaverRegister in -lXext" >&5
 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3511,7 +3598,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3526 "configure"
+#line 3613 "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
@@ -3522,7 +3609,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3624: \"$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
@@ -3573,7 +3660,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:3588: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:3675: checking for XScreenSaverRegister in -lXExExt" >&5
 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3581,7 +3668,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3596 "configure"
+#line 3683 "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
@@ -3592,7 +3679,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3694: \"$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
@@ -3638,7 +3725,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:3653: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:3740: checking for XScreenSaverRegister in -lXss" >&5
 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3646,7 +3733,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXss -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3661 "configure"
+#line 3748 "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
@@ -3657,7 +3744,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3759: \"$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
@@ -3717,7 +3804,7 @@ fi
 
     /*)
      echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
-echo "configure:3732: checking for XIDLE headers" >&5
+echo "configure:3819: checking for XIDLE headers" >&5
      d=$with_xidle/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3727,7 +3814,7 @@ echo "configure:3732: checking for XIDLE headers" >&5
      fi
 
      echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
-echo "configure:3742: checking for XIDLE libs" >&5
+echo "configure:3829: checking for XIDLE libs" >&5
      d=$with_xidle/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3765,18 +3852,18 @@ if test "$with_xidle" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
-echo "configure:3780: checking for X11/extensions/xidle.h" >&5
+echo "configure:3867: checking for X11/extensions/xidle.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3785 "configure"
+#line 3872 "configure"
 #include "confdefs.h"
 #include <X11/extensions/xidle.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3877: \"$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"
@@ -3827,7 +3914,7 @@ fi
 
     /*)
      echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
-echo "configure:3842: checking for XSHM headers" >&5
+echo "configure:3929: checking for XSHM headers" >&5
      d=$with_xshm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -3837,7 +3924,7 @@ echo "configure:3842: checking for XSHM headers" >&5
      fi
 
      echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
-echo "configure:3852: checking for XSHM libs" >&5
+echo "configure:3939: checking for XSHM libs" >&5
      d=$with_xshm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -3877,18 +3964,18 @@ if test "$with_xshm" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
-echo "configure:3892: checking for X11/extensions/XShm.h" >&5
+echo "configure:3979: checking for X11/extensions/XShm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3897 "configure"
+#line 3984 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XShm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3989: \"$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"
@@ -3921,18 +4008,18 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
-echo "configure:3936: checking for sys/ipc.h" >&5
+echo "configure:4023: checking for sys/ipc.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3941 "configure"
+#line 4028 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4033: \"$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"
@@ -3966,18 +4053,18 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
-echo "configure:3981: checking for sys/shm.h" >&5
+echo "configure:4068: checking for sys/shm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3986 "configure"
+#line 4073 "configure"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4078: \"$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"
@@ -4025,7 +4112,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
-echo "configure:4040: checking for XShmQueryExtension in -lXextSam" >&5
+echo "configure:4127: checking for XShmQueryExtension in -lXextSam" >&5
 ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4033,7 +4120,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4048 "configure"
+#line 4135 "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
@@ -4044,7 +4131,7 @@ int main() {
 XShmQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4146: \"$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
@@ -4103,7 +4190,7 @@ fi
 
     /*)
      echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
-echo "configure:4118: checking for SGI-VIDEO-CONTROL headers" >&5
+echo "configure:4205: checking for SGI-VIDEO-CONTROL headers" >&5
      d=$with_sgivc/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4113,7 +4200,7 @@ echo "configure:4118: checking for SGI-VIDEO-CONTROL headers" >&5
      fi
 
      echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
-echo "configure:4128: checking for SGI-VIDEO-CONTROL libs" >&5
+echo "configure:4215: checking for SGI-VIDEO-CONTROL libs" >&5
      d=$with_sgivc/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4153,18 +4240,18 @@ if test "$with_sgivc" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
-echo "configure:4168: checking for X11/extensions/XSGIvc.h" >&5
+echo "configure:4255: checking for X11/extensions/XSGIvc.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4173 "configure"
+#line 4260 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XSGIvc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4265: \"$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"
@@ -4206,7 +4293,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
-echo "configure:4221: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+echo "configure:4308: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4214,7 +4301,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXsgivc -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4229 "configure"
+#line 4316 "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
@@ -4225,7 +4312,7 @@ int main() {
 XSGIvcQueryGammaMap()
 ; return 0; }
 EOF
-if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4327: \"$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
@@ -4283,7 +4370,7 @@ fi
 
     /*)
      echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
-echo "configure:4298: checking for DPMS headers" >&5
+echo "configure:4385: checking for DPMS headers" >&5
      d=$with_dpms/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4293,7 +4380,7 @@ echo "configure:4298: checking for DPMS headers" >&5
      fi
 
      echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
-echo "configure:4308: checking for DPMS libs" >&5
+echo "configure:4395: checking for DPMS libs" >&5
      d=$with_dpms/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4333,18 +4420,18 @@ if test "$with_dpms" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
-echo "configure:4348: checking for X11/extensions/dpms.h" >&5
+echo "configure:4435: checking for X11/extensions/dpms.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4353 "configure"
+#line 4440 "configure"
 #include "confdefs.h"
 #include <X11/extensions/dpms.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4445: \"$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"
@@ -4386,7 +4473,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
-echo "configure:4401: checking for DPMSInfo in -lXdpms" >&5
+echo "configure:4488: checking for DPMSInfo in -lXdpms" >&5
 ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4394,7 +4481,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXdpms -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4409 "configure"
+#line 4496 "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
@@ -4405,7 +4492,7 @@ int main() {
 DPMSInfo()
 ; return 0; }
 EOF
-if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4507: \"$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
@@ -4443,6 +4530,50 @@ elif test "$with_dpms" != no; then
 fi
 
 
+# Check for /proc/interrupts
+#
+have_proc_interrupts=no
+with_proc_interrupts_req=unspecified
+# Check whether --with-proc-interrupts or --without-proc-interrupts was given.
+if test "${with_proc_interrupts+set}" = set; then
+  withval="$with_proc_interrupts"
+  with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
+else
+  with_proc_interrupts=yes
+fi
+
+
+if test "$with_proc_interrupts" = yes; then
+
+   echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
+echo "configure:4561: checking whether /proc/interrupts contains keyboard data" >&5
+   if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_have_proc_interrupts=no
+     if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
+       ac_cv_have_proc_interrupts=yes
+     fi
+    
+fi
+
+   have_proc_interrupts=$ac_cv_have_proc_interrupts
+
+  echo "$ac_t""$have_proc_interrupts" 1>&6
+
+  if test "$have_proc_interrupts" = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_PROC_INTERRUPTS 1
+EOF
+
+  fi
+
+elif test "$with_proc_interrupts" != no; then
+  echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
+  exit 1
+fi
+
+
 
 # Check for Motif and Athena --with and --without arguments.
 #
@@ -4468,7 +4599,7 @@ fi
 
     /*)
      echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
-echo "configure:4483: checking for Motif headers" >&5
+echo "configure:4614: checking for Motif headers" >&5
      d=$with_motif/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4478,7 +4609,7 @@ echo "configure:4483: checking for Motif headers" >&5
      fi
 
      echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
-echo "configure:4493: checking for Motif libs" >&5
+echo "configure:4624: checking for Motif libs" >&5
      d=$with_motif/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4523,7 +4654,7 @@ fi
 
     /*)
      echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
-echo "configure:4538: checking for Athena headers" >&5
+echo "configure:4669: checking for Athena headers" >&5
      d=$with_athena/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -4533,7 +4664,7 @@ echo "configure:4538: checking for Athena headers" >&5
      fi
 
      echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
-echo "configure:4548: checking for Athena libs" >&5
+echo "configure:4679: checking for Athena libs" >&5
      d=$with_athena/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -4596,18 +4727,18 @@ check_motif() {
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:4611: checking for Xm/Xm.h" >&5
+echo "configure:4742: checking for Xm/Xm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4616 "configure"
+#line 4747 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4752: \"$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"
@@ -4646,18 +4777,18 @@ check_athena() {
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
-echo "configure:4661: checking for X11/Xaw/Dialog.h" >&5
+echo "configure:4792: checking for X11/Xaw/Dialog.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4666 "configure"
+#line 4797 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Dialog.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4802: \"$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"
@@ -4696,7 +4827,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
-echo "configure:4711: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
+echo "configure:4842: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
 ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4704,7 +4835,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4719 "configure"
+#line 4850 "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
@@ -4715,7 +4846,7 @@ int main() {
 Xaw3dComputeTopShadowRGB()
 ; return 0; }
 EOF
-if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4861: \"$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
@@ -4792,7 +4923,7 @@ fi
 # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
 if test "$have_athena" = yes ; then
   echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
-echo "configure:4807: checking for XawViewportSetCoordinates in Viewport.h" >&5
+echo "configure:4938: checking for XawViewportSetCoordinates in Viewport.h" >&5
 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4804,7 +4935,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4819 "configure"
+#line 4950 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Viewport.h>
 EOF
@@ -4833,7 +4964,7 @@ fi
 have_lesstif=no
 if test "$have_motif" = yes ; then
   echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
-echo "configure:4848: checking whether Motif is really LessTif" >&5
+echo "configure:4979: checking whether Motif is really LessTif" >&5
 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4844,14 +4975,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4859 "configure"
+#line 4990 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 int main() {
 long vers = LesstifVersion;
 ; return 0; }
 EOF
-if { (eval echo configure:4866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_lesstif=yes
 else
@@ -4879,7 +5010,7 @@ if test "$have_lesstif" = yes ; then
   ltv=unknown
   echo unknown > conftest-lt
   echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
-echo "configure:4894: checking LessTif version number" >&5
+echo "configure:5025: checking LessTif version number" >&5
 if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4894,7 +5025,7 @@ else
                     ac_cv_lesstif_version_string=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 4909 "configure"
+#line 5040 "configure"
 #include "confdefs.h"
 #include <stdio.h>
                     #include <Xm/Xm.h>
@@ -4907,7 +5038,7 @@ else
                       exit(0);
                     }
 EOF
-if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ltv=`cat conftest-lt`
                     ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
@@ -4933,6 +5064,87 @@ echo "$ac_t""$ac_cv_lesstif_version_string" 1>&6
 fi
 
 
+if test "$have_motif" = yes ; then
+  mtv=unknown
+  echo unknown > conftest-mt
+  echo $ac_n "checking Motif version number""... $ac_c" 1>&6
+echo "configure:5083: checking Motif version number" >&5
+if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  if test "$cross_compiling" = yes; then
+  ac_cv_motif_version=unknown
+                    ac_cv_motif_version_string=unknown
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5098 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+                    #include <Xm/Xm.h>
+                    int main() {
+                      FILE *f = fopen("conftest-mt", "w");
+                      if (!f) exit(1);
+                      fprintf(f, "%d %d.%d\n", XmVersion,
+                         XmVERSION, XmREVISION);
+                      fclose(f);
+                      exit(0);
+                    }
+EOF
+if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  mtv=`cat conftest-mt`
+                    ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
+                    ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_motif_version=unknown
+                    ac_cv_motif_version_string=unknown
+fi
+rm -fr conftest*
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+
+echo "$ac_t""$ac_cv_motif_version_string" 1>&6
+  rm -f conftest-mt
+  motif_version=$ac_cv_motif_version
+  motif_version_string=$ac_cv_motif_version_string
+
+fi
+
+
+# If this is Motif 2.x, and we have XPM, then link against XPM as well.
+# The deal is, Motif 2.x requires XPM -- but it's a compilation option of
+# the library whether to build the XPM code into libXm, or whether to rely
+# on an external libXm.  So the only way to tell whether XPM is a link-time
+# requirement is to examine libXm.a, which is very difficult to do in an
+# autoconf script.  So... if it's Motif 2.x, we always link against XPM if
+# the XPM lib exists (and this will be a no-op if libXm happens to already
+# have the XPM code in it.)
+#
+motif_requires_xpm=no
+if test "$have_motif" = yes ; then
+   echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
+echo "configure:5149: checking whether Motif requires XPM" >&5
+   if test "$motif_version" -ge 2000; then
+     motif_requires_xpm=yes
+     echo "$ac_t""maybe" 1>&6
+   else
+     echo "$ac_t""no" 1>&6
+   fi
+fi
+
+
+
 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
 # Extension".   Why this extension isn't in -lXext with all the others,
 # I have no idea.
@@ -4957,7 +5169,7 @@ if test "$have_motif" = yes ; then
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
-echo "configure:4972: checking for XpQueryExtension in -lXp" >&5
+echo "configure:5184: checking for XpQueryExtension in -lXp" >&5
 ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4965,7 +5177,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXp -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4980 "configure"
+#line 5192 "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
@@ -4976,7 +5188,7 @@ int main() {
 XpQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5203: \"$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
@@ -5023,7 +5235,7 @@ if test "$have_motif" = yes ; then
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
-echo "configure:5038: checking for _Xsetlocale in -lXintl" >&5
+echo "configure:5250: checking for _Xsetlocale in -lXintl" >&5
 ac_lib_var=`echo Xintl'_'_Xsetlocale | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5031,7 +5243,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5046 "configure"
+#line 5258 "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
@@ -5042,7 +5254,7 @@ int main() {
 _Xsetlocale()
 ; return 0; }
 EOF
-if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5091,7 +5303,7 @@ fi
 
     /*)
      echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
-echo "configure:5106: checking for XPM headers" >&5
+echo "configure:5318: checking for XPM headers" >&5
      d=$with_xpm/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5101,7 +5313,7 @@ echo "configure:5106: checking for XPM headers" >&5
      fi
 
      echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
-echo "configure:5116: checking for XPM libs" >&5
+echo "configure:5328: checking for XPM libs" >&5
      d=$with_xpm/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5139,18 +5351,18 @@ if test "$with_xpm" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
-echo "configure:5154: checking for X11/xpm.h" >&5
+echo "configure:5366: checking for X11/xpm.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5159 "configure"
+#line 5371 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:5376: \"$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"
@@ -5181,6 +5393,15 @@ elif test "$with_xpm" != no; then
   exit 1
 fi
 
+# See comment near $motif_requires_xpm, above.
+# Need to do this here, after both Motif and XPM have been checked for.
+#
+if test "$have_motif" = yes -a "$have_xpm" = yes ; then
+  if test "$motif_requires_xpm" = yes ; then
+    TOOLKIT_LIBS="$TOOLKIT_LIBS $XPM_LIBS"
+  fi
+fi
+
 
 # check for the GL header
 #
@@ -5203,7 +5424,7 @@ fi
 
     /*)
      echo $ac_n "checking for GL headers""... $ac_c" 1>&6
-echo "configure:5218: checking for GL headers" >&5
+echo "configure:5439: checking for GL headers" >&5
      d=$with_gl/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5213,7 +5434,7 @@ echo "configure:5218: checking for GL headers" >&5
      fi
 
      echo $ac_n "checking for GL libs""... $ac_c" 1>&6
-echo "configure:5228: checking for GL libs" >&5
+echo "configure:5449: checking for GL libs" >&5
      d=$with_gl/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5254,18 +5475,18 @@ if test "$with_gl" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
-echo "configure:5269: checking for GL/gl.h" >&5
+echo "configure:5490: checking for GL/gl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5274 "configure"
+#line 5495 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:5500: \"$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"
@@ -5295,18 +5516,18 @@ fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
-echo "configure:5310: checking for GL/glx.h" >&5
+echo "configure:5531: checking for GL/glx.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5315 "configure"
+#line 5536 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:5541: \"$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"
@@ -5342,7 +5563,7 @@ EOF
     # to link against.
     #
     echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
-echo "configure:5357: checking whether GL is really MesaGL" >&5
+echo "configure:5578: checking whether GL is really MesaGL" >&5
     if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5354,7 +5575,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5369 "configure"
+#line 5590 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
@@ -5395,12 +5616,12 @@ EOF
       unset ac_cv_mesagl_version_string
 
       echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
-echo "configure:5410: checking MesaGL version number" >&5
+echo "configure:5631: checking MesaGL version number" >&5
       if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5415 "configure"
+#line 5636 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
@@ -5449,11 +5670,11 @@ fi
     # If it's MesaGL, check to see if it requires -lpthread.
     #
     have_pthread=no
-    mesa_requires_pthread=false
+    mesa_requires_pthread=no
     if test "$ac_have_mesa_gl" = yes; then
 
       echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5468: checking for pthread_create in -lpthread" >&5
+echo "configure:5689: checking for pthread_create in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5461,7 +5682,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5476 "configure"
+#line 5697 "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
@@ -5472,7 +5693,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5708: \"$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
@@ -5510,7 +5731,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for gl_get_thread_context in -l$gl_lib_1""... $ac_c" 1>&6
-echo "configure:5525: checking for gl_get_thread_context in -l$gl_lib_1" >&5
+echo "configure:5746: checking for gl_get_thread_context in -l$gl_lib_1" >&5
 ac_lib_var=`echo $gl_lib_1'_'gl_get_thread_context | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5518,7 +5739,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$gl_lib_1 $GL_LIBS -lpthread -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5533 "configure"
+#line 5754 "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
@@ -5529,7 +5750,7 @@ int main() {
 gl_get_thread_context()
 ; return 0; }
 EOF
-if { (eval echo configure:5544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5765: \"$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
@@ -5577,7 +5798,7 @@ fi
   LDFLAGS="$LDFLAGS $X_LIBS"
 
   echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
-echo "configure:5592: checking for glBindTexture in -l$gl_lib_1" >&5
+echo "configure:5813: checking for glBindTexture in -l$gl_lib_1" >&5
 ac_lib_var=`echo $gl_lib_1'_'glBindTexture | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5585,7 +5806,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5600 "configure"
+#line 5821 "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
@@ -5596,7 +5817,7 @@ int main() {
 glBindTexture()
 ; return 0; }
 EOF
-if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5832: \"$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
@@ -5650,7 +5871,7 @@ fi
 
     /*)
      echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
-echo "configure:5665: checking for XReadDisplay headers" >&5
+echo "configure:5886: checking for XReadDisplay headers" >&5
      d=$with_readdisplay/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5660,7 +5881,7 @@ echo "configure:5665: checking for XReadDisplay headers" >&5
      fi
 
      echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
-echo "configure:5675: checking for XReadDisplay libs" >&5
+echo "configure:5896: checking for XReadDisplay libs" >&5
      d=$with_readdisplay/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5698,18 +5919,18 @@ if test "$with_readdisplay" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
-echo "configure:5713: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:5934: checking for X11/extensions/readdisplay.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5718 "configure"
+#line 5939 "configure"
 #include "confdefs.h"
 #include <X11/extensions/readdisplay.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:5944: \"$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"
@@ -5759,7 +5980,7 @@ fi
 
     /*)
      echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
-echo "configure:5774: checking for Iris Video headers" >&5
+echo "configure:5995: checking for Iris Video headers" >&5
      d=$with_sgivideo/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -5769,7 +5990,7 @@ echo "configure:5774: checking for Iris Video headers" >&5
      fi
 
      echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
-echo "configure:5784: checking for Iris Video libs" >&5
+echo "configure:6005: checking for Iris Video libs" >&5
      d=$with_sgivideo/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -5807,18 +6028,18 @@ if test "$with_sgivideo" = yes; then
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
-echo "configure:5822: checking for dmedia/vl.h" >&5
+echo "configure:6043: checking for dmedia/vl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5827 "configure"
+#line 6048 "configure"
 #include "confdefs.h"
 #include <dmedia/vl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:6053: \"$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"
@@ -5842,7 +6063,7 @@ fi
   if test "$have_sgivideo" = yes; then
     have_sgivideo=no
     echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
-echo "configure:5857: checking for vlOpenVideo in -lvl" >&5
+echo "configure:6078: checking for vlOpenVideo in -lvl" >&5
 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5850,7 +6071,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lvl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5865 "configure"
+#line 6086 "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
@@ -5861,7 +6082,7 @@ int main() {
 vlOpenVideo()
 ; return 0; }
 EOF
-if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5929,7 +6150,7 @@ if test -n "$with_zippy_req" ; then
   case "$with_zippy_req" in
     /*)
       echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
-echo "configure:5944: checking for $with_zippy_req" >&5
+echo "configure:6165: checking for $with_zippy_req" >&5
       if test -x "$with_zippy_req" ; then
         echo "$ac_t""yes" 1>&6
       else
@@ -5943,7 +6164,7 @@ echo "configure:5944: checking for $with_zippy_req" >&5
       # Extract the first word of "$with_zippy_req", so it can be a program name with args.
 set dummy $with_zippy_req; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5958: checking for $ac_word" >&5
+echo "configure:6179: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5951,9 +6172,13 @@ else
   /*)
   ac_cv_path_zip2="$zip2" # Let the user override the test with a path.
   ;;
+  ?:/*)                         
+  ac_cv_path_zip2="$zip2" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_zip2="$ac_dir/$ac_word"
@@ -5989,15 +6214,16 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6004: checking for $ac_word" >&5
+echo "configure:6229: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$emacs_exe"; then
   ac_cv_prog_emacs_exe="$emacs_exe" # Let the user override the test.
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_emacs_exe="$ac_prog"
@@ -6022,15 +6248,16 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6037: checking for $ac_word" >&5
+echo "configure:6263: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$xemacs_exe"; then
   ac_cv_prog_xemacs_exe="$xemacs_exe" # Let the user override the test.
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_xemacs_exe="$ac_prog"
@@ -6056,7 +6283,7 @@ done
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:6071: checking for emacs yow" >&5
+echo "configure:6298: checking for emacs yow" >&5
     #
     # get emacs to tell us where the libexec directory is.
     #
@@ -6078,7 +6305,7 @@ echo "configure:6071: checking for emacs yow" >&5
 
   if test -z "$ac_cv_zippy_program" ; then
     echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
-echo "configure:6093: checking for xemacs yow" >&5
+echo "configure:6320: checking for xemacs yow" >&5
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
@@ -6124,15 +6351,16 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6139: checking for $ac_word" >&5
+echo "configure:6366: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$fortune"; then
   ac_cv_prog_fortune="$fortune" # Let the user override the test.
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_fortune="$ac_prog"
@@ -6159,7 +6387,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6174: checking for $ac_word" >&5
+echo "configure:6402: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6167,9 +6395,13 @@ else
   /*)
   ac_cv_path_fortune="$fortune" # Let the user override the test with a path.
   ;;
+  ?:/*)                         
+  ac_cv_path_fortune="$fortune" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in /usr/games:/usr/local/games$ac_dummy; do
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="/usr/games:/usr/local/games"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_fortune="$ac_dir/$ac_word"
@@ -6254,12 +6486,12 @@ fi
 if test "$enable_vt_locking" = yes; then
 
   echo $ac_n "checking for the VT_LOCKSWITCH ioctl""... $ac_c" 1>&6
-echo "configure:6269: checking for the VT_LOCKSWITCH ioctl" >&5
+echo "configure:6501: checking for the VT_LOCKSWITCH ioctl" >&5
   if eval "test \"`echo '$''{'ac_cv_vt_lockswitch'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6274 "configure"
+#line 6506 "configure"
 #include "confdefs.h"
 #include <fcntl.h>
                    #include <sys/ioctl.h>
@@ -6268,7 +6500,7 @@ int main() {
 int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;
 ; return 0; }
 EOF
-if { (eval echo configure:6283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_vt_lockswitch=yes
 else
@@ -6283,7 +6515,7 @@ fi
   ac_vt_lockswitch=$ac_cv_vt_lockswitch
   echo "$ac_t""$ac_vt_lockswitch" 1>&6
 
-elif test "$enable_locking" = no; then
+elif test "$enable_vt_locking" = no; then
   true
 else
   echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
@@ -6322,7 +6554,7 @@ fi
 
     /*)
      echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
-echo "configure:6337: checking for Kerberos headers" >&5
+echo "configure:6569: checking for Kerberos headers" >&5
      d=$with_kerberos/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6332,7 +6564,7 @@ echo "configure:6337: checking for Kerberos headers" >&5
      fi
 
      echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
-echo "configure:6347: checking for Kerberos libs" >&5
+echo "configure:6579: checking for Kerberos libs" >&5
      d=$with_kerberos/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6363,7 +6595,7 @@ echo "configure:6347: checking for Kerberos libs" >&5
 
   if test "$with_kerberos" = yes; then
     echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
-echo "configure:6378: checking for Kerberos" >&5
+echo "configure:6610: checking for Kerberos" >&5
 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6374,14 +6606,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6389 "configure"
+#line 6621 "configure"
 #include "confdefs.h"
 #include <krb.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_kerberos=yes
 else
@@ -6405,12 +6637,12 @@ EOF
       # from Tim Showalter <tjs+@andrew.cmu.edu>
       PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
       echo $ac_n "checking for res_search""... $ac_c" 1>&6
-echo "configure:6420: checking for res_search" >&5
+echo "configure:6652: checking for res_search" >&5
 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6425 "configure"
+#line 6657 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char res_search(); below.  */
@@ -6433,7 +6665,7 @@ res_search();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_res_search=yes"
 else
@@ -6451,7 +6683,7 @@ if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
-echo "configure:6466: checking for res_search in -lresolv" >&5
+echo "configure:6698: checking for res_search in -lresolv" >&5
 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6459,7 +6691,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6474 "configure"
+#line 6706 "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
@@ -6470,7 +6702,7 @@ int main() {
 res_search()
 ; return 0; }
 EOF
-if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6717: \"$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
@@ -6520,7 +6752,7 @@ fi
 
     /*)
      echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
-echo "configure:6535: checking for PAM headers" >&5
+echo "configure:6767: checking for PAM headers" >&5
      d=$with_pam/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6530,7 +6762,7 @@ echo "configure:6535: checking for PAM headers" >&5
      fi
 
      echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
-echo "configure:6545: checking for PAM libs" >&5
+echo "configure:6777: checking for PAM libs" >&5
      d=$with_pam/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6561,7 +6793,7 @@ echo "configure:6545: checking for PAM libs" >&5
 
   if test "$with_pam" = yes; then
     echo $ac_n "checking for PAM""... $ac_c" 1>&6
-echo "configure:6576: checking for PAM" >&5
+echo "configure:6808: checking for PAM" >&5
 if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6572,14 +6804,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6587 "configure"
+#line 6819 "configure"
 #include "confdefs.h"
 #include <security/pam_appl.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_pam=yes
 else
@@ -6625,7 +6857,7 @@ fi
 
     /*)
      echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
-echo "configure:6640: checking for shadow password headers" >&5
+echo "configure:6872: checking for shadow password headers" >&5
      d=$with_shadow/include
      if test -d $d; then
        X_CFLAGS="-I$d $X_CFLAGS"
@@ -6635,7 +6867,7 @@ echo "configure:6640: checking for shadow password headers" >&5
      fi
 
      echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
-echo "configure:6650: checking for shadow password libs" >&5
+echo "configure:6882: checking for shadow password libs" >&5
      d=$with_shadow/lib
      if test -d $d; then
        X_LIBS="-L$d $X_LIBS"
@@ -6676,7 +6908,7 @@ echo "configure:6650: checking for shadow password libs" >&5
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6691: checking for Sun-style shadow passwords" >&5
+echo "configure:6923: checking for Sun-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6687,7 +6919,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6702 "configure"
+#line 6934 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -6700,7 +6932,7 @@ struct passwd_adjunct *p = getpwanam("nobody");
                         const char *pw = p->pwa_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sun_adjunct=yes
 else
@@ -6729,7 +6961,7 @@ EOF
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6744: checking for DEC-style shadow passwords" >&5
+echo "configure:6976: checking for DEC-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6740,7 +6972,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6755 "configure"
+#line 6987 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -6757,7 +6989,7 @@ struct pr_passwd *p;
                         pw = p->ufld.fd_encrypt;
 ; return 0; }
 EOF
-if { (eval echo configure:6772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_enhanced_passwd=yes
 else
@@ -6783,7 +7015,7 @@ EOF
       # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
       # (I'm told it needs -lcurses too, but I don't understand why.)
       echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
-echo "configure:6798: checking for getprpwnam in -lprot" >&5
+echo "configure:7030: checking for getprpwnam in -lprot" >&5
 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6791,7 +7023,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lprot -lx $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6806 "configure"
+#line 7038 "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
@@ -6802,7 +7034,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:6817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7049: \"$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
@@ -6822,7 +7054,7 @@ else
   echo "$ac_t""no" 1>&6
 # On DEC, getprpwnam() is in -lsecurity
                    echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:6837: checking for getprpwnam in -lsecurity" >&5
+echo "configure:7069: checking for getprpwnam in -lsecurity" >&5
 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6830,7 +7062,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6845 "configure"
+#line 7077 "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
@@ -6841,7 +7073,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:6856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7088: \"$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
@@ -6870,7 +7102,7 @@ fi
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:6885: checking for HP-style shadow passwords" >&5
+echo "configure:7117: checking for HP-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6881,7 +7113,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6896 "configure"
+#line 7128 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -6894,7 +7126,7 @@ struct s_passwd *p = getspwnam("nobody");
                         const char *pw = p->pw_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:6909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_hpux_passwd=yes
 else
@@ -6919,7 +7151,7 @@ EOF
 
       # on HPUX, bigcrypt is in -lsec
       echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:6934: checking for bigcrypt in -lsec" >&5
+echo "configure:7166: checking for bigcrypt in -lsec" >&5
 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6927,7 +7159,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6942 "configure"
+#line 7174 "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
@@ -6938,7 +7170,7 @@ int main() {
 bigcrypt()
 ; return 0; }
 EOF
-if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7185: \"$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
@@ -6965,7 +7197,7 @@ fi
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:6980: checking for generic shadow passwords" >&5
+echo "configure:7212: checking for generic shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6976,7 +7208,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 6991 "configure"
+#line 7223 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -6988,7 +7220,7 @@ struct spwd *p = getspnam("nobody");
                         const char *pw = p->sp_pwdp;
 ; return 0; }
 EOF
-if { (eval echo configure:7003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_shadow=yes
 else
@@ -7014,7 +7246,7 @@ EOF
       # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
       have_getspnam=no
       echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
-echo "configure:7029: checking for getspnam in -lc" >&5
+echo "configure:7261: checking for getspnam in -lc" >&5
 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7022,7 +7254,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7037 "configure"
+#line 7269 "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
@@ -7033,7 +7265,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7280: \"$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
@@ -7055,7 +7287,7 @@ fi
 
       if test "$have_getspnam" = no ; then
         echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:7070: checking for getspnam in -lgen" >&5
+echo "configure:7302: checking for getspnam in -lgen" >&5
 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7063,7 +7295,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7078 "configure"
+#line 7310 "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
@@ -7074,7 +7306,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:7089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7321: \"$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
@@ -7105,7 +7337,7 @@ fi
   #
   if test "$pwent_cruft_done" = no ; then
     echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
-echo "configure:7120: checking for FreeBSD-style shadow passwords" >&5
+echo "configure:7352: checking for FreeBSD-style shadow passwords" >&5
 if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7126,7 +7358,7 @@ echo "$ac_t""$ac_cv_master_passwd" 1>&6
   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
   have_crypt=no
   echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
-echo "configure:7141: checking for crypt in -lc" >&5
+echo "configure:7373: checking for crypt in -lc" >&5
 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7134,7 +7366,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7149 "configure"
+#line 7381 "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
@@ -7145,7 +7377,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:7160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7392: \"$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
@@ -7167,7 +7399,7 @@ fi
 
   if test "$have_crypt" = no ; then
     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:7182: checking for crypt in -lcrypt" >&5
+echo "configure:7414: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7175,7 +7407,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7190 "configure"
+#line 7422 "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
@@ -7186,7 +7418,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7433: \"$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
@@ -7446,7 +7678,7 @@ fi
 
 
 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
-  preferred_mesagl=2.7
+  preferred_mesagl=3.0
 
   if test "$ac_mesagl_version" = unknown; then
     warnL "Unable to determine the MesaGL version number!"
@@ -7493,8 +7725,8 @@ if test "$have_gl" = no ; then
   warn2 're-running configure.  (Remember to delete the'
   warn2 "config.cache file first.)  If your vendor doesn't ship"
   warn2 'their own implementation of OpenGL, you can get a free'
-  warn2 'version at <http://www.ssec.wisc.edu/~brianp/Mesa.html>.'
-  warn2 'For general OpenGL info, see <http://www.opengl.org/>.'
+  warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
+  warn2 'info, see <http://www.opengl.org/>.'
 
 fi
 
@@ -7553,7 +7785,7 @@ EOF
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
 (set) 2>&1 |
-  case `(ac_space=' '; set) 2>&1` in
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
   *ac_space=\ *)
     # `set' does not quote correctly, so add quotes (double-quote substitution
     # turns \\\\ into \\, and sed turns \\ into \).
@@ -7620,7 +7852,7 @@ do
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12"
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
     exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
@@ -7645,9 +7877,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
 $ac_vpsub
 $extrasub
+s%@SHELL@%$SHELL%g
 s%@CFLAGS@%$CFLAGS%g
 s%@CPPFLAGS@%$CPPFLAGS%g
 s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
 s%@DEFS@%$DEFS%g
 s%@LDFLAGS@%$LDFLAGS%g
 s%@LIBS@%$LIBS%g
@@ -7674,6 +7908,7 @@ s%@host_os@%$host_os%g
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@SET_MAKE@%$SET_MAKE%g
 s%@X_CFLAGS@%$X_CFLAGS%g
index 0b6cdaf129eb1c464e7e3b60da8173aad4dc16e8..df6f23e67cbde728a45f12e8689963d9e7b87966 100644 (file)
@@ -189,6 +189,11 @@ HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
 
 AC_PATH_XTRA
 
+if test "$have_x" != yes; then
+  AC_MSG_ERROR(Couldn't find X11 headers/libs.  Try \`$0 --help'.)
+fi
+
+
 # Try and find the app-defaults directory.
 # It sucks that autoconf doesn't do this already...
 #
@@ -844,6 +849,40 @@ elif test "$with_dpms" != no; then
 fi
 
 
+# Check for /proc/interrupts
+#
+have_proc_interrupts=no
+with_proc_interrupts_req=unspecified
+AC_ARG_WITH(proc-interrupts,
+[  --with-proc-interrupts  Include support for consulting the /proc/interrupts
+                          file to notice keyboard activity, if possible.
+  --without-proc-interrupts   Do not compile in support for this method.],
+  [with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"],
+  [with_proc_interrupts=yes])
+
+if test "$with_proc_interrupts" = yes; then
+
+   AC_MSG_CHECKING(whether /proc/interrupts contains keyboard data)
+   AC_CACHE_VAL(ac_cv_have_proc_interrupts,
+    [ac_cv_have_proc_interrupts=no
+     if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
+       ac_cv_have_proc_interrupts=yes
+     fi
+    ])
+   have_proc_interrupts=$ac_cv_have_proc_interrupts
+
+  AC_MSG_RESULT($have_proc_interrupts)
+
+  if test "$have_proc_interrupts" = yes; then
+    AC_DEFINE(HAVE_PROC_INTERRUPTS)
+  fi
+
+elif test "$with_proc_interrupts" != no; then
+  echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
+  exit 1
+fi
+
+
 
 # Check for Motif and Athena --with and --without arguments.
 #
@@ -1026,6 +1065,57 @@ if test "$have_lesstif" = yes ; then
 fi
 
 
+if test "$have_motif" = yes ; then
+  mtv=unknown
+  echo unknown > conftest-mt
+  AC_CACHE_CHECK([Motif version number],
+                ac_cv_motif_version_string,
+      [AC_TRY_X_RUN([#include <stdio.h>
+                    #include <Xm/Xm.h>
+                    int main() {
+                      FILE *f = fopen("conftest-mt", "w");
+                      if (!f) exit(1);
+                      fprintf(f, "%d %d.%d\n", XmVersion,
+                         XmVERSION, XmREVISION);
+                      fclose(f);
+                      exit(0);
+                    }],
+                   [mtv=`cat conftest-mt`
+                    ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
+                    ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`],
+                   [ac_cv_motif_version=unknown
+                    ac_cv_motif_version_string=unknown],
+                   [ac_cv_motif_version=unknown
+                    ac_cv_motif_version_string=unknown])])
+  rm -f conftest-mt
+  motif_version=$ac_cv_motif_version
+  motif_version_string=$ac_cv_motif_version_string
+
+fi
+
+
+# If this is Motif 2.x, and we have XPM, then link against XPM as well.
+# The deal is, Motif 2.x requires XPM -- but it's a compilation option of
+# the library whether to build the XPM code into libXm, or whether to rely
+# on an external libXm.  So the only way to tell whether XPM is a link-time
+# requirement is to examine libXm.a, which is very difficult to do in an
+# autoconf script.  So... if it's Motif 2.x, we always link against XPM if
+# the XPM lib exists (and this will be a no-op if libXm happens to already
+# have the XPM code in it.)
+#
+motif_requires_xpm=no
+if test "$have_motif" = yes ; then
+   AC_MSG_CHECKING(whether Motif requires XPM)
+   if test "$motif_version" -ge 2000; then
+     motif_requires_xpm=yes
+     AC_MSG_RESULT(maybe)
+   else
+     AC_MSG_RESULT(no)
+   fi
+fi
+
+
+
 # Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
 # Extension".   Why this extension isn't in -lXext with all the others,
 # I have no idea.
@@ -1076,6 +1166,15 @@ elif test "$with_xpm" != no; then
   exit 1
 fi
 
+# See comment near $motif_requires_xpm, above.
+# Need to do this here, after both Motif and XPM have been checked for.
+#
+if test "$have_motif" = yes -a "$have_xpm" = yes ; then
+  if test "$motif_requires_xpm" = yes ; then
+    TOOLKIT_LIBS="$TOOLKIT_LIBS $XPM_LIBS"
+  fi
+fi
+
 
 # check for the GL header
 #
@@ -1185,7 +1284,7 @@ EOF
     # If it's MesaGL, check to see if it requires -lpthread.
     #
     have_pthread=no
-    mesa_requires_pthread=false
+    mesa_requires_pthread=no
     if test "$ac_have_mesa_gl" = yes; then
 
       AC_CHECK_LIB(pthread, pthread_create, [have_pthread=yes], [],)
@@ -1462,7 +1561,7 @@ if test "$enable_vt_locking" = yes; then
   ac_vt_lockswitch=$ac_cv_vt_lockswitch
   AC_MSG_RESULT($ac_vt_lockswitch)
 
-elif test "$enable_locking" = no; then
+elif test "$enable_vt_locking" = no; then
   true
 else
   echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
@@ -1928,7 +2027,7 @@ fi
 
 
 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
-  preferred_mesagl=2.7
+  preferred_mesagl=3.0
 
   if test "$ac_mesagl_version" = unknown; then
     warnL "Unable to determine the MesaGL version number!"
@@ -1975,8 +2074,8 @@ if test "$have_gl" = no ; then
   warn2 're-running configure.  (Remember to delete the'
   warn2 "config.cache file first.)  If your vendor doesn't ship"
   warn2 'their own implementation of OpenGL, you can get a free'
-  warn2 'version at <http://www.ssec.wisc.edu/~brianp/Mesa.html>.'
-  warn2 'For general OpenGL info, see <http://www.opengl.org/>.'
+  warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
+  warn2 'info, see <http://www.opengl.org/>.'
 
 fi
 
index 9f6644385987330e8ed7c46c36b15eea209b793e..e65ce81b8b5b8a9ddc77997b68f098977b249098 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 3.07
-!                                04-Jan-99
+!                              version 3.08
+!                                15-Mar-99
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://www.jwz.org/xscreensaver/
 *overlayStderr:                True
 *font:                 *-medium-r-*-140-*-m-*
 
+! The default is to use these extensions if available (as noted.)
+*sgiSaverExtension:    True
+*mitSaverExtension:    False
+*xidleExtension:       True
+*procInterrupts:       True
+
 ! This is what the "Demo" button on the splash screen runs (/bin/sh syntax.)
 *demoCommand: xscreensaver-demo
 
                rd-bomb -root -speed 1 -size 0.1                        \n\
                sonar -root                                             \n\
                t3d -root                                               \n\
+               penetrate -root                                         \n\
+               deluxe -root                                            \n\
                                                                          \
        mono:   rocks -root                                             \n\
        color:  rocks -root -fg darksalmon                              \n\
@@ -343,7 +351,7 @@ XScreenSaver.bourneShell:           /bin/sh
 *passwd.thermometer.width:     8
 
 *splash.heading.label:         XScreenSaver %s
-*splash.body.label:            Copyright Â© 1991-1998 by
+*splash.body.label:            Copyright Â© 1991-1999 by
 *splash.body2.label:           Jamie Zawinski <jwz@jwz.org>
 *splash.demo.label:            Demo
 *splash.prefs.label:           Prefs
@@ -378,8 +386,8 @@ XScreenSaver*XmList.fontList:      *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
 
 *label1.labelString:           XScreenSaver %s
 *label1.label:                 XScreenSaver %s
-*label2.labelString: Copyright Â© 1991-1998 by Jamie Zawinski <jwz@jwz.org>
-*label2.label:      Copyright Â© 1991-1998 by Jamie Zawinski <jwz@jwz.org>
+*label2.labelString: Copyright Â© 1991-1999 by Jamie Zawinski <jwz@jwz.org>
+*label2.label:      Copyright Â© 1991-1999 by Jamie Zawinski <jwz@jwz.org>
 *demoList.visibleItemCount:    10
 *demoList.automaticSelection:  True
 *next.labelString:             Run Next
index f5e147930d4aedfa4ddca8ce75db932f62768b6e..593d19ba5d3db988ce527ab5ad3fbd53e3256a9e 100644 (file)
 "*overlayTextBackground:       #000000",
 "*overlayStderr:               True",
 "*font:                        *-medium-r-*-140-*-m-*",
+"*sgiSaverExtension:   True",
+"*mitSaverExtension:   False",
+"*xidleExtension:      True",
+"*procInterrupts:      True",
 "*demoCommand: xscreensaver-demo",
 "*prefsCommand: xscreensaver-demo -prefs",
 "*helpURL: http://www.jwz.org/xscreensaver/man.html",
                rd-bomb -root -speed 1 -size 0.1                        \\n\
                sonar -root                                             \\n\
                t3d -root                                               \\n\
+               penetrate -root                                         \\n\
+               deluxe -root                                            \\n\
                                                                          \
        mono:   rocks -root                                             \\n\
        color:  rocks -root -fg darksalmon                              \\n\
 "*passwd.passwdFont:           *-courier-medium-r-*-*-*-140-*-*-*-iso8859-1",
 "*passwd.thermometer.width:    8",
 "*splash.heading.label:                XScreenSaver %s",
-"*splash.body.label:           Copyright Â© 1991-1998 by",
+"*splash.body.label:           Copyright Â© 1991-1999 by",
 "*splash.body2.label:          Jamie Zawinski <jwz@jwz.org>",
 "*splash.demo.label:           Demo",
 "*splash.prefs.label:          Prefs",
 "*demoDialog.maxWidth:         600",
 "*label1.labelString:          XScreenSaver %s",
 "*label1.label:                        XScreenSaver %s",
-"*label2.labelString: Copyright Â© 1991-1998 by Jamie Zawinski <jwz@jwz.org>",
-"*label2.label:             Copyright Â© 1991-1998 by Jamie Zawinski <jwz@jwz.org>",
+"*label2.labelString: Copyright Â© 1991-1999 by Jamie Zawinski <jwz@jwz.org>",
+"*label2.label:             Copyright Â© 1991-1999 by Jamie Zawinski <jwz@jwz.org>",
 "*demoList.visibleItemCount:   10",
 "*demoList.automaticSelection: True",
 "*next.labelString:            Run Next",
index 306e694a09a1fc5453c52a5e82a3b7e1e913bc20..e006e5778050259893f6aa65eb0ff3df81d36248 100644 (file)
@@ -174,6 +174,7 @@ static const char * const prefs[] = {
   "sgiSaverExtension",
   "mitSaverExtension",
   "xidleExtension",
+  "procInterrupts",
   "overlayStderr",
   "overlayTextBackground",     /* not saved -- X resources only */
   "overlayTextForeground",     /* not saved -- X resources only */
@@ -633,6 +634,7 @@ write_init_file (saver_preferences *p, const char *version_string)
       CHECK("sgiSaverExtension")type = pref_bool, b=p->use_sgi_saver_extension;
       CHECK("mitSaverExtension")type = pref_bool, b=p->use_mit_saver_extension;
       CHECK("xidleExtension")  type = pref_bool, b = p->use_xidle_extension;
+      CHECK("procInterrupts")  type = pref_bool, b = p->use_proc_interrupts;
       CHECK("overlayStderr")   type = pref_bool, b = overlay_stderr_p;
       CHECK("overlayTextBackground") continue;  /* don't save */
       CHECK("overlayTextForeground") continue;  /* don't save */
@@ -792,6 +794,7 @@ load_init_file (saver_preferences *p)
                                                     "Boolean");
   p->use_sgi_saver_extension = get_boolean_resource ("sgiSaverExtension",
                                                     "Boolean");
+  p->use_proc_interrupts = get_boolean_resource ("procInterrupts", "Boolean");
 
   /* Throttle the various timeouts to reasonable values.
    */
index cf77f8b2ce218d136e5cba9eae7b1d8baf3049e2..55ffef35ffa9b1577819c4944b3ed54837e81319 100644 (file)
@@ -68,6 +68,7 @@ struct saver_preferences {
   Bool use_xidle_extension;    /* which extension to use, if possible */
   Bool use_mit_saver_extension;
   Bool use_sgi_saver_extension;
+  Bool use_proc_interrupts;
 
   char *shell;                 /* where to find /bin/sh */
 
index 797b301c42a0ec0e9249edc7ff87b4d946ca92c7..9d35812279f62de2f59c448997589be7fde85a40 100644 (file)
@@ -48,7 +48,7 @@ void blank_screen (saver_info *si) {}
 void unblank_screen (saver_info *si) {}
 Bool select_visual (saver_screen_info *ssi, const char *v) { return False; }
 Bool window_exists_p (Display *dpy, Window window) {return True;}
-void start_notice_events_timer (saver_info *si, Window w) {}
+void start_notice_events_timer (saver_info *si, Window w, Bool) {}
 Bool handle_clientmessage (saver_info *si, XEvent *e, Bool u) { return False; }
 int BadWindow_ehandler (Display *dpy, XErrorEvent *error) { exit(1); }
 const char *signal_name(int signal) { return "???"; }
index a0d2392c33e26b36e8f5cfead384d3c4c9ad9619..982b073291687780549080a7bfe161b4bfee158a 100644 (file)
 
 #include "xscreensaver.h"
 
+#ifdef HAVE_PROC_INTERRUPTS
+static Bool proc_interrupts_activity_p (saver_info *si);
+#endif /* HAVE_PROC_INTERRUPTS */
+
 
 void
 idle_timer (XtPointer closure, XtIntervalId *id)
@@ -75,6 +79,21 @@ idle_timer (XtPointer closure, XtIntervalId *id)
 }
 
 
+static void
+schedule_wakeup_event (saver_info *si, Time when, Bool verbose_p)
+{
+  /* Wake up periodically to ask the server if we are idle. */
+  si->timer_id = XtAppAddTimeOut (si->app, when, idle_timer,
+                                  (XtPointer) si);
+
+#ifdef DEBUG_TIMERS
+  if (verbose_p)
+    fprintf (stderr, "%s: starting idle_timer (%ld, %ld)\n",
+             blurb(), when, si->timer_id);
+#endif /* DEBUG_TIMERS */
+}
+
+
 static void
 notice_events (saver_info *si, Window window, Bool top_p)
 {
@@ -160,7 +179,7 @@ notice_events_timer (XtPointer closure, XtIntervalId *id)
 }
 
 void
-start_notice_events_timer (saver_info *si, Window w)
+start_notice_events_timer (saver_info *si, Window w, Bool verbose_p)
 {
   saver_preferences *p = &si->prefs;
   struct notice_events_timer_arg *arg =
@@ -169,6 +188,10 @@ start_notice_events_timer (saver_info *si, Window w)
   arg->w = w;
   XtAppAddTimeOut (si->app, p->notice_events_timeout, notice_events_timer,
                   (XtPointer) arg);
+
+  if (verbose_p)
+    fprintf (stderr, "%s: starting notice_events_timer for 0x%X (%lu)\n",
+             blurb(), (unsigned int) w, p->notice_events_timeout);
 }
 
 
@@ -236,27 +259,24 @@ reset_timers (saver_info *si)
   if (si->using_mit_saver_extension || si->using_sgi_saver_extension)
     return;
 
+  if (si->timer_id)
+    {
 #ifdef DEBUG_TIMERS
-  if (p->verbose_p)
-    fprintf (stderr, "%s:   killing idle_timer    (%ld, %ld)\n",
-            blurb(), p->timeout, si->timer_id);
+      if (p->verbose_p)
+        fprintf (stderr, "%s: killing idle_timer  (%ld, %ld)\n",
+                 blurb(), p->timeout, si->timer_id);
 #endif /* DEBUG_TIMERS */
+      XtRemoveTimeOut (si->timer_id);
+    }
 
-  if (si->timer_id)
-    XtRemoveTimeOut (si->timer_id);
-  si->timer_id = XtAppAddTimeOut (si->app, p->timeout, idle_timer,
-                                 (XtPointer) si);
-  if (si->cycle_id) abort ();  /* no cycle timer when inactive */
+  schedule_wakeup_event (si, p->timeout, p->verbose_p); /* sets si->timer_id */
 
-#ifdef DEBUG_TIMERS
-  if (p->verbose_p)
-    fprintf (stderr, "%s:   restarting idle_timer (%ld, %ld)\n",
-            blurb(), p->timeout, si->timer_id);
-#endif /* DEBUG_TIMERS */
+  if (si->cycle_id) abort ();  /* no cycle timer when inactive */
 
   si->last_activity_time = time ((time_t *) 0);
 }
 
+
 /* When we aren't using a server extension, this timer is used to periodically
    wake up and poll the mouse position, which is possibly more reliable than
    selecting motion events on every window.
@@ -269,10 +289,13 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id)
   saver_preferences *p = &si->prefs;
   Bool active_p = False;
 
-  if (si->using_xidle_extension ||
-      si->using_mit_saver_extension ||
-      si->using_sgi_saver_extension)
-    /* If an extension is in use, we should not be polling the mouse. */
+  if (!si->using_proc_interrupts &&
+      (si->using_xidle_extension ||
+       si->using_mit_saver_extension ||
+       si->using_sgi_saver_extension))
+    /* If an extension is in use, we should not be polling the mouse.
+       Unless we're also checking /proc/interrupts, in which case, we should.
+     */
     abort ();
 
   si->check_pointer_timer_id =
@@ -316,6 +339,20 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id)
       ssi->poll_mouse_last_mask   = mask;
     }
 
+#ifdef HAVE_PROC_INTERRUPTS
+  if (!active_p &&
+      si->using_proc_interrupts &&
+      proc_interrupts_activity_p (si))
+    {
+# ifdef DEBUG_TIMERS
+      if (p->verbose_p)
+        fprintf (stderr, "%s: /proc/interrupts activity at %s.\n",
+                 blurb(), timestring());
+# endif /* DEBUG_TIMERS */
+      active_p = True;
+    }
+#endif /* HAVE_PROC_INTERRUPTS */
+
   if (active_p)
     reset_timers (si);
 }
@@ -335,31 +372,72 @@ dispatch_event (saver_info *si, XEvent *event)
 }
 
 
+/* methods of detecting idleness:
+
+      explicitly informed by SGI SCREEN_SAVER server event;
+      explicitly informed by MIT-SCREEN-SAVER server event;
+      poll server idle time with XIDLE extension;
+      select events on all windows, and note absence of recent events;
+      note that /proc/interrupts has not changed in a while;
+      activated by clientmessage.
+
+   methods of detecting non-idleness:
+
+      read events on the xscreensaver window;
+      explicitly informed by SGI SCREEN_SAVER server event;
+      explicitly informed by MIT-SCREEN-SAVER server event;
+      select events on all windows, and note events on any of them;
+      note that /proc/interrupts has changed;
+      deactivated by clientmessage.
+
+   I trust that explains why this function is a big hairy mess.
+ */
 void
 sleep_until_idle (saver_info *si, Bool until_idle_p)
 {
   saver_preferences *p = &si->prefs;
   XEvent event;
 
+  /* We need to select events on all windows if we're not using any extensions.
+     Otherwise, we don't need to. */
+  Bool scanning_all_windows = !(si->using_xidle_extension ||
+                                si->using_mit_saver_extension ||
+                                si->using_sgi_saver_extension);
+
+  /* We need to periodically wake up and check for idleness if we're not using
+     any extensions, or if we're using the XIDLE extension.  The other two
+     extensions explicitly deliver events when we go idle/non-idle, so we
+     don't need to poll. */
+  Bool polling_for_idleness = !(si->using_mit_saver_extension ||
+                                si->using_sgi_saver_extension);
+
+  /* Whether we need to periodically wake up and check to see if the mouse has
+     moved.  We only need to do this when not using any extensions.  The reason
+     this isn't the same as `polling_for_idleness' is that the "idleness" poll
+     can happen (for example) 5 minutes from now, whereas the mouse-position
+     poll should happen with low periodicity.  We don't need to poll the mouse
+     position with the XIDLE extension, but we do need to periodically wake up
+     and query the server with that extension.  For our purposes, polling
+     /proc/interrupts is just like polling the mouse position.  It has to
+     happen on the same kind of schedule. */
+  Bool polling_mouse_position = (si->using_proc_interrupts ||
+                                 !(si->using_xidle_extension ||
+                                   si->using_mit_saver_extension ||
+                                   si->using_sgi_saver_extension));
+
   if (until_idle_p)
     {
-      if (!si->using_mit_saver_extension && !si->using_sgi_saver_extension)
-       {
-         /* Wake up periodically to ask the server if we are idle. */
-         si->timer_id = XtAppAddTimeOut (si->app, p->timeout, idle_timer,
-                                         (XtPointer) si);
-
-#ifdef DEBUG_TIMERS
-         if (p->verbose_p)
-           fprintf (stderr, "%s: starting idle_timer (%ld, %ld)\n",
-                    blurb(), p->timeout, si->timer_id);
-#endif /* DEBUG_TIMERS */
-       }
-
-      if (!si->using_xidle_extension &&
-         !si->using_mit_saver_extension &&
-         !si->using_sgi_saver_extension)
-       /* start polling the mouse position */
+      if (polling_for_idleness)
+        /* This causes a no-op event to be delivered to us in a while, so that
+           we come back around through the event loop again.  Use of this timer
+           is economical: for example, if the screensaver should come on in 5
+           minutes, and the user has been idle for 2 minutes, then this
+           timeout will go off no sooner than 3 minutes from now.  */
+        schedule_wakeup_event (si, p->timeout, p->verbose_p);
+
+      if (polling_mouse_position)
+        /* Check to see if the mouse has moved, and set up a repeating timer
+           to do so periodically (typically, every 5 seconds.) */
        check_pointer_timer ((XtPointer) si, 0);
     }
 
@@ -375,6 +453,8 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 #ifdef HAVE_XIDLE_EXTENSION
            if (si->using_xidle_extension)
              {
+                /* The XIDLE extension uses the synthetic event to prod us into
+                   re-asking the server how long the user has been idle. */
                if (! XGetIdleTime (si->dpy, &idle))
                  {
                    fprintf (stderr, "%s: XGetIdleTime() failed.\n", blurb());
@@ -388,7 +468,8 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
                {
                  /* We don't need to do anything in this case - the synthetic
                     event isn't necessary, as we get sent specific events
-                    to wake us up. */
+                    to wake us up.  In fact, this event generally shouldn't
+                     be being delivered when the MIT extension is in use. */
                  idle = 0;
                }
            else
@@ -398,28 +479,38 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
                {
                  /* We don't need to do anything in this case - the synthetic
                     event isn't necessary, as we get sent specific events
-                    to wake us up. */
+                    to wake us up.  In fact, this event generally shouldn't
+                     be being delivered when the SGI extension is in use. */
                  idle = 0;
                }
            else
 #endif /* HAVE_SGI_SAVER_EXTENSION */
              {
+                /* Otherwise, no server extension is in use.  The synthetic
+                   event was to tell us to wake up and see if the user is now
+                   idle.  Compute the amount of idle time by comparing the
+                   `last_activity_time' to the wall clock.  The l_a_t was set
+                   by calling `reset_timers()', which is called only in only
+                   two situations: when polling the mouse position has revealed
+                   the the mouse has moved (user activity) or when we have read
+                   an event (again, user activity.)
+                 */
                idle = 1000 * (si->last_activity_time - time ((time_t *) 0));
              }
-           
+
            if (idle >= p->timeout)
-             goto DONE;
-           else if (!si->using_mit_saver_extension &&
-                    !si->using_sgi_saver_extension)
-             {
-               si->timer_id = XtAppAddTimeOut (si->app, p->timeout - idle,
-                                               idle_timer, (XtPointer) si);
-#ifdef DEBUG_TIMERS
-               if (p->verbose_p)
-                 fprintf (stderr, "%s: starting idle_timer (%ld, %ld)\n",
-                          blurb(), p->timeout - idle, si->timer_id);
-#endif /* DEBUG_TIMERS */
-             }
+              {
+                /* Look, we've been idle long enough.  We're done. */
+                goto DONE;
+              }
+            else
+              {
+                /* The event went off, but it turns out that the user has not
+                   yet been idle for long enough.  So re-signal the event.
+                   */
+                if (polling_for_idleness)
+                  schedule_wakeup_event (si, p->timeout - idle, p->verbose_p);
+              }
          }
        break;
 
@@ -429,19 +520,16 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
        break;
 
       case CreateNotify:
-       if (!si->using_xidle_extension &&
-           !si->using_mit_saver_extension &&
-           !si->using_sgi_saver_extension)
+        /* A window has been created on the screen somewhere.  If we're
+           supposed to scan all windows for events, prepare this window. */
+       if (scanning_all_windows)
          {
-           start_notice_events_timer (si, event.xcreatewindow.window);
+            Window w = event.xcreatewindow.window;
 #ifdef DEBUG_TIMERS
-           if (p->verbose_p)
-             fprintf (stderr,
-                      "%s: starting notice_events_timer for 0x%X (%lu)\n",
-                      blurb(),
-                      (unsigned int) event.xcreatewindow.window,
-                      p->notice_events_timeout);
-#endif /* DEBUG_TIMERS */
+           start_notice_events_timer (si, w, p->verbose_p);
+#else  /* !DEBUG_TIMERS */
+           start_notice_events_timer (si, w, False);
+#endif /* !DEBUG_TIMERS */
          }
        break;
 
@@ -455,8 +543,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
        if (p->verbose_p)
          {
            if (event.xany.type == MotionNotify)
-             fprintf (stderr, "%s: MotionNotify at %s\n",
-                      blurb(), timestring ());
+             fprintf (stderr,"%s: MotionNotify at %s\n",blurb(),timestring());
            else if (event.xany.type == KeyPress)
              fprintf (stderr, "%s: KeyPress seen on 0x%X at %s\n", blurb(),
                       (unsigned int) event.xkey.window, timestring ());
@@ -497,6 +584,11 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 #ifdef HAVE_MIT_SAVER_EXTENSION
        if (event.type == si->mit_saver_ext_event_number)
          {
+            /* This event's number is that of the MIT-SCREEN-SAVER server
+               extension.  This extension has one event number, and the event
+               itself contains sub-codes that say what kind of event it was
+               (an "idle" or "not-idle" event.)
+             */
            XScreenSaverNotifyEvent *sevent =
              (XScreenSaverNotifyEvent *) &event;
            if (sevent->state == ScreenSaverOn)
@@ -548,6 +640,8 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 #ifdef HAVE_SGI_SAVER_EXTENSION
        if (event.type == (si->sgi_saver_ext_event_number + ScreenSaverStart))
          {
+            /* The SGI SCREEN_SAVER server extension has two event numbers,
+               and this event matches the "idle" event. */
            if (p->verbose_p)
              fprintf (stderr, "%s: SGI ScreenSaverStart event received.\n",
                       blurb());
@@ -558,6 +652,8 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
        else if (event.type == (si->sgi_saver_ext_event_number +
                                ScreenSaverEnd))
          {
+            /* The SGI SCREEN_SAVER server extension has two event numbers,
+               and this event matches the "idle" event. */
            if (p->verbose_p)
              fprintf (stderr, "%s: SGI ScreenSaverEnd event received.\n",
                       blurb());
@@ -567,6 +663,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
        else
 #endif /* HAVE_SGI_SAVER_EXTENSION */
 
+          /* Just some random event.  Let the Widgets handle it, if desired. */
          dispatch_event (si, &event);
       }
     }
@@ -603,6 +700,190 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
 }
 
 
+\f
+/* Some crap for dealing with /proc/interrupts.
+
+   On Linux systems, it's possible to see the hardware interrupt count
+   associated with the keyboard.  We can therefore use that as another method
+   of detecting idleness.
+
+   Why is it a good idea to do this?  Because it lets us detect keyboard
+   activity that is not associated with X events.  For example, if the user
+   has switched to another virtual console, it's good for xscreensaver to not
+   be running graphics hacks on the (non-visible) X display.  The common
+   complaint that checking /proc/interrupts addresses is that the user is
+   playing Quake on a non-X console, and the GL hacks are perceptibly slowing
+   the game...
+
+   This is tricky for a number of reasons.
+
+     * First, we must be sure to only do this when running on an X server that
+       is on the local machine (because otherwise, we'd be reacting to the
+       wrong keyboard.)  The way we do this is by noting that the $DISPLAY is
+       pointing to display 0 on the local machine.  It *could* be that display
+       1 is also on the local machine (e.g., two X servers, each on a different
+       virtual-terminal) but it's also possible that screen 1 is an X terminal,
+       using this machine as the host.  So we can't take that chance.
+
+     * Second, one can only access these interrupt numbers in a completely
+       and utterly brain-damaged way.  You would think that one would use an
+       ioctl for this.  But no.  The ONLY way to get this information is to
+       open the pseudo-file /proc/interrupts AS A FILE, and read the numbers
+       out of it TEXTUALLY.  Because this is Unix, and all the world's a file,
+       and the only real data type is the short-line sequence of ASCII bytes.
+
+       Now it's all well and good that the /proc/interrupts pseudo-file
+       exists; that's a clever idea, and a useful API for things that are
+       already textually oriented, like shell scripts, and users doing
+       interactive debugging sessions.  But to make a *C PROGRAM* open a file
+       and parse the textual representation of integers out of it is just
+       insane.
+
+     * Third, you can't just hold the file open, and fseek() back to the
+       beginning to get updated data!  If you do that, the data never changes.
+       And I don't want to call open() every five seconds, because I don't want
+       to risk going to disk for any inodes.  It turns out that if you dup()
+       it early, then each copy gets fresh data, so we can get around that in
+       this way (but for how many releases, one might wonder?)
+
+     * Fourth, the format of the output of the /proc/interrupts file is
+       undocumented, and has changed several times already!  In Linux 2.0.33,
+       even on a multiprocessor machine, it looks like this:
+
+          0:  309453991   timer
+          1:    4771729   keyboard
+   
+       but on later kernels with MP machines, it looks like this:
+
+                   CPU0       CPU1
+          0:    1671450    1672618    IO-APIC-edge  timer
+          1:      13037      13495    IO-APIC-edge  keyboard
+
+       Joy!  So how are we expected to parse that?  Well, this code doesn't
+       parse it: it saves the last line with the string "keyboard" in it, and
+       does a string-comparison to note when it has changed.
+
+   Thanks to Nat Friedman <nat@nat.org> for figuring out all of this crap.
+
+   Note that this only checks for lines with "keyboard" in them.  Perhaps we
+   should also be checking for lines with "PS/2 Mouse" in them.  But that
+   would obviously fail to work for regular serial mice, and obviously just
+   using COM1 would be bad news (turn off the screensaver because the modem
+   is active, yum.)
+ */
+
+
+#ifdef HAVE_PROC_INTERRUPTS
+
+#define PROC_INTERRUPTS "/proc/interrupts"
+
+Bool
+query_proc_interrupts_available (saver_info *si, const char **why)
+{
+  /* We can use /proc/interrupts if $DISPLAY points to :0, and if the
+     "/proc/interrupts" file exists and is readable.
+   */
+  FILE *f;
+  if (why) *why = 0;
+
+  if (!display_is_on_console_p (si))
+    {
+      if (why) *why = "not on primary console";
+      return False;
+    }
+
+  f = fopen (PROC_INTERRUPTS, "r");
+  if (!f)
+    return False;
+
+  fclose (f);
+  return True;
+}
+
+
+static Bool
+proc_interrupts_activity_p (saver_info *si)
+{
+  static FILE *f0 = 0;
+  FILE *f1 = 0;
+  int fd;
+  static char last_line[255] = { 0, };
+  char new_line[sizeof(last_line)];
+
+  if (!f0)
+    {
+      /* First time -- open the file. */
+      f0 = fopen (PROC_INTERRUPTS, "r");
+      if (!f0)
+        {
+          char buf[255];
+          sprintf(buf, "%s: error opening %s", blurb(), PROC_INTERRUPTS);
+          perror (buf);
+          goto FAIL;
+        }
+    }
+
+  if (f0 == (FILE *) -1)           /* means we got an error initializing. */
+    return False;
+
+  fd = dup (fileno (f0));
+  if (fd < 0)
+    {
+      char buf[255];
+      sprintf(buf, "%s: could not dup() the %s fd", blurb(), PROC_INTERRUPTS);
+      perror (buf);
+      goto FAIL;
+    }
+
+  f1 = fdopen (fd, "r");
+  if (!f1)
+    {
+      char buf[255];
+      sprintf(buf, "%s: could not fdopen() the %s fd", blurb(),
+              PROC_INTERRUPTS);
+      perror (buf);
+      goto FAIL;
+    }
+
+  /* Actually, I'm unclear on why this fseek() is necessary, given the timing
+     of the dup() above, but it is. */
+  if (fseek (f1, 0, SEEK_SET) != 0)
+    {
+      char buf[255];
+      sprintf(buf, "%s: error rewinding %s", blurb(), PROC_INTERRUPTS);
+      perror (buf);
+      goto FAIL;
+    }
+
+  /* Now read through the pseudo-file until we find the "keyboard" line. */
+
+  while (fgets (new_line, sizeof(new_line)-1, f1))
+    if (strstr (new_line, "keyboard"))
+      {
+        Bool diff = (*last_line &&
+                     !!strcmp (new_line, last_line));
+        strcpy (last_line, new_line);  /* save this line for next time */
+        fclose (f1);
+        return diff;
+      }
+
+  /* If we got here, we didn't find a "keyboard" line in the file at all. */
+  fprintf (stderr, "%s: no keyboard data in %s?\n", blurb(), PROC_INTERRUPTS);
+
+ FAIL:
+  if (f1)
+    fclose (f1);
+
+  if (f0 && f0 != (FILE *) -1)
+    fclose (f0);
+
+  f0 = (FILE *) -1;
+  return False;
+}
+
+#endif /* HAVE_PROC_INTERRUPTS */
+
+\f
 /* This timer goes off every few minutes, whether the user is idle or not,
    to try and clean up anything that has gone wrong.
 
index b11f203e6edab19864bd68bff5a8df3df1fe7710..7c745831974c6b96917d5644879a55488b6c423f 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver-command, Copyright (c) 1991-1998
+/* xscreensaver-command, Copyright (c) 1991-1999
  *  by Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -51,7 +51,7 @@ static char *usage = "\n\
 usage: %s -<option>\n\
 \n\
   This program provides external control of a running xscreensaver process.\n\
-  Version %s, copyright (c) 1991-1998 Jamie Zawinski <jwz@jwz.org>.\n\
+  Version %s, copyright (c) 1991-1999 Jamie Zawinski <jwz@jwz.org>.\n\
 \n\
   The xscreensaver program is a daemon that runs in the background.\n\
   You control a running xscreensaver process by sending it messages\n\
index e3a013182e77645a6a9a8b0d2bb8b2a28ba30285..979e9d4bae1dd647433fda5355ca3d4bd2384014 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "04-Jan-99 (3.07)" "X Version 11"
+.TH XScreenSaver 1 "15-Mar-99 (3.08)" "X Version 11"
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
@@ -186,7 +186,7 @@ and related tools can always be found at http://www.jwz.org/xscreensaver/
 .BR xscreensaver (1)
 .BR xscreensaver\-demo (1)
 .SH COPYRIGHT
-Copyright \(co 1992, 1993, 1997, 1998
+Copyright \(co 1992, 1993, 1997, 1998, 1999
 by Jamie Zawinski.  Permission to use, copy, modify, distribute, and sell
 this software and its documentation for any purpose is hereby granted without
 fee, provided that the above copyright notice appear in all copies and that
index bc982e57c8e70c85dd1d6ff81a6c08c84d69427a..c35e3daf487d25bcad28350ef8f5ea5b57d2d5e9 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "04-Jan-99 (3.07)" "X Version 11"
+.TH XScreenSaver 1 "15-Mar-99 (3.08)" "X Version 11"
 .SH NAME
 xscreensaver-demo - interactively control the background xscreensaver daemon
 .SH SYNOPSIS
@@ -194,7 +194,7 @@ http://www.jwz.org/xscreensaver/
 .BR xscreensaver (1),
 .BR xscreensaver\-command (1)
 .SH COPYRIGHT
-Copyright \(co 1992, 1993, 1997, 1998
+Copyright \(co 1992, 1993, 1997, 1998, 1999
 by Jamie Zawinski.  Permission to use, copy, modify, distribute, and sell
 this software and its documentation for any purpose is hereby granted without
 fee, provided that the above copyright notice appear in all copies and that
index 000b9d91d694b171fa0d0ded9539c75368b41669..7b16c898aaab4d95f22aa643084ed3842b2cd772 100644 (file)
 #include <X11/StringDefs.h>
 #include <X11/Shell.h>
 #include <X11/Xos.h>
+#include <netdb.h>     /* for gethostbyname() */
 #ifdef HAVE_XMU
 # ifndef VMS
 #  include <X11/Xmu/Error.h>
 #endif /* !HAVE_XMU */
 
 #ifdef HAVE_XIDLE_EXTENSION
-#include <X11/extensions/xidle.h>
+# include <X11/extensions/xidle.h>
 #endif /* HAVE_XIDLE_EXTENSION */
 
 #include "xscreensaver.h"
@@ -188,6 +189,8 @@ static XrmOptionDescRec options [] = {
   { "-no-mit-extension",   ".mitSaverExtension",XrmoptionNoArg, "off" },
   { "-sgi-extension",     ".sgiSaverExtension",XrmoptionNoArg, "on" },
   { "-no-sgi-extension",   ".sgiSaverExtension",XrmoptionNoArg, "off" },
+  { "-proc-interrupts",           ".procInterrupts",   XrmoptionNoArg, "on" },
+  { "-no-proc-interrupts", ".procInterrupts",  XrmoptionNoArg, "off" },
   { "-splash",            ".splash",           XrmoptionNoArg, "on" },
   { "-no-splash",         ".splash",           XrmoptionNoArg, "off" },
   { "-nosplash",          ".splash",           XrmoptionNoArg, "off" },
@@ -214,7 +217,7 @@ do_help (saver_info *si)
   fflush (stdout);
   fflush (stderr);
   fprintf (stdout, "\
-xscreensaver %s, copyright (c) 1991-1998 by Jamie Zawinski <jwz@jwz.org>\n\
+xscreensaver %s, copyright (c) 1991-1999 by Jamie Zawinski <jwz@jwz.org>\n\
 The standard Xt command-line options are accepted; other options include:\n\
 \n\
     -timeout <minutes>       When the screensaver should activate.\n\
@@ -570,7 +573,7 @@ print_banner (saver_info *si)
 
   if (p->verbose_p)
     fprintf (stderr,
-            "%s %s, copyright (c) 1991-1998 "
+            "%s %s, copyright (c) 1991-1999 "
             "by Jamie Zawinski <jwz@jwz.org>.\n",
             progname, si->version);
 
@@ -697,10 +700,13 @@ initialize_server_extensions (saver_info *si)
   Bool server_has_xidle_extension_p = False;
   Bool server_has_sgi_saver_extension_p = False;
   Bool server_has_mit_saver_extension_p = False;
+  Bool system_has_proc_interrupts_p = False;
+  const char *piwhy = 0;
 
   si->using_xidle_extension = p->use_xidle_extension;
   si->using_sgi_saver_extension = p->use_sgi_saver_extension;
   si->using_mit_saver_extension = p->use_mit_saver_extension;
+  si->using_proc_interrupts = p->use_proc_interrupts;
 
 #ifdef HAVE_XIDLE_EXTENSION
   server_has_xidle_extension_p = query_xidle_extension (si);
@@ -711,6 +717,9 @@ initialize_server_extensions (saver_info *si)
 #ifdef HAVE_MIT_SAVER_EXTENSION
   server_has_mit_saver_extension_p = query_mit_saver_extension (si);
 #endif
+#ifdef HAVE_PROC_INTERRUPTS
+  system_has_proc_interrupts_p = query_proc_interrupts_available (si, &piwhy);
+#endif
 
   if (!server_has_xidle_extension_p)
     si->using_xidle_extension = False;
@@ -746,6 +755,25 @@ initialize_server_extensions (saver_info *si)
                 "%s: not using server's lame MIT-SCREEN-SAVER extension.\n",
                 blurb());
     }
+
+  if (!system_has_proc_interrupts_p)
+    {
+      si->using_proc_interrupts = False;
+      if (p->verbose_p && piwhy)
+       fprintf (stderr, "%s: not using /proc/interrupts: %s.\n", blurb(),
+                 piwhy);
+    }
+  else if (p->verbose_p)
+    {
+      if (si->using_proc_interrupts)
+       fprintf (stderr,
+                 "%s: consulting /proc/interrupts for keyboard activity.\n",
+                blurb());
+      else
+       fprintf (stderr,
+                "%s: not consulting /proc/interrupts for keyboard activity.\n",
+                blurb());
+    }
 }
 
 
@@ -792,7 +820,8 @@ select_events (saver_info *si)
      for window creation events, so that new subwindows will be noticed.
    */
   for (i = 0; i < si->nscreens; i++)
-    start_notice_events_timer (si, RootWindowOfScreen (si->screens[i].screen));
+    start_notice_events_timer (si, RootWindowOfScreen (si->screens[i].screen),
+                               False);
 
   if (p->verbose_p)
     fprintf (stderr, " done.\n");
@@ -1008,7 +1037,7 @@ clientmessage_response (saver_info *si, Window w, Bool error,
   L++;
 
   XChangeProperty (si->dpy, w, XA_SCREENSAVER_RESPONSE, XA_STRING, 8,
-                  PropModeReplace, proto, L);
+                  PropModeReplace, (unsigned char *) proto, L);
   XSync (si->dpy, False);
   free (proto);
 }
@@ -1380,3 +1409,50 @@ analyze_display (saver_info *si)
        }
     }
 }
+
+Bool
+display_is_on_console_p (saver_info *si)
+{
+  Bool not_on_console = True;
+  char *dpystr = DisplayString (si->dpy);
+  char *tail = (char *) strchr (dpystr, ':');
+  if (! tail || strncmp (tail, ":0", 2))
+    not_on_console = True;
+  else
+    {
+      char dpyname[255], localname[255];
+      strncpy (dpyname, dpystr, tail-dpystr);
+      dpyname [tail-dpystr] = 0;
+      if (!*dpyname ||
+         !strcmp(dpyname, "unix") ||
+         !strcmp(dpyname, "localhost"))
+       not_on_console = False;
+      else if (gethostname (localname, sizeof (localname)))
+       not_on_console = True;  /* can't find hostname? */
+      else
+       {
+         /* We have to call gethostbyname() on the result of gethostname()
+            because the two aren't guarenteed to be the same name for the
+            same host: on some losing systems, one is a FQDN and the other
+            is not.  Here in the wide wonderful world of Unix it's rocket
+            science to obtain the local hostname in a portable fashion.
+            
+            And don't forget, gethostbyname() reuses the structure it
+            returns, so we have to copy the fucker before calling it again.
+            Thank you master, may I have another.
+          */
+         struct hostent *h = gethostbyname (dpyname);
+         if (!h)
+           not_on_console = True;
+         else
+           {
+             char hn [255];
+             struct hostent *l;
+             strcpy (hn, h->h_name);
+             l = gethostbyname (localname);
+             not_on_console = (!l || !!(strcmp (l->h_name, hn)));
+           }
+       }
+    }
+  return !not_on_console;
+}
index be09025f7da5f3da5d648fe7902da7db7df89d74..9f128721043583db89f009aecb5470a2f81e3e20 100644 (file)
@@ -65,6 +65,7 @@ struct saver_info {
   Bool using_xidle_extension;     /* which extension is being used.         */
   Bool using_mit_saver_extension;  /* Note that `p->use_*' is the *request*, */
   Bool using_sgi_saver_extension;  /* and `si->using_*' is the *reality*.    */
+  Bool using_proc_interrupts;
 
 # ifdef HAVE_MIT_SAVER_EXTENSION
   int mit_saver_ext_event_number;
@@ -252,6 +253,9 @@ extern Bool query_sgi_saver_extension (saver_info *);
 #ifdef HAVE_XIDLE_EXTENSION
 extern Bool query_xidle_extension (saver_info *);
 #endif
+#ifdef HAVE_PROC_INTERRUPTS
+extern Bool query_proc_interrupts_available (saver_info *, const char **why);
+#endif
 
 /* Display Power Management System (DPMS) interface. */
 extern Bool monitor_powered_on_p (saver_info *si);
@@ -316,7 +320,7 @@ extern void skull (Display *, Window, GC, GC, int, int, int, int);
    timers
    ======================================================================= */
 
-extern void start_notice_events_timer (saver_info *, Window);
+extern void start_notice_events_timer (saver_info *, Window, Bool verbose_p);
 extern void cycle_timer (XtPointer si, XtIntervalId *id);
 extern void activate_lock_timer (XtPointer si, XtIntervalId *id);
 extern void reset_watchdog_timer (saver_info *si, Bool on_p);
@@ -369,6 +373,7 @@ extern int saver_ehandler (Display *dpy, XErrorEvent *error);
 extern int BadWindow_ehandler (Display *dpy, XErrorEvent *error);
 extern Bool window_exists_p (Display *dpy, Window window);
 extern char *timestring (void);
+extern Bool display_is_on_console_p (saver_info *si);
 
 extern Atom XA_VROOT, XA_XSETROOT_ID;
 extern Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_ID;
index 80aa49c46df4dcdc54b0ee83e3099b9af1332f81..63b0d32586b2fa084a6eb57e8a98b2633e9fd9dc 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "04-Jan-99 (3.07)" "X Version 11"
+.TH XScreenSaver 1 "15-Mar-99 (3.08)" "X Version 11"
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
@@ -39,6 +39,8 @@ xscreensaver - graphics hack and screen locker, launched when the user is idle
 [\-no\-sgi\-extension] \
 [\-xidle\-extension] \
 [\-no\-xidle\-extension] \
+[\-proc\-interrupts] \
+[\-no\-proc\-interrupts] \
 [\-xrm \fIresources\fP]
 .SH DESCRIPTION
 The \fIxscreensaver\fP program waits until the keyboard and mouse have been 
@@ -423,6 +425,24 @@ used to decide whether the user is idle.  This is the default
 if \fIxscreensaver\fP has been compiled with support for this extension.
 (This extension is only available for X11R4 and X11R5 systems, unfortunately.)
 .TP 8
+.B procInterrupts\fP (class \fBBoolean\fP)
+This resource controls whether the \fB/proc/interrupts\fP file should be
+consulted to decide whether the user is idle.  This is the default
+if \fIxscreensaver\fP has been compiled on a system which supports this
+mechanism (i.e., Linux systems.)  
+
+The benefit to doing this is that \fIxscreensaver\fP can note that the user
+is active even when the X console is not the active one: if the user is 
+typing in another virtual console, xscreensaver will notice that and will
+fail to activate.  For example, if you're playing Quake in VGA-mode, 
+xscreensaver won't wake up in the middle of your game and start competing 
+for CPU.
+
+The drawback to doing this is that perhaps you \fIreally do\fP want idleness
+on the X console to cause the X display to lock, even if there is activity
+on other virtual consoles.  If you want that, then set this option to False.
+(Or just lock the X console manually.)
+.TP 8
 .B overlayStderr\fP (class \fBBoolean\fP)
 If \fBcaptureStderr\fP is True, and your server supports ``overlay'' visuals,
 then the text will be written into one of the higher layers instead of into
@@ -520,6 +540,12 @@ Same as setting the \fIxidleExtension\fP resource to \fItrue\fP.
 .B \-no\-xidle\-extension
 Same as setting the \fIxidleExtension\fP resource to \fIfalse\fP.
 .TP 8
+.B \-proc\-interrupts
+Same as setting the \fIprocInterrupts\fP resource to \fItrue\fP.
+.TP 8
+.B \-no\-proc\-interrupts
+Same as setting the \fIprocInterrupts\fP resource to \fIfalse\fP.
+.TP 8
 .B \-xrm \fIresource-specification\fP
 As with all other Xt programs, you can specify X resources on the command-line
 using the \fI\-xrm\fP argument.  Most of the interesting resources have 
@@ -948,7 +974,7 @@ unlock the screen.
 
 This is a design flaw in PAM (there is no way for a client to tell the
 difference between PAM responding ``I have never heard of your module,''
-and responding, ``you typed the wrong password.''  As far as I can tell,
+and responding, ``you typed the wrong password.'')  As far as I can tell,
 there is no way for xscreensaver to automatically work around this, or
 detect the problem in advance, so if you have PAM, make sure it is
 configured correctly!
@@ -1028,17 +1054,6 @@ periodically, like
 or
 .BR xload (1).
 .TP 8
-.B Doom and Quake
-On some systems, Doom, Quake, and other games intercept the keyboard in
-ways that X programs can never detect.  Therefore, when running these games,
-xscreensaver might think the console is idle, and activate.  In the worst
-case, xscreensaver might blank the screen and mess up the game.  Alternately,
-xscreensaver might activate on the X display while leaving the game visible,
-and merely cause the game to slow down.
-
-I don't know how to fix this, because I don't know how to detect the kind 
-of keyboard activity that occurs during these games.  Suggestions are welcome.
-.TP 8
 .B Latency and Responsiveness
 If the subprocess is drawing too quickly and the connection to the X
 server is a slow one (such as an X terminal running over a phone line) then 
index cd3b1752f32e6ac3dd59e70bf943deab438b3a80..7f758c6688fdd5f7c162009c2c6b144bed109e7f 100644 (file)
@@ -81,7 +81,7 @@ SRCS          = attraction.c blitspin.c bouboule.c braid.c bubbles.c \
                  rotor.c ant.c xjack.c xlyap.c jigsaw.c xscreensaver-sgigl.c \
                  cynosure.c moire2.c flow.c epicycle.c interference.c \
                  truchet.c bsod.c crystal.c discrete.c distort.c kumppa.c \
-                 sonar.c demon.c loop.c t3d.c
+                 sonar.c demon.c loop.c t3d.c penetrate.c deluxe.c
 
 OBJS           = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  bubbles-default.o decayscreen.o deco.o drift.o flag.o \
@@ -96,7 +96,7 @@ OBJS          = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  rotor.o ant.o xjack.o xlyap.o jigsaw.o xscreensaver-sgigl.o \
                  cynosure.o moire2.o flow.o epicycle.o interference.o \
                  truchet.o bsod.o crystal.o discrete.o distort.o kumppa.o \
-                 sonar.o demon.o loop.o t3d.o
+                 sonar.o demon.o loop.o t3d.o penetrate.o deluxe.o
 
 EXES           = attraction blitspin bouboule braid bubbles decayscreen deco \
                  drift flag flame forest vines galaxy grav greynetic halo \
@@ -107,7 +107,7 @@ EXES                = attraction blitspin bouboule braid bubbles decayscreen deco \
                  fadeplot rd-bomb coral mountain triangle lissie worm rotor \
                  ant xjack xlyap jigsaw cynosure moire2 flow epicycle \
                  interference truchet bsod crystal discrete distort kumppa \
-                 sonar demon loop t3d
+                 sonar demon loop t3d penetrate deluxe
 
 HACK_OBJS_1    = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
                  $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@
@@ -462,6 +462,12 @@ sonar:             sonar.o         $(HACK_OBJS) $(COL)
 t3d:           t3d.o           $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
+penetrate:     penetrate.o     $(HACK_OBJS) $(COL)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
+
+deluxe:                deluxe.o        $(HACK_OBJS) $(COL)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
+
 
 # The rules for those hacks which follow the `xlockmore' API.
 #
@@ -1483,4 +1489,22 @@ t3d.o: $(UTILS_SRC)/hsv.h
 t3d.o: $(UTILS_SRC)/colors.h
 t3d.o: $(UTILS_SRC)/grabscreen.h
 t3d.o: $(UTILS_SRC)/visual.h
+penetrate.o: $(srcdir)/screenhack.h
+penetrate.o: ../config.h
+penetrate.o: $(UTILS_SRC)/yarandom.h
+penetrate.o: $(UTILS_SRC)/usleep.h
+penetrate.o: $(UTILS_SRC)/resources.h
+penetrate.o: $(UTILS_SRC)/hsv.h
+penetrate.o: $(UTILS_SRC)/colors.h
+penetrate.o: $(UTILS_SRC)/grabscreen.h
+penetrate.o: $(UTILS_SRC)/visual.h
+deluxe.o: $(srcdir)/screenhack.h
+deluxe.o: ../config.h
+deluxe.o: $(UTILS_SRC)/yarandom.h
+deluxe.o: $(UTILS_SRC)/usleep.h
+deluxe.o: $(UTILS_SRC)/resources.h
+deluxe.o: $(UTILS_SRC)/hsv.h
+deluxe.o: $(UTILS_SRC)/colors.h
+deluxe.o: $(UTILS_SRC)/grabscreen.h
+deluxe.o: $(UTILS_SRC)/visual.h
 
index 4e3516059a3e373413111fab029cbf99597c0420..2fd27c0eee092c20a18ca61111ad93103a716fe4 100644 (file)
@@ -474,7 +474,7 @@ amiga (Display *dpy, Window window, int delay)
   int height;
   unsigned long fg, bg, bg2;
   Pixmap pixmap = 0;
-  int pix_w, pix_h;
+  int pix_w = 0, pix_h = 0;
 
   const char *string =
     ("_Software failure.  Press left mouse button to continue.\n"
index ddd0a496738a5e4e585dbbd2735d6cd618ca66f1..573ee3d43ac555d8ff7108e9171edd91af3bcc05 100644 (file)
@@ -11,6 +11,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CYNOSURE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECO.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DELUXE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DEMON.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISCRETE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISTORT.C
@@ -49,6 +50,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MUNCH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NOSEGUY.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PEDAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENETRATE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENROSE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PYRO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) QIX.C
index ddd0a496738a5e4e585dbbd2735d6cd618ca66f1..573ee3d43ac555d8ff7108e9171edd91af3bcc05 100644 (file)
@@ -11,6 +11,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CYNOSURE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECO.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DELUXE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DEMON.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISCRETE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISTORT.C
@@ -49,6 +50,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MUNCH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NOSEGUY.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PEDAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENETRATE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENROSE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PYRO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) QIX.C
diff --git a/hacks/deluxe.c b/hacks/deluxe.c
new file mode 100644 (file)
index 0000000..aced3ef
--- /dev/null
@@ -0,0 +1,280 @@
+/* xscreensaver, Copyright (c) 1999 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+#include <math.h>
+#include "screenhack.h"
+
+#define countof(x) (sizeof(x)/sizeof(*(x)))
+#define ABS(x) ((x)<0?-(x):(x))
+
+struct throbber {
+  int x, y;
+  int size;
+  int max_size;
+  int thickness;
+  int speed;
+  int fuse;
+  GC gc;
+  void (*draw) (Display *, Drawable, struct throbber *);
+};
+
+static void
+draw_star (Display *dpy, Drawable w, struct throbber *t)
+{
+  XPoint points[11];
+  int x = t->x;
+  int y = t->y;
+  int s = t->size / 0.383;  /* trial and error, I forget how to derive this */
+  int s2 = t->size;
+  double c = M_PI * 2;
+  double o = -M_PI / 2;
+
+  points[0].x = x + s  * cos(o + 0.0*c); points[0].y = y + s  * sin(o + 0.0*c);
+  points[1].x = x + s2 * cos(o + 0.1*c); points[1].y = y + s2 * sin(o + 0.1*c);
+  points[2].x = x + s  * cos(o + 0.2*c); points[2].y = y + s  * sin(o + 0.2*c);
+  points[3].x = x + s2 * cos(o + 0.3*c); points[3].y = y + s2 * sin(o + 0.3*c);
+  points[4].x = x + s  * cos(o + 0.4*c); points[4].y = y + s  * sin(o + 0.4*c);
+  points[5].x = x + s2 * cos(o + 0.5*c); points[5].y = y + s2 * sin(o + 0.5*c);
+  points[6].x = x + s  * cos(o + 0.6*c); points[6].y = y + s  * sin(o + 0.6*c);
+  points[7].x = x + s2 * cos(o + 0.7*c); points[7].y = y + s2 * sin(o + 0.7*c);
+  points[8].x = x + s  * cos(o + 0.8*c); points[8].y = y + s  * sin(o + 0.8*c);
+  points[9].x = x + s2 * cos(o + 0.9*c); points[9].y = y + s2 * sin(o + 0.9*c);
+  points[10] = points[0];
+
+  XDrawLines (dpy, w, t->gc, points, countof(points), CoordModeOrigin);
+}
+
+static void
+draw_circle (Display *dpy, Drawable w, struct throbber *t)
+{
+  XDrawArc (dpy, w, t->gc,
+            t->x - t->size / 2,
+            t->y - t->size / 2,
+            t->size, t->size,
+            0, 360*64);
+}
+
+static void
+draw_hlines (Display *dpy, Drawable w, struct throbber *t)
+{
+  XDrawLine (dpy, w, t->gc, 0,
+             t->y - t->size, t->max_size,
+             t->y - t->size);
+  XDrawLine (dpy, w, t->gc, 0,
+             t->y + t->size, t->max_size,
+             t->y + t->size);
+}
+
+static void
+draw_vlines (Display *dpy, Drawable w, struct throbber *t)
+{
+  XDrawLine (dpy, w, t->gc,
+             t->x - t->size, 0,
+             t->x - t->size, t->max_size);
+  XDrawLine (dpy, w, t->gc,
+             t->x + t->size, 0,
+             t->x + t->size, t->max_size);
+}
+
+static void
+draw_corners (Display *dpy, Drawable w, struct throbber *t)
+{
+  int s = (t->size + t->thickness) / 2;
+  XPoint points[3];
+
+  points[0].x = 0;        points[0].y = t->y - s;
+  points[1].x = t->x - s; points[1].y = t->y - s;
+  points[2].x = t->x - s; points[2].y = 0;
+  XDrawLines (dpy, w, t->gc, points, countof(points), CoordModeOrigin);
+
+  points[0].x = 0;        points[0].y = t->y + s;
+  points[1].x = t->x - s; points[1].y = t->y + s;
+  points[2].x = t->x - s; points[2].y = t->max_size;
+  XDrawLines (dpy, w, t->gc, points, countof(points), CoordModeOrigin);
+
+  points[0].x = t->x + s;    points[0].y = 0;
+  points[1].x = t->x + s;    points[1].y = t->y - s;
+  points[2].x = t->max_size; points[2].y = t->y - s;
+  XDrawLines (dpy, w, t->gc, points, countof(points), CoordModeOrigin);
+
+  points[0].x = t->x + s;    points[0].y = t->max_size;
+  points[1].x = t->x + s;    points[1].y = t->y + s;
+  points[2].x = t->max_size; points[2].y = t->y + s;
+  XDrawLines (dpy, w, t->gc, points, countof(points), CoordModeOrigin);
+}
+
+
+static struct throbber *
+make_throbber (Display *dpy, Drawable d, int w, int h, unsigned long pixel)
+{
+  XGCValues gcv;
+  struct throbber *t = (struct throbber *) malloc (sizeof (*t));
+  t->x = w / 2;
+  t->y = h / 2;
+  t->max_size = w;
+  t->speed = get_integer_resource ("speed", "Speed");
+  t->fuse = 1 + (random() % 4);
+  t->thickness = get_integer_resource ("thickness", "Thickness");
+
+  if (t->speed < 0) t->speed = -t->speed;
+  t->speed += (((random() % t->speed) / 2) - (t->speed / 2));
+  if (t->speed > 0) t->speed = -t->speed;
+
+  if (random() % 4)
+    t->size = t->max_size;
+  else
+    t->size = t->thickness, t->speed = -t->speed;
+
+  gcv.foreground = pixel;
+  gcv.line_width = t->thickness;
+  gcv.line_style = LineSolid;
+  gcv.cap_style = CapProjecting;
+  gcv.join_style = JoinMiter;
+  t->gc = XCreateGC (dpy, d,
+                     (GCForeground|GCLineWidth|GCLineStyle|
+                      GCCapStyle|GCJoinStyle),
+                     &gcv);
+
+  switch (random() % 11) {
+  case 0: case 1: case 2: case 3: t->draw = draw_star; break;
+  case 4: case 5: case 6: case 7: t->draw = draw_circle; break;
+  case 8: t->draw = draw_hlines; break;
+  case 9: t->draw = draw_vlines; break;
+  case 10: t->draw = draw_corners; break;
+  default: abort(); break;
+  }
+
+  return t;
+}
+
+static int
+throb (Display *dpy, Drawable window, struct throbber *t)
+{
+  t->size += t->speed;
+  if (t->size <= (t->thickness / 2))
+    {
+      t->speed = -t->speed;
+      t->size += (t->speed * 2);
+    }
+  else if (t->size > t->max_size)
+    {
+      t->speed = -t->speed;
+      t->size += (t->speed * 2);
+      t->fuse--;
+    }
+
+  if (t->fuse <= 0)
+    {
+      XFreeGC (dpy, t->gc);
+      memset (t, 0, sizeof(*t));
+      free (t);
+      return -1;
+    }
+  else
+    {
+      t->draw (dpy, window, t);
+      return 0;
+    }
+}
+
+
+\f
+char *progclass = "Deluxe";
+
+char *defaults [] = {
+  ".background:                black",
+  ".foreground:                white",
+  "*delay:             5000",
+  "*count:             5",
+  "*thickness:         50",
+  "*speed:             15",
+  "*ncolors:           20",
+  "*doubleBuffer:      True",
+  0
+};
+
+XrmOptionDescRec options [] = {
+  { "-delay",          ".delay",       XrmoptionSepArg, 0 },
+  { "-thickness",      ".thickness",   XrmoptionSepArg, 0 },
+  { "-count",          ".count",       XrmoptionSepArg, 0 },
+  { "-ncolors",                ".ncolors",     XrmoptionSepArg, 0 },
+  { "-speed",          ".speed",       XrmoptionSepArg, 0 },
+  { 0, 0, 0, 0 }
+};
+
+void
+screenhack (Display *dpy, Window window)
+{
+  int count = get_integer_resource ("count", "Integer");
+  int delay = get_integer_resource ("delay", "Integer");
+  int ncolors = get_integer_resource ("ncolors", "Integer");
+  Bool dbuf = get_boolean_resource ("doubleBuffer", "Boolean");
+  XColor colors[255];
+  XGCValues gcv;
+  GC erase_gc = 0;
+  int i;
+  struct throbber **throbbers;
+  XWindowAttributes xgwa;
+  Pixmap b=0, ba=0, bb=0;      /* double-buffer to reduce flicker */
+
+  XGetWindowAttributes (dpy, window, &xgwa);
+  make_random_colormap (dpy, xgwa.visual, xgwa.colormap,
+                        colors, &ncolors, True, True, 0, True);
+
+  if (dbuf)
+    {
+      ba = XCreatePixmap (dpy, window, xgwa.width, xgwa.height, xgwa.depth);
+      bb = XCreatePixmap (dpy, window, xgwa.width, xgwa.height, xgwa.depth);
+      b = ba;
+    }
+  else
+    {
+      b = window;
+    }
+
+  throbbers = (struct throbber **) calloc (count, sizeof(struct throbber *));
+  for (i = 0; i < count; i++)
+    throbbers[i] = make_throbber (dpy, b, xgwa.width, xgwa.height,
+                                  colors[random() % ncolors].pixel);
+
+  if (dbuf)
+    {
+      gcv.foreground = get_pixel_resource ("background", "Background",
+                                           dpy, xgwa.colormap);
+      erase_gc = XCreateGC (dpy, b, GCForeground, &gcv);
+      XFillRectangle (dpy, ba, erase_gc, 0, 0, xgwa.width, xgwa.height);
+      XFillRectangle (dpy, bb, erase_gc, 0, 0, xgwa.width, xgwa.height);
+    }
+
+  while (1)
+    {
+      if (dbuf)
+        XFillRectangle (dpy, b, erase_gc, 0, 0, xgwa.width, xgwa.height);
+      else
+        XClearWindow (dpy, b);
+
+      for (i = 0; i < count; i++)
+        if (throb (dpy, b, throbbers[i]) < 0)
+          throbbers[i] = make_throbber (dpy, b, xgwa.width, xgwa.height,
+                                        colors[random() % ncolors].pixel);
+      if (dbuf)
+        {
+          XCopyArea (dpy, b, window, erase_gc, 0, 0,
+                     xgwa.width, xgwa.height, 0, 0);
+          b = (b == ba ? bb : ba);
+        }
+
+      XSync (dpy, False);
+      screenhack_handle_events (dpy);
+      if (delay)
+        usleep (delay);
+    }
+}
index 84581c1487d9c5bef7a8e103c11070b3489ece39..db0255aefbbee22bdaf4dcaf5d7caf568b9a3cdc 100644 (file)
@@ -57,7 +57,7 @@ static const char sccsid[] = "@(#)demon.c     4.07 97/11/24 xlockmore";
                                        "*size:            -7 \n"       \
                                        "*ncolors:         64 \n"       \
                                        "*neighbors:    0 \n"
-# define UNIFORM_COLORS
+# define SMOOTH_COLORS
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
 # include "xlock.h"                    /* in xlockmore distribution */
index 682fa3c9f1502f736b9150ea71a8c4e2cfa89197..51425032904da7b0ca24c0ea883d3a4cb9424c2b 100644 (file)
@@ -5,6 +5,6 @@ but some of them use the utility functions found in the ../../utils/ directory.
 
 If you have compilation problems, check the parameters in ../../config.h.
 
-If you're looking for a free implementation of the OpenGL library, check 
-out <http://www.ssec.wisc.edu/~brianp/Mesa.html>.  For general OpenGL info,
-see <http://www.opengl.org/>.
+If you're looking for a free implementation of the OpenGL library, 
+check out <http://www.mesa3d.org/>.  For general OpenGL info, see
+<http://www.opengl.org/>.
index 4c582c9457dc3100fde847ea670626d99e482f19..52cb6b48935d27805d9db81b50c2a317da9d5527 100644 (file)
@@ -2,7 +2,7 @@
 .SH NAME
 lament - animates the Lament Configuration
 .SH SYNOPSIS
-.B goop
+.B lament
 [\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-texture] [\-no\-texture] [\-wireframe]
 .SH DESCRIPTION
 The \fIlament\fP program draws an animation of a particular puzzle box
index 9ea9f4e54204247a6b4c8ce8475b46c0283e802c..f0fa57f4a0247115e555ec6d300cd31ca24e7614 100644 (file)
@@ -542,7 +542,9 @@ get_words (void)
              sprintf (buf, "\"%s\" produced no output!", orig_program);
            else if (!first_time &&
                     (strstr (buf, ": not found") ||
-                     strstr (buf, ": Not found")))
+                     strstr (buf, ": Not found") ||
+                      strstr (buf, ": command not found") ||
+                      strstr (buf, ": Command not found")))
              switch (random () % 20)
                {
                case 1: strcat (buf, "( Get with the program, bub. )\n");
diff --git a/hacks/penetrate.c b/hacks/penetrate.c
new file mode 100644 (file)
index 0000000..2b104dc
--- /dev/null
@@ -0,0 +1,904 @@
+/* Copyright (c) 1999
+ *  Adam Miller adum@aya.yale.edu
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+
+ * penetrate simulates the arcade classic with the cities and the stuff
+ * shooting down from the sky and stuff. The computer plays against itself,
+ * desperately defending the forces of good against those thingies raining
+ * down. Bonus cities are awarded at ever-increasing intervals. Every five
+ * levels appears a bonus round. The computer player gets progressively
+ * more intelligent as the game progresses. Better aim, more economical with
+ * ammo, and better target selection. Points are in the bottom right, and
+ * high score is in the bottom left. Start with -smart to have the computer
+ * player skip the learning process.
+
+ */
+
+#include "screenhack.h"
+
+#define kSleepTime 10000
+
+#define font_height(font)              (font->ascent + font->descent)
+#define FONT_NAME                      "-*-times-*-*-*-*-80-*-*-*-*-*-*-*"
+
+#define kCityPause 500000
+#define kLevelPause 1
+#define SCORE_MISSILE 100
+#define kFirstBonus 5000
+#define kMinRate 30
+#define kMaxRadius 100
+
+static XFontStruct *font, *scoreFont;
+static GC draw_gc, erase_gc, level_gc;
+static unsigned int default_fg_pixel;
+static XColor scoreColor;
+
+int bgrowth;
+int lrate = 80, startlrate;
+long loop = 0;
+long score = 0, highscore = 0;
+long nextBonus = kFirstBonus;
+int numBonus = 0;
+int bround = 0;
+long lastLaser = 0;
+int gamez = 0;
+int aim = 180;
+int econpersen = 0;
+int choosypersen = 0;
+int carefulpersen = 0;
+int smart = 0;
+
+typedef struct {
+  int alive;
+  int x, y;
+  int startx, starty;
+  int endx, endy;
+  int dcity;
+  float pos;
+  int enemies;
+  int jenis;
+  int splits;
+  XColor color;
+} Missile;
+
+typedef struct {
+  int alive;
+  int x, y, rad, oflaser;
+  int max, outgoing;
+  XColor color;
+} Boom;
+
+typedef struct {
+  int alive;
+  int x;
+  XColor color;
+} City;
+
+typedef struct {
+  int alive;
+  int x, y;
+  int startx, starty;
+  int endx, endy;
+  int oldx, oldy;
+  float velx, vely, fposx, fposy;
+  float lenMul;
+  XColor color;
+  int target;
+} Laser;
+
+#define kMaxMissiles 256
+#define kMaxBooms 512
+#define kMaxLasers 128
+#define kBoomRad 40
+#define kNumCities 5
+
+#define kLaserLength 12
+
+#define kMissileSpeed 0.003
+#define kLaserSpeed (kMissileSpeed * 6)
+
+Missile missile[kMaxMissiles];
+Boom boom[kMaxBooms];
+City city[kNumCities];
+Laser laser[kMaxLasers];
+int blive[kNumCities];
+
+static void Explode(int x, int y, int max, XColor color, int oflaser)
+{
+  int i;
+  Boom *m = 0;
+  for (i=0;i<kMaxBooms;i++)
+        if (!boom[i].alive) {
+               m = &boom[i];
+               break;
+        }
+  if (!m)
+        return;
+
+  m->alive = 1;
+  m->x = x;
+  m->y = y;
+  m->rad = 0;
+  if (max > kMaxRadius)
+        max = kMaxRadius;
+  m->max = max;
+  m->outgoing = 1;
+  m->color = color;
+  m->oflaser = oflaser;
+}
+
+static void launch (int xlim, int ylim,
+       Display *dpy, Colormap cmap, int src)
+{
+  int i;
+  Missile *m = 0, *msrc;
+  for (i=0;i<kMaxMissiles;i++)
+        if (!missile[i].alive) {
+               m = &missile[i];
+               break;
+        }
+  if (!m)
+        return;
+
+  m->alive = 1;
+  m->startx = (random() % xlim);
+  m->starty = 0;
+  m->endy = ylim;
+  m->pos = 0.0;
+  m->jenis = random() % 360;
+  m->splits = 0;
+  if (m->jenis < 50) {
+        m->splits = random() % ((int) (ylim * 0.4));
+        if (m->splits < ylim * 0.08)
+               m->splits = 0;
+  }
+
+  /* special if we're from another missile */
+  if (src >= 0) {
+        int dc = random() % (kNumCities - 1);
+        msrc = &missile[src];
+        if (dc == msrc->dcity)
+               dc++;
+        m->dcity = dc;
+        m->startx = msrc->x;
+        m->starty = msrc->y;
+        if (m->starty > ylim * 0.4 || m->splits <= m->starty)
+               m->splits = 0;  /* too far down already */
+        m->jenis = msrc->jenis;
+  }
+  else
+        m->dcity = random() % kNumCities;
+  m->endx = city[m->dcity].x + (random() % 20) - 10;
+  m->x = m->startx;
+  m->y = m->starty;
+  m->enemies = 0;
+
+  if (!mono_p) {
+        hsv_to_rgb (m->jenis, 1.0, 1.0,
+                                        &m->color.red, &m->color.green, &m->color.blue);
+        m->color.flags = DoRed | DoGreen | DoBlue;
+        if (!XAllocColor (dpy, cmap, &m->color)) {
+               m->color.pixel = WhitePixel (dpy, DefaultScreen (dpy));
+               m->color.red = m->color.green = m->color.blue = 0xFFFF;
+        }
+  }
+}
+
+static int fire(int xlim, int ylim,
+       Display *dpy, Window window, Colormap cmap)
+{
+  int i, j, cnt = 0;
+  int dcity;
+  long dx, dy, ex, ey;
+  Missile *mis = 0;
+  Laser *m = 0;
+  int untargeted = 0;
+  int choosy = 0, economic = 0, careful = 0;
+  int suitor[kMaxMissiles];
+  int livecity = 0;
+  int ytargetmin = ylim * 0.75;
+  int deepest = 0;
+  int misnum = 0;
+
+  choosy = (random() % 100) < choosypersen;
+  economic = (random() % 100) < econpersen;
+  careful = (random() % 100) < carefulpersen;
+
+  /* count our cities */
+  for (i=0;i<kNumCities;i++)
+        livecity += city[i].alive;
+  if (livecity == 0)
+        return 1;  /* no guns */
+
+  for (i=0;i<kMaxLasers;i++)
+        if (!laser[i].alive) {
+               m = &laser[i];
+               break;
+        }
+  if (!m)
+        return 1;
+
+  /* if no missiles on target, no need to be choosy */
+  if (choosy) {
+        int choo = 0;
+        for (j=0;j<kMaxMissiles;j++) {
+               mis = &missile[j];
+               if (!mis->alive || (mis->y > ytargetmin))
+                 continue;
+               if (city[mis->dcity].alive)
+                 choo++;
+        }
+        if (choo == 0)
+               choosy = 0;
+  }
+
+  for (j=0;j<kMaxMissiles;j++) {
+        mis = &missile[j];
+        suitor[j] = 0;
+        if (!mis->alive || (mis->y > ytargetmin))
+               continue;
+        if (choosy && (city[mis->dcity].alive == 0))
+               continue;
+        cnt++;
+        suitor[j] = 1;
+  }
+
+  /* count missiles that are on target and not being targeted */
+  if (choosy && economic)
+        for (j=0;j<kMaxMissiles;j++)
+               if (suitor[j] && missile[j].enemies == 0)
+                 untargeted++;
+
+  if (economic)
+        for (j=0;j<kMaxMissiles;j++) {
+               if (suitor[j] && cnt > 1)
+                 if (missile[j].enemies > 0)
+                        if (missile[j].enemies > 1 || untargeted == 0) {
+                               suitor[j] = 0;
+                               cnt--;
+                        }
+               /* who's closest? biggest threat */
+               if (suitor[j] && missile[j].y > deepest)
+                 deepest = missile[j].y;
+        }
+
+  if (deepest > 0 && careful) {
+        /* only target deepest missile */
+        cnt = 1;
+        for (j=0;j<kMaxMissiles;j++)
+               if (suitor[j] && missile[j].y != deepest)
+                 suitor[j] = 0;
+  }
+
+  if (cnt == 0)
+        return 1;  /* no targets available */
+  cnt = random() % cnt;
+  for (j=0;j<kMaxMissiles;j++)
+        if (suitor[j])
+               if (cnt-- == 0) {
+                 mis = &missile[j];
+                 misnum = j;
+                 break;
+               }
+
+  if (mis == 0)
+        return 1;  /* shouldn't happen */
+
+  dcity = random() % livecity;
+  for (j=0;j<kNumCities;j++)
+        if (city[j].alive)
+               if (dcity-- == 0) {
+                 dcity = j;
+                 break;
+               }
+  m->startx = city[dcity].x;
+  m->starty = ylim;
+#define kExpHelp 0.2
+#define kSpeedDiff 3.5
+  ex = mis->startx + ((float) (mis->endx - mis->startx)) * (mis->pos + kExpHelp + (1.0 - mis->pos) / kSpeedDiff);
+  ey = mis->starty + ((float) (mis->endy - mis->starty)) * (mis->pos + kExpHelp + (1.0 - mis->pos) / kSpeedDiff);
+  m->endx = ex + random() % 16 - 8 + (random() % aim) - aim / 2;
+  m->endy = ey + random() % 16 - 8 + (random() % aim) - aim / 2;
+  if (ey > ylim * 0.75)
+        return 0;  /* too far down */
+  mis->enemies++;
+  m->target = misnum;
+  m->x = m->startx;
+  m->y = m->starty;
+  m->oldx = m->x;
+  m->oldy = m->y;
+  m->fposx = m->x;
+  m->fposy = m->y;
+  dx = (m->endx - m->x);
+  dy = (m->endy - m->y);
+  m->velx = dx / 100.0;
+  m->vely = dy / 100.0;
+  m->alive = 1;
+  /* m->lenMul = (kLaserLength * kLaserLength) / (m->velx * m->velx + m->vely * m->vely); */
+  m->lenMul = -(kLaserLength / m->vely);
+
+  if (!mono_p) {
+        m->color.blue = 0x0000;
+        m->color.green = 0xFFFF;
+        m->color.red = 0xFFFF;
+        m->color.flags = DoRed | DoGreen | DoBlue;
+        if (!XAllocColor (dpy, cmap, &m->color)) {
+               m->color.pixel = WhitePixel (dpy, DefaultScreen (dpy));
+               m->color.red = m->color.green = m->color.blue = 0xFFFF;
+        }
+  }
+  return 1;
+}
+
+static Colormap
+init_penetrate(Display *dpy, Window window)
+{
+  int i;
+  /*char *fontname =   "-*-new century schoolbook-*-r-*-*-*-380-*-*-*-*-*-*"; */
+  char *fontname =   "-*-courier-*-r-*-*-*-380-*-*-*-*-*-*";
+  char **list;
+  int foo;
+  Colormap cmap;
+  XGCValues gcv;
+  XWindowAttributes xgwa;
+  XGetWindowAttributes (dpy, window, &xgwa);
+  cmap = xgwa.colormap;
+
+  if (get_string_resource("smart","String")!=NULL && get_string_resource("smart","String")[0]!=0)
+        smart = 1;
+  bgrowth = get_integer_resource ("bgrowth", "Integer");
+  lrate = get_integer_resource ("lrate", "Integer");
+  if (bgrowth < 0) bgrowth = 2;
+  if (lrate < 0) lrate = 2;
+  startlrate = lrate;
+
+  if (!fontname || !(font = XLoadQueryFont(dpy, fontname))) {
+        list = XListFonts(dpy, FONT_NAME, 32767, &foo);
+        for (i = 0; i < foo; i++)
+               if ((font = XLoadQueryFont(dpy, list[i])))
+                 break;
+        if (!font) {
+               fprintf (stderr, "%s: Can't find a large font.", progname);
+           exit (1);
+        }
+        XFreeFontNames(list);
+  }
+
+  if (!(scoreFont = XLoadQueryFont(dpy, "-*-times-*-r-*-*-*-180-*-*-*-*-*-*")))
+        fprintf(stderr, "%s: Can't load Times font.", progname);
+
+  for (i = 0; i < kMaxMissiles; i++)
+    missile[i].alive = 0;
+
+  for (i = 0; i < kMaxLasers; i++)
+    laser[i].alive = 0;
+
+  for (i = 0; i < kMaxBooms; i++)
+    boom[i].alive = 0;
+
+  for (i = 0; i < kNumCities; i++) {
+        City *m = &city[i];
+    m->alive = 1;
+        m->color.red = m->color.green = m->color.blue = 0xFFFF;
+        m->color.blue = 0x1111; m->color.green = 0x8888;
+        m->color.flags = DoRed | DoGreen | DoBlue;
+        if (!XAllocColor (dpy, cmap, &m->color)) {
+               m->color.pixel = WhitePixel (dpy, DefaultScreen (dpy));
+               m->color.red = m->color.green = m->color.blue = 0xFFFF;
+        }
+  }
+
+  gcv.foreground = default_fg_pixel =
+    get_pixel_resource("foreground", "Foreground", dpy, cmap);
+  gcv.font = scoreFont->fid;
+  draw_gc = XCreateGC(dpy, window, GCForeground | GCFont, &gcv);
+  gcv.font = font->fid;
+  level_gc = XCreateGC(dpy, window, GCForeground | GCFont, &gcv);
+  XSetForeground (dpy, level_gc, city[0].color.pixel);
+  gcv.foreground = get_pixel_resource("background", "Background", dpy, cmap);
+  erase_gc = XCreateGC(dpy, window, GCForeground, &gcv);
+
+  /* make a gray color for score */
+  if (!mono_p) {
+        scoreColor.red = scoreColor.green = scoreColor.blue = 0xAAAA;
+        scoreColor.flags = DoRed | DoGreen | DoBlue;
+        if (!XAllocColor (dpy, cmap, &scoreColor)) {
+               scoreColor.pixel = WhitePixel (dpy, DefaultScreen (dpy));
+               scoreColor.red = scoreColor.green = scoreColor.blue = 0xFFFF;
+        }
+  }
+
+  XClearWindow(dpy, window);
+  return cmap;
+}
+
+static void DrawScore(Display *dpy, Window window, Colormap cmap, int xlim, int ylim)
+{
+  char buf[16];
+  int width, height;
+  sprintf(buf, "%ld", score);
+  width = XTextWidth(scoreFont, buf, strlen(buf));
+  height = font_height(scoreFont);
+  XSetForeground (dpy, draw_gc, scoreColor.pixel);
+  XFillRectangle(dpy, window, erase_gc,
+                                 xlim - width - 6, ylim - height - 2, width + 6, height + 2);
+  XDrawString(dpy, window, draw_gc, xlim - width - 2, ylim - 2,
+                   buf, strlen(buf));
+
+  sprintf(buf, "%ld", highscore);
+  width = XTextWidth(scoreFont, buf, strlen(buf));
+  XFillRectangle(dpy, window, erase_gc,
+                                 4, ylim - height - 2, width + 4, height + 2);
+  XDrawString(dpy, window, draw_gc, 4, ylim - 2,
+                   buf, strlen(buf));
+}
+
+static void AddScore(Display *dpy, Window window, Colormap cmap, int xlim, int ylim, long dif)
+{
+  int i, sumlive = 0;
+  for (i=0;i<kNumCities;i++)
+        sumlive += city[i].alive;
+  if (sumlive == 0)
+        return;   /* no cities, not possible to score */
+
+  score += dif;
+  if (score > highscore)
+        highscore = score;
+  DrawScore(dpy, window, cmap, xlim, ylim);
+}
+
+static void DrawCity(Display *dpy, Window window, Colormap cmap, int x, int y, XColor col)
+{
+        XSetForeground (dpy, draw_gc, col.pixel);
+        XFillRectangle(dpy, window, draw_gc,
+                                 x - 30, y - 40, 60, 40);
+        XFillRectangle(dpy, window, draw_gc,
+                                                x - 20, y - 50, 10, 10);
+        XFillRectangle(dpy, window, draw_gc,
+                                 x + 10, y - 50, 10, 10);
+}
+
+static void DrawCities(Display *dpy, Window window, Colormap cmap, int xlim, int ylim)
+{
+  int i, x;
+  for (i = 0; i < kNumCities; i++) {
+        City *m = &city[i];
+        if (!m->alive)
+               continue;
+        x = (i + 1) * (xlim / (kNumCities + 1));
+        m->x = x;
+
+        DrawCity(dpy, window, cmap, x, ylim, m->color);
+  }
+}
+
+static void LoopMissiles(Display *dpy, Window window, Colormap cmap, int xlim, int ylim)
+{
+  int i, j, max = 0;
+  for (i = 0; i < kMaxMissiles; i++) {
+        int old_x, old_y;
+        Missile *m = &missile[i];
+        if (!m->alive)
+               continue;
+        old_x = m->x;
+        old_y = m->y;
+        m->pos += kMissileSpeed;
+        m->x = m->startx + ((float) (m->endx - m->startx)) * m->pos;
+        m->y = m->starty + ((float) (m->endy - m->starty)) * m->pos;
+
+      /* erase old one */
+
+        XSetLineAttributes(dpy, draw_gc, 4, 0,0,0);
+    XSetForeground (dpy, draw_gc, m->color.pixel);
+        XDrawLine(dpy, window, draw_gc,
+                                 old_x, old_y, m->x, m->y);
+
+        /* maybe split off a new missile? */
+        if (m->splits && (m->y > m->splits)) {
+               m->splits = 0;
+               launch(xlim, ylim, dpy, cmap, i);
+        }
+        
+        if (m->y >= ylim) {
+               m->alive = 0;
+               if (city[m->dcity].alive) {
+                 city[m->dcity].alive = 0;
+                 Explode(m->x, m->y, kBoomRad * 2, m->color, 0);
+               }
+        }
+
+        /* check hitting explosions */
+        for (j=0;j<kMaxBooms;j++) {
+               Boom *b = &boom[j];
+               if (!b->alive)
+                 continue;
+               else {
+                 int dx = abs(m->x - b->x);
+                 int dy = abs(m->y - b->y);
+                 int r = b->rad + 2;
+                 if ((dx < r) && (dy < r))
+                        if (dx * dx + dy * dy < r * r) {
+                               m->alive = 0;
+                               max = b->max + bgrowth - kBoomRad;
+                               AddScore(dpy, window, cmap, xlim, ylim, SCORE_MISSILE);
+                 }
+               }
+        }
+
+        if (m->alive == 0) {
+               /* we just died */
+               Explode(m->x, m->y, kBoomRad + max, m->color, 0);
+               XSetLineAttributes(dpy, erase_gc, 5, 0,0,0);
+               XDrawLine(dpy, window, erase_gc,
+                                        m->startx, m->starty, m->x, m->y);             
+        }
+  }
+}
+
+static void LoopLasers(Display *dpy, Window window, Colormap cmap, int xlim, int ylim)
+{
+  int i, j, miny = ylim * 0.8;
+  int x, y;
+  for (i = 0; i < kMaxLasers; i++) {
+        Laser *m = &laser[i];
+        if (!m->alive)
+               continue;
+        m->fposx += m->velx;
+        m->fposy += m->vely;
+        m->x = m->fposx;
+        m->y = m->fposy;
+        
+        x = m->fposx + (-m->velx * m->lenMul);
+        y = m->fposy + (-m->vely * m->lenMul);
+
+        XSetLineAttributes(dpy, erase_gc, 4, 0,0,0);
+        XDrawLine(dpy, window, erase_gc,
+                                 x, y, m->oldx, m->oldy);              
+        m->oldx = x;
+        m->oldy = y;
+
+        XSetLineAttributes(dpy, draw_gc, 2, 0,0,0);
+    XSetForeground (dpy, draw_gc, m->color.pixel);
+        XDrawLine(dpy, window, draw_gc,
+                                 m->x, m->y, x, y);
+        
+        if (m->y < m->endy) {
+               m->alive = 0;
+        }
+
+        /* check hitting explosions */
+        if (m->y < miny)
+               for (j=0;j<kMaxBooms;j++) {
+                 Boom *b = &boom[j];
+                 if (!b->alive)
+                        continue;
+                 else {
+                        int dx = abs(m->x - b->x);
+                        int dy = abs(m->y - b->y);
+                        int r = b->rad + 2;
+                        if (b->oflaser)
+                               continue;
+                        if ((dx < r) && (dy < r))
+                               if (dx * dx + dy * dy < r * r) {
+                                 m->alive = 0;
+                                 /* one less enemy on this missile -- it probably didn't make it */
+                                 if (missile[m->target].alive)
+                                        missile[m->target].enemies--;
+                               }
+                 }
+               }
+        
+        if (m->alive == 0) {
+               /* we just died */
+               XDrawLine(dpy, window, erase_gc,
+                                 m->x, m->y, x, y);
+               Explode(m->x, m->y, kBoomRad, m->color, 1);
+        }
+  }
+}
+
+static void LoopBooms(Display *dpy, Window window, Colormap cmap, int xlim, int ylim)
+{
+  int i;
+  for (i = 0; i < kMaxBooms; i++) {
+        Boom *m = &boom[i];
+        if (!m->alive)
+               continue;
+        
+        if (loop & 1)
+               if (m->outgoing) {
+                 m->rad++;
+                 if (m->rad >= m->max)
+                        m->outgoing = 0;
+                 XSetLineAttributes(dpy, draw_gc, 1, 0,0,0);
+                 XSetForeground (dpy, draw_gc, m->color.pixel);
+                 XDrawArc(dpy, window, draw_gc, m->x - m->rad, m->y - m->rad, m->rad * 2, m->rad * 2, 0, 360 * 64);
+               }
+               else {
+                 XSetLineAttributes(dpy, erase_gc, 1, 0,0,0);
+                 XDrawArc(dpy, window, erase_gc, m->x - m->rad, m->y - m->rad, m->rad * 2, m->rad * 2, 0, 360 * 64);
+                 m->rad--;
+                 if (m->rad <= 0)
+                        m->alive = 0;
+               }
+  }
+}
+
+int level = 0, levMissiles, levFreq;
+
+/* after they die, let's change a few things */
+static void Improve(void)
+{
+  if (smart)
+        return;
+  if (level > 20)
+        return;  /* no need, really */
+  aim -= 4;
+  if (level <= 2) aim -= 8;
+  if (level <= 5) aim -= 6;
+  if (gamez < 3)
+        aim -= 10;
+  carefulpersen += 6;
+  choosypersen += 4;
+  if (level <= 5) choosypersen += 3;
+  econpersen += 4;
+  lrate -= 2;
+  if (startlrate < kMinRate) {
+        if (lrate < startlrate)
+               lrate = startlrate;
+  }
+  else {
+        if (lrate < kMinRate)
+               lrate = kMinRate;
+  }
+  if (level <= 5) econpersen += 3;
+  if (aim < 1) aim = 1;
+  if (choosypersen > 100) choosypersen = 100;
+  if (carefulpersen > 100) carefulpersen = 100;
+  if (econpersen > 100) econpersen = 100;
+}
+
+static void NewLevel(Display *dpy, Window window, Colormap cmap, int xlim, int ylim)
+{
+  char buf[32];
+  int width, i, sumlive = 0;
+  int liv[kNumCities];
+  int freecity = 0;
+
+  if (level == 0) {
+        level++;
+        goto END_LEVEL;
+  }
+
+  /* check for a free city */
+  if (score >= nextBonus) {
+        numBonus++;
+        nextBonus += kFirstBonus * numBonus;
+        freecity = 1;
+  }
+
+  for (i=0;i<kNumCities;i++) {
+        if (bround)
+               city[i].alive = blive[i];
+        liv[i] = city[i].alive;
+        sumlive += liv[i];
+        if (!bround)
+               city[i].alive = 0;
+  }
+
+  /* print out screen */
+  XFillRectangle(dpy, window, erase_gc,
+                                 0, 0, xlim, ylim);
+  if (bround)
+        sprintf(buf, "Bonus Round Over");
+  else {
+        if (sumlive || freecity)
+               sprintf(buf, "Level %d Cleared", level);
+        else
+               sprintf(buf, "GAME OVER");
+  }
+  if (level > 0) {
+        width = XTextWidth(font, buf, strlen(buf));
+        XDrawString(dpy, window, level_gc, xlim / 2 - width / 2, ylim / 2 - font_height(font) / 2,
+                                        buf, strlen(buf));
+        XSync(dpy, True);
+        sleep(1);
+  }
+
+  if (!bround) {
+        if (sumlive || freecity) {
+               int sumwidth;
+               /* draw live cities */
+               XFillRectangle(dpy, window, erase_gc,
+                                                       0, ylim - 100, xlim, 100);
+
+               sprintf(buf, "X %ld", level * 100L);
+               /* how much they get */
+               sumwidth = XTextWidth(font, buf, strlen(buf));
+               /* add width of city */
+               sumwidth += 60;
+               /* add spacer */
+               sumwidth += 40;
+               DrawCity(dpy, window, cmap, xlim / 2 - sumwidth / 2 + 30, ylim * 0.70, city[0].color);
+               XDrawString(dpy, window, level_gc, xlim / 2 - sumwidth / 2 + 40 + 60, ylim * 0.7, buf, strlen(buf));
+               for (i=0;i<kNumCities;i++) {
+                 if (liv[i]) {
+                        city[i].alive = 1;
+                        AddScore(dpy, window, cmap, xlim, ylim, 100 * level);
+                        DrawCities(dpy, window, cmap, xlim, ylim);
+                        XSync(dpy, True);
+                        usleep(kCityPause);
+                 }
+               }
+        }
+        else {
+               /* we're dead */
+               sleep(3);
+               /* start new */
+               gamez++;
+               Improve();
+               for (i=0;i<kNumCities;i++)
+                 city[i].alive = 1;
+               level = 0;
+               loop = 1;
+               score = 0;
+               nextBonus = kFirstBonus;
+               numBonus = 0;
+               DrawCities(dpy, window, cmap, xlim, ylim);
+        }
+  }
+
+  /* do free city part */
+  if (freecity && sumlive < 5) {
+        int ncnt = random() % (5 - sumlive) + 1;
+        for (i=0;i<kNumCities;i++)
+               if (!city[i].alive)
+                 if (!--ncnt)
+                        city[i].alive = 1;
+        strcpy(buf, "Bonus City");
+        width = XTextWidth(font, buf, strlen(buf));
+        XDrawString(dpy, window, level_gc, xlim / 2 - width / 2, ylim / 4, buf, strlen(buf));
+        DrawCities(dpy, window, cmap, xlim, ylim);
+        XSync(dpy, True);
+        sleep(1);
+  }
+
+  XFillRectangle(dpy, window, erase_gc,
+                                         0, 0, xlim, ylim - 100);
+  
+  if (!bround)
+        level++;
+  if (level == 1) {
+        nextBonus = kFirstBonus;
+  }
+
+  if (level > 3 && (level % 5 == 1)) {
+        if (bround) {
+               bround = 0;
+               DrawCities(dpy, window, cmap, xlim, ylim);
+        }
+        else {
+               /* bonus round */
+               bround = 1;
+               levMissiles = 20 + level * 10;
+               levFreq = 10;
+               for (i=0;i<kNumCities;i++)
+                 blive[i] = city[i].alive;
+               sprintf(buf, "Bonus Round");
+               width = XTextWidth(font, buf, strlen(buf));
+               XDrawString(dpy, window, level_gc, xlim / 2 - width / 2, ylim / 2 - font_height(font) / 2, buf, strlen(buf));
+               XSync(dpy, True);
+               sleep(1);
+               XFillRectangle(dpy, window, erase_gc,
+                                                       0, 0, xlim, ylim - 100);
+        }
+  }
+
+ END_LEVEL: ;
+
+  if (!bround) {
+        levMissiles = 5 + level * 3;
+        if (level > 5)
+               levMissiles += level * 5;
+        /*  levMissiles = 2; */
+        levFreq = 120 - level * 5;
+        if (levFreq < 30)
+               levFreq = 30;
+  }
+
+  /* ready to fire */
+  lastLaser = 0;
+}
+
+static void penetrate(Display *dpy, Window window, Colormap cmap)
+{
+  XWindowAttributes xgwa;
+  static int xlim, ylim;
+
+  XGetWindowAttributes(dpy, window, &xgwa);
+  xlim = xgwa.width;
+  ylim = xgwa.height;
+
+  /* see if just started */
+  if (loop == 0) {
+        if (smart) {
+               choosypersen = econpersen = carefulpersen = 100;
+               lrate = kMinRate; aim = 1;
+        }
+        NewLevel(dpy, window, cmap, xlim, ylim);
+        DrawScore(dpy, window, cmap, xlim, ylim);
+  }
+
+  loop++;
+
+  if (levMissiles == 0) {
+        /* see if anything's still on the screen, to know when to end level */
+        int i;
+        for (i=0;i<kMaxMissiles;i++)
+               if (missile[i].alive)
+                 goto END_CHECK;
+        for (i=0;i<kMaxBooms;i++)
+               if (boom[i].alive)
+                 goto END_CHECK;
+        for (i=0;i<kMaxLasers;i++)
+               if (laser[i].alive)
+                 goto END_CHECK;
+        /* okay, nothing's alive, start end of level countdown */
+        sleep(kLevelPause);
+        NewLevel(dpy, window, cmap, xlim, ylim);
+        return;
+  END_CHECK: ;
+  }
+  else if ((random() % levFreq) == 0) {
+        launch(xlim, ylim, dpy, cmap, -1);
+        levMissiles--;
+  }
+
+  if (loop - lastLaser >= lrate) {
+        if (fire(xlim, ylim, dpy, window, cmap))
+               lastLaser = loop;
+  }
+
+  XSync(dpy, True);
+  if (kSleepTime)
+        usleep(kSleepTime);
+
+  if ((loop & 7) == 0)
+        DrawCities(dpy, window, cmap, xlim, ylim);
+  LoopMissiles(dpy, window, cmap, xlim, ylim);
+  LoopLasers(dpy, window, cmap, xlim, ylim);
+  LoopBooms(dpy, window, cmap, xlim, ylim);
+}
+
+char *progclass = "Penetrate";
+
+char *defaults [] = {
+  ".background:        black",
+  ".foreground:        white",
+  "*bgrowth:   5",
+  "*lrate:     80",
+  "*geometry:  800x500",
+  0
+};
+
+XrmOptionDescRec options [] = {
+  { "-bgrowth",                ".bgrowth",     XrmoptionSepArg, 0 },
+  { "-lrate",          ".lrate",       XrmoptionSepArg, 0 },
+       {"-smart", ".smart", XrmoptionIsArg,0},
+  { 0, 0, 0, 0 }
+};
+
+void
+screenhack (Display *dpy, Window window)
+{
+  Colormap cmap = init_penetrate(dpy, window);
+  while (1)
+    penetrate(dpy, window, cmap);
+}
index 5ea1598c54efe007530ea299307c6151fe22f471..bfd2706c8c5aa5ba90324acd199948807a25ccfe 100644 (file)
@@ -270,8 +270,9 @@ initialise_image(ModeInfo * mi, SWIRL_P swirl)
          swirl->ximage = XCreateImage(dpy, swirl->visual, swirl->rdepth, ZPixmap,
                                                                   0, 0, swirl->width, swirl->height,
                                                                   8, 0);
-         swirl->ximage->data = swirl->image =
-               (char *) calloc(swirl->height, swirl->ximage->bytes_per_line);
+         swirl->image = (unsigned char *)
+        calloc(swirl->height, swirl->ximage->bytes_per_line);
+      swirl->ximage->data = (char *) swirl->image;
        }
 }
 
index ae0396e514ae94222b364dfbc7cbc9940ffae1c6..58ec47f2bf01ae96dfe8b35326ece537e09350b8 100644 (file)
                           of the command-line options provided by screenhack.c.
 */
 
-#undef FASTDRAW
+#define FASTDRAW
+#define FASTCOPY
 #undef USE_POLYGON
 
-#ifdef FASTDRAW
-# define FASTCOPY
-#endif
-
 #include <stdio.h>
 #include <math.h>
+#include <time.h> /* for localtime() and gettimeofday() */
 
 #include "screenhack.h"
 
@@ -136,11 +134,17 @@ static double
 gettime (void)
 {
   struct timeval time1;
-  struct timezone zone1;
   struct tm *zeit;
-  
+  time_t lt;
+
+#ifdef GETTIMEOFDAY_TWO_ARGS
+  struct timezone zone1;
   gettimeofday(&time1,&zone1);
-  zeit=localtime(&time1.tv_sec);
+#else
+  gettimeofday(&time1);
+#endif
+  lt = time1.tv_sec;   /* avoid type cast lossage */
+  zeit=localtime(&lt);
   
   return (zeit->tm_sec+60*(zeit->tm_min+60*(zeit->tm_hour))
          + time1.tv_usec*1.0E-6);
@@ -251,9 +255,13 @@ initialize (void)
   scrnWidth = xgwa.width;
   scrnHeight = xgwa.height;
 
-  cycle = 60.0 / get_float_resource ("cycle", "Float");
-  movef = get_float_resource ("move", "Float") / 2;
-  wobber *= get_float_resource ("wobble", "Float");
+  {
+    float f = get_float_resource ("cycle", "Float");
+    if (f <= 0 || f > 60) f = 6.0;
+    cycle = 60.0 / f;
+  }
+  movef = get_float_resource ("move", "Float");
+  wobber = get_float_resource ("wobble", "Float");
 
   {
     double magfac = get_float_resource ("mag", "Float");
@@ -265,7 +273,7 @@ initialize (void)
     minutes=1; maxk+=60-24;
   }
 
-  timewait = get_integer_resource ("wait", "Integer");
+  timewait = get_integer_resource ("delay", "Integer");
   fastch = get_integer_resource ("fast", "Integer");
   cycl = get_boolean_resource ("colcycle", "Integer");
   hsvcycl = get_float_resource ("hsvcycle", "Integer");
@@ -296,13 +304,6 @@ initialize (void)
   if (fastch>maxfast)
                fastch=maxfast;
   
-#ifdef PRTDBX
-  printf("Set options:\ndisplay: '%s'\ngeometry: '%s'\n",display,geometry);
-  printf("move\t%.2f\nwobber\t%.2f\nmag\t%.2f\ncycle\t%.4f\n",
-        movef,wobber,mag/10,cycle);
-  printf("nice\t%i\nfast\t%i\nmarks\t%i\nwait\t%i\n",niced,fastch,maxk,timewait);
-#endif
-  
   xgc=( XGCValues *) malloc(sizeof(XGCValues) );
   xorgc=( XGCValues *) malloc(sizeof(XGCValues) );
   xandgc=( XGCValues *) malloc(sizeof(XGCValues) );
@@ -348,6 +349,13 @@ initialize (void)
   XFillRectangle (dpy, fastmask   , gc, 0, 0, fastcw, fastch+1);
   
 #endif
+
+#ifdef PRTDBX
+  printf("move\t%.2f\nwobber\t%.2f\nmag\t%.2f\ncycle\t%.4f\n",
+        movef,wobber,mag/10,cycle);
+  printf("fast\t%i\nmarks\t%i\nwait\t%i\n",fastch,maxk,timewait);
+#endif
 }
 
 static void fill_kugel(int i, Pixmap buf, int setcol);
@@ -521,7 +529,7 @@ fill_kugel(int i, Pixmap buf, int setcol)
       XPutImage(dpy, buf, orgc, fastcircles[d-1], 0, 0,
                (int)(kugeln[i].x1)-d/2, (int)(kugeln[i].y1)-d/2, d, d);
 #      endif
-       }
+    }
   else
 #endif
     {
@@ -715,23 +723,46 @@ event_handler(void)
              starty=scrnHeight/2;
              scrnH2=startx;
              scrnW2=starty;
-           }; break;
+           };
+          break;
+
        case KeyPress:
          {
            KeySym kpr=XKeycodeToKeysym(dpy,event.xkey.keycode,0);
-           if (kpr=='s') /* s */
-             vspeed=0.5;
-           if (kpr=='a')
-             vspeed=-0.3;
-           if (kpr=='q')
-             {
-               speed=0;vspeed=0;
-             }
-           /*  printf("%i\n",event.xkey.keycode);*/
-           if (kpr=='z') mag*=1.02;
-           if (kpr=='x') mag/=1.02;
-         }
+
+            switch (kpr)
+              {
+              case 's': case 'S':
+                vspeed = 0.5;
+                break;
+              case 'a': case 'A':
+                vspeed = -0.3;
+                break;
+
+              case '0':
+                speed = 0;
+                vspeed = 0;
+                break;
+
+              case 'z': case 'Z':
+                mag *= 1.02;
+                break;
+
+              case 'x': case 'X':
+                mag /= 1.02;
+                break;
+
+              default:
+                screenhack_handle_event (dpy, &event);
+                break;
+              }
+          }
+
+        case ButtonPress: case ButtonRelease:
+          break;
+
        default:
+          screenhack_handle_event (dpy, &event);
          break;
        }
     }
@@ -754,10 +785,10 @@ char *defaults [] = {
   ".foreground:        white",
   "*move:      0.5",
   "*wobble:    2.0",
-  "*cycle:     6.0",
+  "*cycle:     10.0",
   "*mag:       1",
   "*minutes:   False",
-  "*timewait:   40000",
+  "*delay:      40000",
   "*fast:      50",
   "*ccycle:    False",
   "*hsvcycle:  0.0",
@@ -770,7 +801,7 @@ XrmOptionDescRec options [] = {
   { "-cycle",          ".cycle",       XrmoptionSepArg, 0 },
   { "-mag",            ".mag",         XrmoptionSepArg, 0 },
   { "-minutes",                ".minutes",     XrmoptionSepArg, 0 },
-  { "-timewait",       ".timewait",    XrmoptionSepArg, 0 },
+  { "-delay",          ".delay",       XrmoptionSepArg, 0 },
   { "-fast",           ".fast",        XrmoptionSepArg, 0 },
   { "-colcycle",       ".colcycle",    XrmoptionSepArg, 0 },
   { "-hsvcycle",       ".hsvcycle",    XrmoptionSepArg, 0 },
index c7755a0f49ad8ded4ad5f1b137718eaaa69ef2b4..54ef3fddc35adcdb0955c256cab8e72f23b74f2b 100644 (file)
@@ -25,17 +25,13 @@ to rotate to the left and the
 to rotate the view to the right. Use the
 .B middle mouse button
 to change the optical axis and the moving direction.
+.B 0
+(zero) will stop you.
 .B Q
-will stop you.
+quits.
 .PP
 .SH OPTIONS
 .TP
-.BI "-display " "host:dpy"
-Specifys the display in the usual way.
-.TP
-.BI "-geometry " "WxH+X+Y"
-Sets the size and location of the t3d window.
-.TP
 .BI "-move " "factor"
 Modifies the direction move of t3d. The clock looks 30 degrees*
 .I factor
@@ -46,20 +42,13 @@ Modifies the wobbling (sounds nice :-) of t3d by multiplying the
 default deformation of the clock with
 .I factor.
 .TP
-.BI "-nice " "factor"
-Renices t3d by
-.I factor
-because t3d uses your process time. The default renice factor is 20, so
-you can't do anything wrong with not renicing t3d. If you want more speed,
-you should set nice to a smaller value.
-.TP
 .B -minutes
 Shows one small ball for every minute, instead of one for every 2.5 minutes.
 .TP
 .BI "-mag " "factor"
-Changes the magnification of t3d. By default, t3d uses a 200x200 window. A
-.I factor
-of 2 means, it will use a 400x400 window.
+Changes the magnification of t3d. By default, t3d draws a 200x200 image.
+.I factor
+of 2 means, it will use a 400x400 image.
 .TP
 .BI "-cycle " "period"
 Sets the moving cycle to
index 506bb2739d5f2407b989fef7d05d3d12bf1d226e..d0c09e827dd3baef2f5ff2d9e19bd46db1b107c5 100644 (file)
--- a/setup.com
+++ b/setup.com
@@ -15,6 +15,7 @@ $ crystal     :== $'mydir'crystal
 $ cynosure     :== $'mydir'cynosure
 $ decayscreen  :== $'mydir'decayscreen
 $ deco         :== $'mydir'deco
+$ deluxe       :== $'mydir'deluxe
 $ demon                :== $'mydir'demon
 $ discrete     :== $'mydir'discrete
 $ distort      :== $'mydir'distort
@@ -53,6 +54,7 @@ $ mountain    :== $'mydir'mountain
 $ munch                :== $'mydir'munch
 $ noseguy      :== $'mydir'noseguy
 $ pedal                :== $'mydir'pedal
+$ penetrate    :== $'mydir'penetrate
 $ penrose      :== $'mydir'penrose
 $ pyro         :== $'mydir'pyro
 $ qix          :== $'mydir'qix
index 571f638e3784ae400598b80e1ce73449a1031dea..b15110c9c23a9eaad920871d63abd1a92612ba37 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
-       "@(#)xscreensaver 3.07 (02-Jan-99), by Jamie Zawinski (jwz@jwz.org)";
+       "@(#)xscreensaver 3.08 (15-Mar-99), by Jamie Zawinski (jwz@jwz.org)";
index ad30e2f888a330a758b93576662f16c2d1fadcde..c9498e5b0e18e39891744e845c27a6738db8afaa 100644 (file)
@@ -158,9 +158,9 @@ create_xshm_image (Display *dpy, Visual *visual,
          shmdt (shm_info->shmaddr);
          image = 0;
        }
-
 #ifdef DEBUG
-      fprintf(stderr, "%s: XShmAttach(dpy, shm_info) ==> True\n", progname);
+      else
+        fprintf(stderr, "%s: XShmAttach(dpy, shm_info) ==> True\n", progname);
 #endif
 
       XSync(dpy, False);
index 6d172881df2bfd7957eebde2e3da66709e52d03b..69790bdd216baf072a0f79ee12726039f5c79b50 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title:          xscreensaver
-Version:        3.07
-Entered-date:   04JAN99
+Version:        3.08
+Entered-date:   15MAR99
 Description:    A modular screen saver and locker for the X Window System.
                 Highly customizable: allows the use of any program that
                 can draw on the root window as a display mode.
@@ -10,16 +10,16 @@ Keywords:       screen saver, screen lock, lock, xlock, X11
 Author:         jwz@jwz.org (Jamie Zawinski)
 Maintained-by:  jwz@jwz.org (Jamie Zawinski)
 Primary-site:   http://www.jwz.org/xscreensaver/
-                1010K xscreensaver-3.07.tar.gz
-                27K  xscreensaver.README
+                1025K xscreensaver-3.08.tar.gz
+                28K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
-                1010K xscreensaver-3.07.tar.gz
-                27K  xscreensaver.README
+                1025K xscreensaver-3.08.tar.gz
+                28K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: ftp.x.org /contrib/applications/
-                1010K xscreensaver-3.07.tar.gz
-                27K  xscreensaver.README
+                1025K xscreensaver-3.08.tar.gz
+                28K  xscreensaver.README
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
                 BSDI, SCO, OSF1, Ultrix, VMS.
index bf5b664952ba9b0905b77bba63644e1ed67f6a74..0542d3fdd3bc8a68fd56207c609e4057420d9b2f 100644 (file)
@@ -1,7 +1,7 @@
 Name: xscreensaver
 Summary: X screen saver and locker
 Vendor: Jamie Zawinski <jwz@jwz.org>
-Version: 3.07
+Version: 3.08
 Release: 1
 URL: http://www.jwz.org/xscreensaver/
 Source: xscreensaver-%{version}.tar.gz
@@ -16,7 +16,9 @@ can draw on the root window as a display mode.
 More than 80 display modes are included in this package.
 
 %prep
+
 %setup -q
+
 %build
 
 ./configure --prefix=/usr/X11R6 \
@@ -25,11 +27,11 @@ make
 
 %install
 
-mkdir -p $RPM_BUILD_ROOT/usr/X11R6/bin
-mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/xscreensaver
-mkdir -p $RPM_BUILD_ROOT/usr/X11R6/man/man1
-mkdir -p $RPM_BUILD_ROOT/etc/X11/wmconfig
+# This is the only directory that "make install" won't make as needed
+# (since Linux uses /etc/pam.d/* and Solaris uses /etc/pam.conf).
+#
 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
+
 make  prefix=$RPM_BUILD_ROOT/usr/X11R6 \
       AD_DIR=$RPM_BUILD_ROOT/usr/X11R6/lib/X11/app-defaults \
      HACKDIR=$RPM_BUILD_ROOT/usr/X11R6/lib/xscreensaver \
@@ -47,6 +49,9 @@ install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT/usr/X11R6/bin
 #
 ( cd driver; make PAM_DIR=$RPM_BUILD_ROOT/etc/pam.d install-pam )
 
+# This is for wmconfig, a tool that generates init files for window managers.
+#
+mkdir -p $RPM_BUILD_ROOT/etc/X11/wmconfig
 cat > $RPM_BUILD_ROOT/etc/X11/wmconfig/xscreensaver <<EOF
 xscreensaver name "xscreensaver (1min timeout)"
 xscreensaver description "xscreensaver"
@@ -54,14 +59,31 @@ xscreensaver group "Amusements/Screen Savers"
 xscreensaver exec "xscreensaver -timeout 1 -cycle 1 &"
 EOF
 
+# This is for the GNOME desktop:
+#
+mkdir -p "$RPM_BUILD_ROOT/usr/share/apps/Amusements/Screen Savers"
+cat > "$RPM_BUILD_ROOT/usr/share/apps/Amusements/Screen Savers/xscreensaver.desktop" <<EOF
+[Desktop Entry]
+Name=xscreensaver (1min timeout)
+Description=xscreensaver
+Exec=xscreensaver -timeout 1 -cycle 1
+EOF
+
+# Make sure all files are readable by all, and writable only by owner.
+#
+chmod -R a+r,u+w,og-w $RPM_BUILD_ROOT
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
-/usr/X11R6/bin/*
-/usr/X11R6/lib/xscreensaver/*
-%config /usr/X11R6/lib/X11/app-defaults/*
-/usr/X11R6/man/man1/*
-%config(missingok) /etc/X11/wmconfig/*
-%config(missingok) /etc/pam.d/*
+
+%doc                README README.debugging
+                    /usr/X11R6/bin/*
+                    /usr/X11R6/lib/xscreensaver/*
+%config             /usr/X11R6/lib/X11/app-defaults/*
+                    /usr/X11R6/man/man1/*
+                    /etc/pam.d/*
+%config(missingok)  /etc/X11/wmconfig/*
+%config(missingok)  "/usr/share/apps/Amusements/Screen Savers/*"