http://ftp.x.org/contrib/applications/xscreensaver-2.23.tar.gz
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:26 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:26 +0000 (00:42 -0500)
-rw-r--r-- 1 zblaxell zblaxell 819372 Jun 20  1998 xscreensaver-2.23.tar.gz
dfe504a75427283d509383b79f6bfe5066ace1fb  xscreensaver-2.23.tar.gz

63 files changed:
README
config.h.in
configure
configure.in
driver/Makefile.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/demo.c
driver/lock.c
driver/subprocs.c
driver/timers.c
driver/windows.c
driver/xscreensaver-command.man
driver/xscreensaver.c
driver/xscreensaver.h
driver/xscreensaver.man
driver/xset.c
hacks/Makefile.in
hacks/attraction.c
hacks/blitspin.c
hacks/bsod.c
hacks/bubbles.c
hacks/compile_axp.com
hacks/compile_decc.com
hacks/coral.c
hacks/crystal.c [new file with mode: 0644]
hacks/cynosure.c
hacks/deco.c
hacks/discrete.c [new file with mode: 0644]
hacks/epicycle.c
hacks/flame.c
hacks/glx/Makefile.in
hacks/goop.c
hacks/greynetic.c
hacks/halo.c
hacks/helix.c
hacks/hypercube.c
hacks/imsmap.c
hacks/jigsaw.c
hacks/kaleidescope.c
hacks/lmorph.c
hacks/lmorph.man
hacks/maze.c
hacks/moire.c
hacks/moire2.c
hacks/munch.c
hacks/noseguy.c
hacks/pedal.c
hacks/pyro.c
hacks/qix.c
hacks/rd-bomb.c
hacks/rocks.c
hacks/rorschach.c
hacks/screenhack.c
hacks/slidescreen.c
hacks/starfish.c
hacks/xjack.c
hacks/xlockmore.h
hacks/xlyap.c
hacks/xroger-hack.c
setup.com
utils/version.h
xscreensaver.lsm

diff --git a/README b/README
index b2204503e1f3cb4bd1a634d2bc52645f107ab148..060af05c8c648387de4d6c259482f4f24069b6ce 100644 (file)
--- a/README
+++ b/README
@@ -143,6 +143,8 @@ window, which are pointed at by the screensaver's default resource settings.
    interference        - More groovy colored fields.
    truchet     - Nonrepeating planar tilings.
    bsod                - Simulates the system crashes of various other OSes.
    interference        - More groovy colored fields.
    truchet     - Nonrepeating planar tilings.
    bsod                - Simulates the system crashes of various other OSes.
+   crystal     - A kaleidoscope of moving polygons.
+   discrete    - Various fractal-ish "discrete map" forms.
    gears       - Draws interlocking rotating gears (GLX only.)
    morph3d     - Draws shiny shape-changing 3d forms (GLX only.)
    superquadrics - More shiny shape-changing 3d forms (GLX only.)
    gears       - Draws interlocking rotating gears (GLX only.)
    morph3d     - Draws shiny shape-changing 3d forms (GLX only.)
    superquadrics - More shiny shape-changing 3d forms (GLX only.)
@@ -185,6 +187,23 @@ http://people.netscape.com/jwz/xscreensaver/.
        -- Jamie Zawinski <jwz@netscape.com>
 
 \f
        -- Jamie Zawinski <jwz@netscape.com>
 
 \f
+Changes since 2.22:   * The fix for SGI's "scheme" nonsense broke things, and
+                       let the user's "*background" resource show through.
+                       Fixed it in a different way.
+Changes since 2.21:   * Added support for the DPMS server extension (Display
+                       Power Management System.)
+                     * Made configure advertize the --enable-subdir option a
+                       little more, since that seemed to cause some people
+                       stress.  Also, made that directory be built into the
+                       xscreensaver executable, as a hardcoded prefix to
+                       $PATH.  (Might help, shouldn't hurt.)
+                     * Made configure prefer the two-arg gettimeofday to the
+                       one-arg version, since AIX doesn't have any prototypes.
+                     * Made it work with Xaw3d (the 3D Athena library.)
+                     * Made "make install" create directories as necessary.
+                     * New version of lmorph from Sverre.
+                     * Added `crystal' and `discreet' hacks from xlockmore.
+                     * Added a new mode to `bsod'.
 Changes since 2.20:   * Made "xscreensaver-command -time" use different words.
                        (It now describes the two states as "screen blanked
                        since..."  and "screen non-blanked since..." instead of
 Changes since 2.20:   * Made "xscreensaver-command -time" use different words.
                        (It now describes the two states as "screen blanked
                        since..."  and "screen non-blanked since..." instead of
index f8aed5560f8882894c42556e11dba3434397bf7f..4ee2cd7a66fa7192cc258ec816ebd153af262e49 100644 (file)
  */
 #undef HAVE_SGI_VC_EXTENSION
 
  */
 #undef HAVE_SGI_VC_EXTENSION
 
+/*  Define this if you have the XDPMS extension.  This is standard on
+ *  sufficiently-recent XFree86 systems, and possibly elsewhere.  (It's
+ *  available if the file /usr/include/X11/extensions/dpms.h exists.)
+ */
+#undef HAVE_DPMS_EXTENSION
+
 
 /* *************************************************************************
                           CONFIGURING GRAPHICS TOOLKITS
 
 /* *************************************************************************
                           CONFIGURING GRAPHICS TOOLKITS
index a651f307526aeb52b88e7362778fb4d5c0b61d23..c983155e048aee8e2fb74053475f607088465f3d 100755 (executable)
--- a/configure
+++ b/configure
@@ -54,6 +54,10 @@ ac_help="$ac_help
                           extension, if possible (this is the default).
   --without-sgivc-ext     Do not compile in support for this extension."
 ac_help="$ac_help
                           extension, if possible (this is the default).
   --without-sgivc-ext     Do not compile in support for this extension."
 ac_help="$ac_help
+  --with-dpms-ext         Include support for the DPMS server extension,
+                          if possible (this is the default).
+  --without-dpms-ext      Do not compile in support for this extension."
+ac_help="$ac_help
 
 Toolkit options:
 
 
 Toolkit options:
 
@@ -641,7 +645,7 @@ 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
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:645: checking host system type" >&5
+echo "configure:649: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
 
 host_alias=$host
 case "$host_alias" in
@@ -665,7 +669,7 @@ 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
 # 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:669: checking for $ac_word" >&5
+echo "configure:673: 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 eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -694,7 +698,7 @@ 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
   # 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:698: checking for $ac_word" >&5
+echo "configure:702: 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 eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -742,7 +746,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:750: 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_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -752,11 +756,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 756 "configure"
+#line 760 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -776,12 +780,12 @@ 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: 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:780: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:784: 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 "$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:785: checking whether we are using GNU C" >&5
+echo "configure:789: 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
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -790,7 +794,7 @@ else
   yes;
 #endif
 EOF
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:794: \"$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:798: \"$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
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -805,7 +809,7 @@ if test $ac_cv_prog_gcc = yes; then
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:809: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:813: 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
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -835,7 +839,7 @@ fi
 
 if test -z "$GCC"; then
   echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
 
 if test -z "$GCC"; then
   echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
-echo "configure:839: checking how to request ANSI compilation" >&5
+echo "configure:843: checking how to request ANSI compilation" >&5
   case "$host" in
     *-hpux*)
       echo "$ac_t""HPUX: adding -Ae" 1>&6
   case "$host" in
     *-hpux*)
       echo "$ac_t""HPUX: adding -Ae" 1>&6
@@ -857,16 +861,16 @@ fi
 
 
 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
 
 
 echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
-echo "configure:861: checking whether the compiler works on ANSI C" >&5
+echo "configure:865: 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
 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 866 "configure"
+#line 870 "configure"
 #include "confdefs.h"
  main(int ac, char **av) { return 0; } 
 EOF
 #include "confdefs.h"
  main(int ac, char **av) { return 0; } 
 EOF
-if { (eval echo configure:870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   echo "$ac_t""yes" 1>&6
 else
 then
   echo "$ac_t""yes" 1>&6
 else
@@ -895,7 +899,7 @@ esac
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:899: checking how to run the C preprocessor" >&5
+echo "configure:903: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -910,13 +914,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 914 "configure"
+#line 918 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -927,13 +931,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 931 "configure"
+#line 935 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -966,7 +970,7 @@ echo "$ac_t""$CPP" 1>&6
 # 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
 # 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:970: checking for a BSD compatible install" >&5
+echo "configure:974: 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
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1016,7 +1020,7 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1020: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1024: 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
 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
@@ -1044,12 +1048,12 @@ fi
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1048: checking for working const" >&5
+echo "configure:1052: 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
 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 1053 "configure"
+#line 1057 "configure"
 #include "confdefs.h"
 
 int main() {
 #include "confdefs.h"
 
 int main() {
@@ -1098,7 +1102,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:1102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1119,21 +1123,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1123: checking for inline" >&5
+echo "configure:1127: 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
 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 1130 "configure"
+#line 1134 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1160,12 +1164,12 @@ esac
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1164: checking for ANSI C header files" >&5
+echo "configure:1168: 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
 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 1169 "configure"
+#line 1173 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1173,7 +1177,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1190,7 +1194,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
 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 1194 "configure"
+#line 1198 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1208,7 +1212,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
 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 1212 "configure"
+#line 1216 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1229,7 +1233,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1233 "configure"
+#line 1237 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1240,7 +1244,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
 exit (0); }
 
 EOF
-if { (eval echo configure:1244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
 then
   :
 else
@@ -1264,12 +1268,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1268: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1272: 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
 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 1273 "configure"
+#line 1277 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1278,7 +1282,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1299,12 +1303,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1303: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1307: 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
 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 1308 "configure"
+#line 1312 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1320,7 +1324,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1345,12 +1349,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
 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:1349: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1353: 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
 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 1354 "configure"
+#line 1358 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1358,7 +1362,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1383,7 +1387,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
 # 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:1387: checking for opendir in -ldir" >&5
+echo "configure:1391: 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
 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
@@ -1391,7 +1395,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1395 "configure"
+#line 1399 "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
 #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
@@ -1402,7 +1406,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1424,7 +1428,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1428: checking for opendir in -lx" >&5
+echo "configure:1432: 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
 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
@@ -1432,7 +1436,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1436 "configure"
+#line 1440 "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
 #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
@@ -1443,7 +1447,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1467,12 +1471,12 @@ fi
 
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1471: checking for mode_t" >&5
+echo "configure:1475: 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
 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 1476 "configure"
+#line 1480 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1500,12 +1504,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1504: checking for pid_t" >&5
+echo "configure:1508: 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
 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 1509 "configure"
+#line 1513 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1533,12 +1537,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1537: checking for size_t" >&5
+echo "configure:1541: 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
 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 1542 "configure"
+#line 1546 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1566,12 +1570,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1570: checking return type of signal handlers" >&5
+echo "configure:1574: 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
 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 1575 "configure"
+#line 1579 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1588,7 +1592,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1608,39 +1612,39 @@ EOF
 
 
 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
 
 
 echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:1612: checking how to call gettimeofday" >&5
+echo "configure:1616: 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
 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 1617 "configure"
+#line 1621 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                  #include <sys/time.h>
 int main() {
 #include "confdefs.h"
 #include <stdlib.h>
                  #include <sys/time.h>
 int main() {
-struct timeval tv; gettimeofday(&tv);
+struct timeval tv; struct timezone tzp;
+                 gettimeofday(&tv, &tzp);
 ; return 0; }
 EOF
 ; return 0; }
 EOF
-if { (eval echo configure:1625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   rm -rf conftest*
-  ac_gettimeofday_args=1
+  ac_gettimeofday_args=2
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 1633 "configure"
+#line 1638 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                  #include <sys/time.h>
 int main() {
 #include "confdefs.h"
 #include <stdlib.h>
                                  #include <sys/time.h>
 int main() {
-struct timeval tv; struct timezone tzp;
-                                 gettimeofday(&tv, &tzp);
+struct timeval tv; gettimeofday(&tv);
 ; return 0; }
 EOF
 ; return 0; }
 EOF
-if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   rm -rf conftest*
-  ac_gettimeofday_args=2
+  ac_gettimeofday_args=1
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -1678,12 +1682,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
 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:1682: checking for $ac_func" >&5
+echo "configure:1686: 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
 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 1687 "configure"
+#line 1691 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1706,7 +1710,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1733,12 +1737,12 @@ done
 for ac_func in sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 for ac_func in sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1737: checking for $ac_func" >&5
+echo "configure:1741: 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
 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 1742 "configure"
+#line 1746 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1761,7 +1765,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1790,17 +1794,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1794: checking for $ac_hdr" >&5
+echo "configure:1798: 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
 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 1799 "configure"
+#line 1803 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1838,12 +1842,19 @@ else
 fi
 
 if test x"$enable_subdir" = xno; then
 fi
 
 if test x"$enable_subdir" = xno; then
-  HACKDIR='$(bindir)'
+  HACKDIR='${bindir}'
 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
   echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
   exit 1
 else
 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
   echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
   exit 1
 else
-  HACKDIR='$(bindir)/'$enable_subdir
+  # there must be a better way than this...
+  if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
+    # absolute path
+    HACKDIR=$enable_subdir
+  else
+    # relative path
+    HACKDIR='${bindir}/'$enable_subdir
+  fi
 fi
 
 
 fi
 
 
@@ -1852,7 +1863,7 @@ fi
 # 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
 # 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:1856: checking for X" >&5
+echo "configure:1867: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -1914,12 +1925,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 1918 "configure"
+#line 1929 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1988,14 +1999,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1992 "configure"
+#line 2003 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -2101,17 +2112,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
     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:2105: checking whether -R must be followed by a space" >&5
+echo "configure:2116: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 2108 "configure"
+#line 2119 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -2127,14 +2138,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 2131 "configure"
+#line 2142 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -2166,7 +2177,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
     # 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:2170: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2181: 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
 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
@@ -2174,7 +2185,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2178 "configure"
+#line 2189 "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
 #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
@@ -2185,7 +2196,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2207,7 +2218,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
 
     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:2211: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2222: 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
 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
@@ -2215,7 +2226,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2219 "configure"
+#line 2230 "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
 #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
@@ -2226,7 +2237,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2255,12 +2266,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
     # 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:2259: checking for gethostbyname" >&5
+echo "configure:2270: 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
 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 2264 "configure"
+#line 2275 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2283,7 +2294,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -2304,7 +2315,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2308: checking for gethostbyname in -lnsl" >&5
+echo "configure:2319: 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
 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
@@ -2312,7 +2323,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2316 "configure"
+#line 2327 "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
 #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
@@ -2323,7 +2334,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2353,12 +2364,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
     # -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:2357: checking for connect" >&5
+echo "configure:2368: 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
 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 2362 "configure"
+#line 2373 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -2381,7 +2392,7 @@ connect();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -2402,7 +2413,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2406: checking for connect in -lsocket" >&5
+echo "configure:2417: 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
 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
@@ -2410,7 +2421,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2414 "configure"
+#line 2425 "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
 #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
@@ -2421,7 +2432,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2445,12 +2456,12 @@ fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:2449: checking for remove" >&5
+echo "configure:2460: 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
 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 2454 "configure"
+#line 2465 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -2473,7 +2484,7 @@ remove();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -2494,7 +2505,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:2498: checking for remove in -lposix" >&5
+echo "configure:2509: 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
 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
@@ -2502,7 +2513,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2506 "configure"
+#line 2517 "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
 #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
@@ -2513,7 +2524,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2537,12 +2548,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:2541: checking for shmat" >&5
+echo "configure:2552: 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
 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 2546 "configure"
+#line 2557 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -2565,7 +2576,7 @@ shmat();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -2586,7 +2597,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2590: checking for shmat in -lipc" >&5
+echo "configure:2601: 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
 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
@@ -2594,7 +2605,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2598 "configure"
+#line 2609 "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
 #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
@@ -2605,7 +2616,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2638,7 +2649,7 @@ 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
   # 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:2642: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2653: 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
 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
@@ -2646,7 +2657,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lICE  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2650 "configure"
+#line 2661 "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
 #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
@@ -2657,7 +2668,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2694,7 +2705,7 @@ fi
 
 
     echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
 
 
     echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
-echo "configure:2698: checking for X app-defaults directory" >&5
+echo "configure:2709: 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
 if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2821,7 +2832,7 @@ APPDEFAULTS=$ac_x_app_defaults
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 2825 "configure"
+#line 2836 "configure"
 #include "confdefs.h"
 #include <X11/XHPlib.h>
 EOF
 #include "confdefs.h"
 #include <X11/XHPlib.h>
 EOF
@@ -2842,7 +2853,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
 # Check for the availability of the XPointer typedef, and define it otherwise.
 #
 echo $ac_n "checking for XPointer""... $ac_c" 1>&6
-echo "configure:2846: checking for XPointer" >&5
+echo "configure:2857: checking for XPointer" >&5
 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2853,14 +2864,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 2857 "configure"
+#line 2868 "configure"
 #include "confdefs.h"
 #include <X11/Xlib.h>
 int main() {
 XPointer foo = (XPointer) 0;
 ; return 0; }
 EOF
 #include "confdefs.h"
 #include <X11/Xlib.h>
 int main() {
 XPointer foo = (XPointer) 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_xpointer=yes
 else
   rm -rf conftest*
   ac_cv_xpointer=yes
 else
@@ -2919,7 +2930,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
 
       # 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:2923: checking for regcmp in -lgen" >&5
+echo "configure:2934: 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
 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
@@ -2927,7 +2938,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2931 "configure"
+#line 2942 "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
 #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
@@ -2938,7 +2949,7 @@ int main() {
 regcmp()
 ; return 0; }
 EOF
 regcmp()
 ; return 0; }
 EOF
-if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2975,17 +2986,17 @@ 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
   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:2979: checking for X11/Xmu/Error.h" >&5
+echo "configure:2990: 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
 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 2984 "configure"
+#line 2995 "configure"
 #include "confdefs.h"
 #include <X11/Xmu/Error.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Xmu/Error.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3029,7 +3040,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
   case "$host" in
     *-sunos4*)
     echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
-echo "configure:3033: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:3044: 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
 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3042,14 +3053,14 @@ else
                    # with X libraries because we know it's SunOS.
                    LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
                    cat > conftest.$ac_ext <<EOF
                    # with X libraries because we know it's SunOS.
                    LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
                    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
+#line 3057 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_sunos_xmu_bug=no
 else
   rm -rf conftest*
   ac_cv_sunos_xmu_bug=no
 else
@@ -3065,21 +3076,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 "$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:3069: checking whether the compiler understands -static" >&5
+echo "configure:3080: 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
 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 3076 "configure"
+#line 3087 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_ld_static=yes
 else
   rm -rf conftest*
   ac_cv_ld_static=yes
 else
@@ -3125,17 +3136,17 @@ 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
   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:3129: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3140: 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
 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 3134 "configure"
+#line 3145 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XScreenSaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/XScreenSaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3190,17 +3201,17 @@ 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
   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:3194: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3205: 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
 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 3199 "configure"
+#line 3210 "configure"
 #include "confdefs.h"
 #include <X11/extensions/scrnsaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/scrnsaver.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3244,7 +3255,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3248: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3259: 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
 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
@@ -3252,7 +3263,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3256 "configure"
+#line 3267 "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
 #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
@@ -3263,7 +3274,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3314,7 +3325,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:3318: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:3329: 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
 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
@@ -3322,7 +3333,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3326 "configure"
+#line 3337 "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
 #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
@@ -3333,7 +3344,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3379,7 +3390,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:3383: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:3394: 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
 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
@@ -3387,7 +3398,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXss -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXss -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3391 "configure"
+#line 3402 "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
 #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
@@ -3398,7 +3409,7 @@ int main() {
 XScreenSaverRegister()
 ; return 0; }
 EOF
 XScreenSaverRegister()
 ; return 0; }
 EOF
-if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3459,17 +3470,17 @@ 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
   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:3463: checking for X11/extensions/xidle.h" >&5
+echo "configure:3474: 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
 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 3468 "configure"
+#line 3479 "configure"
 #include "confdefs.h"
 #include <X11/extensions/xidle.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/xidle.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3524,17 +3535,17 @@ 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
   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:3528: checking for X11/extensions/XShm.h" >&5
+echo "configure:3539: 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
 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 3533 "configure"
+#line 3544 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XShm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/XShm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3568,17 +3579,17 @@ 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
   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:3572: checking for sys/ipc.h" >&5
+echo "configure:3583: 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
 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 3577 "configure"
+#line 3588 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3613,17 +3624,17 @@ 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
   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:3617: checking for sys/shm.h" >&5
+echo "configure:3628: 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
 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 3622 "configure"
+#line 3633 "configure"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <sys/shm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3647,6 +3658,75 @@ fi
   CPPFLAGS="$ac_save_CPPFLAGS"
   fi
 
   CPPFLAGS="$ac_save_CPPFLAGS"
   fi
 
+  # AIX is pathological, as usual: apparently it's normal for the Xshm headers
+  # to exist, but the library code to not exist.  And even better, the library
+  # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
+  # lib doesn't exist, give up.
+  #
+  case "$host" in
+    *-aix*)
+      have_xshm=no
+      
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_save_LDFLAGS="$LDFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  if test \! -z "$libdir" ; then
+    LDFLAGS="$LDFLAGS -L$libdir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  if test \! -z "$x_libraries" ; then
+    LDFLAGS="$LDFLAGS -L$x_libraries"
+  fi
+  echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
+echo "configure:3687: 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
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3695 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XShmQueryExtension();
+
+int main() {
+XShmQueryExtension()
+; return 0; }
+EOF
+if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_xshm=yes; SAVER_LIBS="$SAVER_LIBS -lXextSam"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  LDFLAGS="$ac_save_LDFLAGS"
+    ;;
+  esac
+
   # if that succeeded, then we've really got it.
   if test $have_xshm = yes; then
     cat >> confdefs.h <<\EOF
   # if that succeeded, then we've really got it.
   if test $have_xshm = yes; then
     cat >> confdefs.h <<\EOF
@@ -3684,17 +3764,17 @@ 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
   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:3688: checking for X11/extensions/XSGIvc.h" >&5
+echo "configure:3768: 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
 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 3693 "configure"
+#line 3773 "configure"
 #include "confdefs.h"
 #include <X11/extensions/XSGIvc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/XSGIvc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3737,7 +3817,7 @@ fi
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
-echo "configure:3741: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+echo "configure:3821: 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
 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
@@ -3745,7 +3825,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXsgivc -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXsgivc -lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3749 "configure"
+#line 3829 "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
 #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
@@ -3756,7 +3836,7 @@ int main() {
 XSGIvcQueryGammaMap()
 ; return 0; }
 EOF
 XSGIvcQueryGammaMap()
 ; return 0; }
 EOF
-if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3794,9 +3874,137 @@ elif test $with_sgivc != no; then
 fi
 
 
 fi
 
 
+# Check for the DPMS server extension header.
+#
+have_dpms=no
+with_dpms_req=unspecified
+# Check whether --with-dpms-ext or --without-dpms-ext was given.
+if test "${with_dpms_ext+set}" = set; then
+  withval="$with_dpms_ext"
+  with_dpms="$withval"; with_dpms_req="$withval"
+else
+  with_dpms=yes
+fi
+
+if test $with_dpms = yes; then
+
+  # first check for dpms.h
+  
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  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:3901: 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 3906 "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:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_dpms=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+
+  # if that succeeded, then check for the -lXdpms
+  if test $have_dpms = yes; then
+    have_dpms=no
+    
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_save_LDFLAGS="$LDFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  if test \! -z "$libdir" ; then
+    LDFLAGS="$LDFLAGS -L$libdir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  if test \! -z "$x_libraries" ; then
+    LDFLAGS="$LDFLAGS -L$x_libraries"
+  fi
+  echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
+echo "configure:3954: 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
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lXdpms -lXext -lX11 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3962 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char DPMSInfo();
+
+int main() {
+DPMSInfo()
+; return 0; }
+EOF
+if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  LDFLAGS="$ac_save_LDFLAGS"
+  fi
 
 
+  # if that succeeded, then we've really got it.
+  if test $have_dpms = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_DPMS_EXTENSION 1
+EOF
 
 
+  fi
 
 
+elif test $with_dpms != no; then
+  echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
+  exit 1
+fi
 
 
 
 
 
 
@@ -3804,6 +4012,7 @@ fi
 #
 have_motif=no
 have_athena=no
 #
 have_motif=no
 have_athena=no
+have_athena3d=no
 with_motif_req=unspecified
 with_athena_req=unspecified
 
 with_motif_req=unspecified
 with_athena_req=unspecified
 
@@ -3859,17 +4068,17 @@ 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
   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:3863: checking for Xm/Xm.h" >&5
+echo "configure:4072: 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
 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 3868 "configure"
+#line 4077 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3899,6 +4108,8 @@ fi
 }
 
 check_athena() {
 }
 
 check_athena() {
+  have_athena=no
+  have_athena3d=no
   
   ac_save_CPPFLAGS="$CPPFLAGS"
   if test \! -z "$includedir" ; then 
   
   ac_save_CPPFLAGS="$CPPFLAGS"
   if test \! -z "$includedir" ; then 
@@ -3907,17 +4118,17 @@ 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
   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:3911: checking for X11/Xaw/Dialog.h" >&5
+echo "configure:4122: 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
 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 3916 "configure"
+#line 4127 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Dialog.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Xaw/Dialog.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3934,16 +4145,75 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   have_athena=yes
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   have_athena=yes
-                   cat >> confdefs.h <<\EOF
-#define HAVE_ATHENA 1
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_save_LDFLAGS="$LDFLAGS"
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  if test \! -z "$includedir" ; then 
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  if test \! -z "$libdir" ; then
+    LDFLAGS="$LDFLAGS -L$libdir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  if test \! -z "$x_libraries" ; then
+    LDFLAGS="$LDFLAGS -L$x_libraries"
+  fi
+  echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
+echo "configure:4171: 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
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4179 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char Xaw3dComputeTopShadowRGB();
+
+int main() {
+Xaw3dComputeTopShadowRGB()
+; return 0; }
 EOF
 EOF
+if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 
-                   SAVER_LIBS="-lXaw $SAVER_LIBS"
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_athena=yes; have_athena3d=yes
 else
   echo "$ac_t""no" 1>&6
 fi
 
   CPPFLAGS="$ac_save_CPPFLAGS"
 else
   echo "$ac_t""no" 1>&6
 fi
 
   CPPFLAGS="$ac_save_CPPFLAGS"
+  LDFLAGS="$ac_save_LDFLAGS"
+
+  if test $have_athena3d = yes; then
+    SAVER_LIBS="-lXaw3d $SAVER_LIBS"
+  elif test $have_athena = yes; then
+    SAVER_LIBS="-lXaw $SAVER_LIBS"
+  fi
 }
 
 
 }
 
 
@@ -3992,7 +4262,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
 # 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:3996: checking for XawViewportSetCoordinates in Viewport.h" >&5
+echo "configure:4266: 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
 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4004,7 +4274,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4008 "configure"
+#line 4278 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Viewport.h>
 EOF
 #include "confdefs.h"
 #include <X11/Xaw/Viewport.h>
 EOF
@@ -4033,7 +4303,7 @@ fi
 have_lesstif=no
 if test $have_motif = yes ; then
   echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
 have_lesstif=no
 if test $have_motif = yes ; then
   echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
-echo "configure:4037: checking whether Motif is really LessTif" >&5
+echo "configure:4307: 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
 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4044,14 +4314,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4048 "configure"
+#line 4318 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 int main() {
 long vers = LesstifVersion;
 ; return 0; }
 EOF
 #include "confdefs.h"
 #include <Xm/Xm.h>
 int main() {
 long vers = LesstifVersion;
 ; return 0; }
 EOF
-if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_lesstif=yes
 else
   rm -rf conftest*
   ac_cv_have_lesstif=yes
 else
@@ -4076,7 +4346,7 @@ if test $have_lesstif = yes ; then
   # It must be at least "GNU Lesstif 0.82".
   # #### If you change this, also sync the warning message lower down.
   echo $ac_n "checking whether LessTif is of a recent enough vintage""... $ac_c" 1>&6
   # It must be at least "GNU Lesstif 0.82".
   # #### If you change this, also sync the warning message lower down.
   echo $ac_n "checking whether LessTif is of a recent enough vintage""... $ac_c" 1>&6
-echo "configure:4080: checking whether LessTif is of a recent enough vintage" >&5
+echo "configure:4350: checking whether LessTif is of a recent enough vintage" >&5
 if eval "test \"`echo '$''{'ac_cv_good_lesstif'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_good_lesstif'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4091,12 +4361,12 @@ else
                               ac_cv_good_lesstif=yes
 else
   cat > conftest.$ac_ext <<EOF
                               ac_cv_good_lesstif=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 4095 "configure"
+#line 4365 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
                                int main() { exit(LesstifVersion < 82); }
 EOF
 #include "confdefs.h"
 #include <Xm/Xm.h>
                                int main() { exit(LesstifVersion < 82); }
 EOF
-if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_good_lesstif=yes
 else
 then
   ac_cv_good_lesstif=yes
 else
@@ -4140,7 +4410,7 @@ if test $have_motif = yes ; then
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
     LDFLAGS="$LDFLAGS -L$x_libraries"
   fi
   echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
-echo "configure:4144: checking for XpQueryExtension in -lXp" >&5
+echo "configure:4414: 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
 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
@@ -4148,7 +4418,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXp -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXp -lX11 -lXext -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4152 "configure"
+#line 4422 "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
 #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
@@ -4159,7 +4429,7 @@ int main() {
 XpQueryExtension()
 ; return 0; }
 EOF
 XpQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4205,17 +4475,17 @@ 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
   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:4209: checking for X11/xpm.h" >&5
+echo "configure:4479: 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
 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 4214 "configure"
+#line 4484 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/xpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4270,17 +4540,17 @@ 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
   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:4274: checking for GL/gl.h" >&5
+echo "configure:4544: 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
 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 4279 "configure"
+#line 4549 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <GL/gl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4311,17 +4581,17 @@ 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
   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:4315: checking for GL/glx.h" >&5
+echo "configure:4585: 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
 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 4320 "configure"
+#line 4590 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4361,7 +4631,7 @@ EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4365 "configure"
+#line 4635 "configure"
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
 #include "confdefs.h"
 #include <GL/glx.h>
 EOF
@@ -4411,17 +4681,17 @@ 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
   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:4415: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:4685: 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
 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 4420 "configure"
+#line 4690 "configure"
 #include "confdefs.h"
 #include <X11/extensions/readdisplay.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/extensions/readdisplay.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4473,17 +4743,17 @@ 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
   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:4477: checking for dmedia/vl.h" >&5
+echo "configure:4747: 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
 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 4482 "configure"
+#line 4752 "configure"
 #include "confdefs.h"
 #include <dmedia/vl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <dmedia/vl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4508,7 +4778,7 @@ fi
   if test $have_sgivideo = yes; then
     have_sgivideo=no
     echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
   if test $have_sgivideo = yes; then
     have_sgivideo=no
     echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
-echo "configure:4512: checking for vlOpenVideo in -lvl" >&5
+echo "configure:4782: 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
 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
@@ -4516,7 +4786,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lvl  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lvl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4520 "configure"
+#line 4790 "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
 #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
@@ -4527,7 +4797,7 @@ int main() {
 vlOpenVideo()
 ; return 0; }
 EOF
 vlOpenVideo()
 ; return 0; }
 EOF
-if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4595,7 +4865,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
   case "$with_zippy_req" in
     /*)
       echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
-echo "configure:4599: checking for $with_zippy_req" >&5
+echo "configure:4869: checking for $with_zippy_req" >&5
       if test -x "$with_zippy_req" ; then
         echo "$ac_t""yes" 1>&6
       else
       if test -x "$with_zippy_req" ; then
         echo "$ac_t""yes" 1>&6
       else
@@ -4609,7 +4879,7 @@ echo "configure:4599: 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
       # 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:4613: checking for $ac_word" >&5
+echo "configure:4883: 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
 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4655,7 +4925,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
 # 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:4659: checking for $ac_word" >&5
+echo "configure:4929: 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 eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4688,7 +4958,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
 # 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:4692: checking for $ac_word" >&5
+echo "configure:4962: 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 eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4722,7 +4992,7 @@ done
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
 
   if test -n "$emacs_exe" ; then
     echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:4726: checking for emacs yow" >&5
+echo "configure:4996: checking for emacs yow" >&5
     #
     # get emacs to tell us where the libexec directory is.
     #
     #
     # get emacs to tell us where the libexec directory is.
     #
@@ -4744,7 +5014,7 @@ echo "configure:4726: checking for emacs yow" >&5
 
   if test -z "$ac_cv_zippy_program" ; then
     echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
 
   if test -z "$ac_cv_zippy_program" ; then
     echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
-echo "configure:4748: checking for xemacs yow" >&5
+echo "configure:5018: checking for xemacs yow" >&5
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
     if test -n "$xemacs_exe" ; then
       #
       # get xemacs to tell us where the libexec directory is.
@@ -4790,7 +5060,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
 # 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:4794: checking for $ac_word" >&5
+echo "configure:5064: 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 eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4825,7 +5095,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
 # 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:4829: checking for $ac_word" >&5
+echo "configure:5099: 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
 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4904,7 +5174,7 @@ fi
 
   if test $with_kerberos = yes; then
     echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
 
   if test $with_kerberos = yes; then
     echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
-echo "configure:4908: checking for Kerberos" >&5
+echo "configure:5178: checking for Kerberos" >&5
 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4915,14 +5185,14 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4919 "configure"
+#line 5189 "configure"
 #include "confdefs.h"
 #include <krb.h>
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 #include <krb.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_kerberos=yes
 else
   rm -rf conftest*
   ac_cv_kerberos=yes
 else
@@ -4972,7 +5242,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:4976: checking for Sun-style shadow passwords" >&5
+echo "configure:5246: 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
 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4983,7 +5253,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 4987 "configure"
+#line 5257 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -4996,7 +5266,7 @@ struct passwd_adjunct *p = getpwanam("nobody");
                         const char *pw = p->pwa_passwd;
 ; return 0; }
 EOF
                         const char *pw = p->pwa_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:5000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sun_adjunct=yes
 else
   rm -rf conftest*
   ac_cv_sun_adjunct=yes
 else
@@ -5025,7 +5295,7 @@ EOF
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5029: checking for DEC-style shadow passwords" >&5
+echo "configure:5299: 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
 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5036,7 +5306,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5040 "configure"
+#line 5310 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -5053,7 +5323,7 @@ struct pr_passwd *p;
                         pw = p->ufld.fd_encrypt;
 ; return 0; }
 EOF
                         pw = p->ufld.fd_encrypt;
 ; return 0; }
 EOF
-if { (eval echo configure:5057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_enhanced_passwd=yes
 else
   rm -rf conftest*
   ac_cv_enhanced_passwd=yes
 else
@@ -5079,7 +5349,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
       # 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:5083: checking for getprpwnam in -lprot" >&5
+echo "configure:5353: 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
 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
@@ -5087,7 +5357,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lprot -lx $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lprot -lx $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5091 "configure"
+#line 5361 "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
 #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
@@ -5098,7 +5368,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5118,7 +5388,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 "$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:5122: checking for getprpwnam in -lsecurity" >&5
+echo "configure:5392: 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
 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
@@ -5126,7 +5396,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5130 "configure"
+#line 5400 "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
 #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
@@ -5137,7 +5407,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5166,7 +5436,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5170: checking for HP-style shadow passwords" >&5
+echo "configure:5440: 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
 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5177,7 +5447,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5181 "configure"
+#line 5451 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -5190,7 +5460,7 @@ struct s_passwd *p = getspwnam("nobody");
                         const char *pw = p->pw_passwd;
 ; return 0; }
 EOF
                         const char *pw = p->pw_passwd;
 ; return 0; }
 EOF
-if { (eval echo configure:5194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_hpux_passwd=yes
 else
   rm -rf conftest*
   ac_cv_hpux_passwd=yes
 else
@@ -5215,7 +5485,7 @@ EOF
 
       # on HPUX, bigcrypt is in -lsec
       echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
 
       # on HPUX, bigcrypt is in -lsec
       echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:5219: checking for bigcrypt in -lsec" >&5
+echo "configure:5489: 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
 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
@@ -5223,7 +5493,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5227 "configure"
+#line 5497 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #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
@@ -5234,7 +5504,7 @@ int main() {
 bigcrypt()
 ; return 0; }
 EOF
 bigcrypt()
 ; return 0; }
 EOF
-if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5261,7 +5531,7 @@ fi
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
   #
   if test $passwd_cruft_done = no ; then
     echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:5265: checking for generic shadow passwords" >&5
+echo "configure:5535: 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
 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5272,7 +5542,7 @@ else
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
   fi
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 5276 "configure"
+#line 5546 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
 #include "confdefs.h"
 #include <stdlib.h>
                                      #include <unistd.h>
@@ -5284,7 +5554,7 @@ struct spwd *p = getspnam("nobody");
                         const char *pw = p->sp_pwdp;
 ; return 0; }
 EOF
                         const char *pw = p->sp_pwdp;
 ; return 0; }
 EOF
-if { (eval echo configure:5288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_shadow=yes
 else
   rm -rf conftest*
   ac_cv_shadow=yes
 else
@@ -5310,7 +5580,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
       # 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:5314: checking for getspnam in -lc" >&5
+echo "configure:5584: 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
 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
@@ -5318,7 +5588,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5322 "configure"
+#line 5592 "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
 #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
@@ -5329,7 +5599,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5351,7 +5621,7 @@ fi
 
       if test $have_getspnam = no ; then
         echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
 
       if test $have_getspnam = no ; then
         echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:5355: checking for getspnam in -lgen" >&5
+echo "configure:5625: 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
 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
@@ -5359,7 +5629,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5363 "configure"
+#line 5633 "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
 #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
@@ -5370,7 +5640,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5394,10 +5664,35 @@ fi
     fi
   fi
 
     fi
   fi
 
+  # On FreeBSD, getpwnam() and friends work just like on non-shadow-password
+  # systems -- except you only get stuff in the pw_passwd field if the running
+  # program is setuid.  So, guess that we've got this lossage to contend with
+  # if /etc/master.passwd exists, and default to a setuid installation.
+  #
+  if test $passwd_cruft_done = no ; then
+    echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
+echo "configure:5675: 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
+  if test -f /etc/master.passwd ; then
+                     ac_cv_master_passwd=yes
+                   else
+                     ac_cv_master_passwd=no
+                   fi
+fi
+
+echo "$ac_t""$ac_cv_master_passwd" 1>&6
+    if test $ac_cv_master_passwd = yes; then
+      need_setuid=yes
+      passwd_cruft_done=yes
+    fi
+  fi
+
   # 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
   # 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:5401: checking for crypt in -lc" >&5
+echo "configure:5696: 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
 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
@@ -5405,7 +5700,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5409 "configure"
+#line 5704 "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
 #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
@@ -5416,7 +5711,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5438,7 +5733,7 @@ fi
 
   if test $have_crypt = no ; then
     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
 
   if test $have_crypt = no ; then
     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:5442: checking for crypt in -lcrypt" >&5
+echo "configure:5737: 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
 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
@@ -5446,7 +5741,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5450 "configure"
+#line 5745 "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
 #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
@@ -5457,7 +5752,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5519,6 +5814,8 @@ DEPEND_FLAGS=
 DEPEND_DEFINES=
 
 
 DEPEND_DEFINES=
 
 
+# Autoconf doesn't seem to have an INSTALL_DIRS, so let's define our own...
+INSTALL_DIRS='$(INSTALL) -d'
 
 # Done testing things -- now substitute in some stuff for the Makefiles.
 #
 
 # Done testing things -- now substitute in some stuff for the Makefiles.
 #
@@ -5603,6 +5900,7 @@ fi
 
 
 
 
 
 
+
 
 
 # Print some warnings before emitting the Makefiles.
 
 
 # Print some warnings before emitting the Makefiles.
@@ -5656,6 +5954,10 @@ if test $with_sgivc_req = yes -a $have_sgivc = no ; then
   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
 fi
 
   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
 fi
 
+if test $with_dpms_req = yes -a $have_dpms = no ; then
+  warn 'The DPMS extension was requested, but was not found.'
+fi
+
 if test $have_motif = no -a $have_athena = no ; then
   warnL "Neither Motif nor Athena widgets seem to be available;"
   warn2 "one or the other is required."
 if test $have_motif = no -a $have_athena = no ; then
   warnL "Neither Motif nor Athena widgets seem to be available;"
   warn2 "one or the other is required."
@@ -5886,6 +6188,7 @@ s%@XPM_LIBS@%$XPM_LIBS%g
 s%@GL_LIBS@%$GL_LIBS%g
 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
 s%@GL_LIBS@%$GL_LIBS%g
 s%@PASSWD_LIBS@%$PASSWD_LIBS%g
 s%@INSTALL_SETUID@%$INSTALL_SETUID%g
+s%@INSTALL_DIRS@%$INSTALL_DIRS%g
 s%@NEED_SETUID@%$NEED_SETUID%g
 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
 s%@NEED_SETUID@%$NEED_SETUID%g
 s%@SGI_VIDEO_OBJS@%$SGI_VIDEO_OBJS%g
 s%@SGI_VIDEO_LIBS@%$SGI_VIDEO_LIBS%g
@@ -6129,3 +6432,37 @@ chmod +x $CONFIG_STATUS
 rm -fr confdefs* $ac_clean_files
 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
 rm -fr confdefs* $ac_clean_files
 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
+
+# You are in a twisty maze of namespaces and syntaxes, all alike.
+# Fuck the skull of Unix.
+#
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+
+echo ""
+echo "$warnsep"
+echo ""
+echo '      When you run "make install", the "xscreensaver" and'
+echo '      "xscreensaver-command" executables will be installed in'
+echo "      ${bindir}."
+echo ""
+echo "      The various graphics demos (60+ different executables) will"
+echo "      be installed in ${HACKDIR}."
+echo ""
+echo "      If you would prefer the demos to be installed elsewhere"
+echo "      (for example, in a dedicated directory) you should re-run"
+echo "      configure with the --enable-subdir=DIR option.  For more"
+echo "       information, run $0 --help."
+echo ""
+echo "$warnsep"
+echo ""
index 145ea610bf11167d6aad2f1b4928f2f49b669587..4fd08b644254c2e78c3acd19d8e7ff89dce930b2 100644 (file)
@@ -71,13 +71,13 @@ AC_MSG_CHECKING(how to call gettimeofday)
 AC_CACHE_VAL(ac_cv_gettimeofday_args,
  [AC_TRY_COMPILE([#include <stdlib.h>
                  #include <sys/time.h>],
 AC_CACHE_VAL(ac_cv_gettimeofday_args,
  [AC_TRY_COMPILE([#include <stdlib.h>
                  #include <sys/time.h>],
-                [struct timeval tv; gettimeofday(&tv);],
-                [ac_gettimeofday_args=1],
+                [struct timeval tv; struct timezone tzp;
+                 gettimeofday(&tv, &tzp);],
+                [ac_gettimeofday_args=2],
                 [AC_TRY_COMPILE([#include <stdlib.h>
                                  #include <sys/time.h>],
                 [AC_TRY_COMPILE([#include <stdlib.h>
                                  #include <sys/time.h>],
-                                [struct timeval tv; struct timezone tzp;
-                                 gettimeofday(&tv, &tzp);],
-                                [ac_gettimeofday_args=2],
+                                [struct timeval tv; gettimeofday(&tv);],
+                                [ac_gettimeofday_args=1],
                                 [ac_gettimeofday_args=0])])
   ac_cv_gettimeofday_args=$ac_gettimeofday_args])
 ac_gettimeofday_args=$ac_cv_gettimeofday_args
                                 [ac_gettimeofday_args=0])])
   ac_cv_gettimeofday_args=$ac_gettimeofday_args])
 ac_gettimeofday_args=$ac_cv_gettimeofday_args
@@ -119,12 +119,19 @@ Installation options:
 ],
   [enable_subdir="$enableval"],[enable_subdir=no])
 if test x"$enable_subdir" = xno; then
 ],
   [enable_subdir="$enableval"],[enable_subdir=no])
 if test x"$enable_subdir" = xno; then
-  HACKDIR='$(bindir)'
+  HACKDIR='${bindir}'
 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
   echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
   exit 1
 else
 elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
   echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
   exit 1
 else
-  HACKDIR='$(bindir)/'$enable_subdir
+  # there must be a better way than this...
+  if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
+    # absolute path
+    HACKDIR=$enable_subdir
+  else
+    # relative path
+    HACKDIR='${bindir}/'$enable_subdir
+  fi
 fi
 
 
 fi
 
 
@@ -593,9 +600,37 @@ elif test $with_sgivc != no; then
 fi
 
 
 fi
 
 
+# Check for the DPMS server extension header.
+#
+have_dpms=no
+with_dpms_req=unspecified
+AC_ARG_WITH(dpms-ext,
+[  --with-dpms-ext         Include support for the DPMS server extension,
+                          if possible (this is the default).
+  --without-dpms-ext      Do not compile in support for this extension.],
+  [with_dpms="$withval"; with_dpms_req="$withval"],[with_dpms=yes])
+if test $with_dpms = yes; then
+
+  # first check for dpms.h
+  AC_CHECK_X_HEADER(X11/extensions/dpms.h, [have_dpms=yes])
+
+  # if that succeeded, then check for the -lXdpms
+  if test $have_dpms = yes; then
+    have_dpms=no
+    AC_CHECK_X_LIB(Xdpms, DPMSInfo,
+                 [have_dpms=yes; SAVER_LIBS="$SAVER_LIBS -lXdpms"], [],
+                 -lXext -lX11)
+  fi
 
 
+  # if that succeeded, then we've really got it.
+  if test $have_dpms = yes; then
+    AC_DEFINE(HAVE_DPMS_EXTENSION)
+  fi
 
 
-
+elif test $with_dpms != no; then
+  echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
+  exit 1
+fi
 
 
 
 
 
 
@@ -603,6 +638,7 @@ fi
 #
 have_motif=no
 have_athena=no
 #
 have_motif=no
 have_athena=no
+have_athena3d=no
 with_motif_req=unspecified
 with_athena_req=unspecified
 
 with_motif_req=unspecified
 with_athena_req=unspecified
 
@@ -653,10 +689,18 @@ check_motif() {
 }
 
 check_athena() {
 }
 
 check_athena() {
-  AC_CHECK_X_HEADER(X11/Xaw/Dialog.h,
-                  [have_athena=yes
-                   AC_DEFINE(HAVE_ATHENA)
-                   SAVER_LIBS="-lXaw $SAVER_LIBS"])
+  have_athena=no
+  have_athena3d=no
+  AC_CHECK_X_HEADER(X11/Xaw/Dialog.h, [have_athena=yes])
+  AC_CHECK_X_LIB(Xaw3d, Xaw3dComputeTopShadowRGB,
+                [have_athena=yes; have_athena3d=yes], [],
+                -lXt -lXmu -lXext -lX11)
+
+  if test $have_athena3d = yes; then
+    SAVER_LIBS="-lXaw3d $SAVER_LIBS"
+  elif test $have_athena = yes; then
+    SAVER_LIBS="-lXaw $SAVER_LIBS"
+  fi
 }
 
 
 }
 
 
@@ -1179,6 +1223,24 @@ if test $enable_locking = yes; then
     fi
   fi
 
     fi
   fi
 
+  # On FreeBSD, getpwnam() and friends work just like on non-shadow-password
+  # systems -- except you only get stuff in the pw_passwd field if the running
+  # program is setuid.  So, guess that we've got this lossage to contend with
+  # if /etc/master.passwd exists, and default to a setuid installation.
+  #
+  if test $passwd_cruft_done = no ; then
+    AC_CACHE_CHECK([for FreeBSD-style shadow passwords], ac_cv_master_passwd,
+                  [if test -f /etc/master.passwd ; then
+                     ac_cv_master_passwd=yes
+                   else
+                     ac_cv_master_passwd=no
+                   fi])
+    if test $ac_cv_master_passwd = yes; then
+      need_setuid=yes
+      passwd_cruft_done=yes
+    fi
+  fi
+
   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
   have_crypt=no
   AC_CHECK_LIB(c, crypt, [have_crypt=yes])
   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
   have_crypt=no
   AC_CHECK_LIB(c, crypt, [have_crypt=yes])
@@ -1224,6 +1286,8 @@ DEPEND_FLAGS=
 DEPEND_DEFINES=
 
 
 DEPEND_DEFINES=
 
 
+# Autoconf doesn't seem to have an INSTALL_DIRS, so let's define our own...
+INSTALL_DIRS='$(INSTALL) -d'
 
 # Done testing things -- now substitute in some stuff for the Makefiles.
 #
 
 # Done testing things -- now substitute in some stuff for the Makefiles.
 #
@@ -1282,6 +1346,7 @@ AC_SUBST(XPM_LIBS)
 AC_SUBST(GL_LIBS)
 AC_SUBST(PASSWD_LIBS)
 AC_SUBST(INSTALL_SETUID)
 AC_SUBST(GL_LIBS)
 AC_SUBST(PASSWD_LIBS)
 AC_SUBST(INSTALL_SETUID)
+AC_SUBST(INSTALL_DIRS)
 AC_SUBST(NEED_SETUID)
 AC_SUBST(SGI_VIDEO_OBJS)
 AC_SUBST(SGI_VIDEO_LIBS)
 AC_SUBST(NEED_SETUID)
 AC_SUBST(SGI_VIDEO_OBJS)
 AC_SUBST(SGI_VIDEO_LIBS)
@@ -1355,6 +1420,10 @@ if test $with_sgivc_req = yes -a $have_sgivc = no ; then
   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
 fi
 
   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
 fi
 
+if test $with_dpms_req = yes -a $have_dpms = no ; then
+  warn 'The DPMS extension was requested, but was not found.'
+fi
+
 if test $have_motif = no -a $have_athena = no ; then
   warnL "Neither Motif nor Athena widgets seem to be available;"
   warn2 "one or the other is required."
 if test $have_motif = no -a $have_athena = no ; then
   warnL "Neither Motif nor Athena widgets seem to be available;"
   warn2 "one or the other is required."
@@ -1430,3 +1499,37 @@ AC_OUTPUT(Makefile
          hacks/Makefile
          hacks/glx/Makefile
          driver/XScreenSaver.ad)
          hacks/Makefile
          hacks/glx/Makefile
          driver/XScreenSaver.ad)
+
+# You are in a twisty maze of namespaces and syntaxes, all alike.
+# Fuck the skull of Unix.
+#
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval bindir=${bindir}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+eval HACKDIR=${HACKDIR}
+
+echo ""
+echo "$warnsep"
+echo ""
+echo '      When you run "make install", the "xscreensaver" and'
+echo '      "xscreensaver-command" executables will be installed in'
+echo "      ${bindir}."
+echo ""
+echo "      The various graphics demos (60+ different executables) will"
+echo "      be installed in ${HACKDIR}."
+echo ""
+echo "      If you would prefer the demos to be installed elsewhere"
+echo "      (for example, in a dedicated directory) you should re-run"
+echo "      configure with the --enable-subdir=DIR option.  For more"
+echo "      information, run $0 --help."
+echo ""
+echo "$warnsep"
+echo ""
index ae4f62bf1a1fb40d73beec59ad96cd0957bab068..2b2b0e1450880a155c4fb1d611290f3e1bdb4abc 100644 (file)
@@ -20,6 +20,7 @@ CC            = @CC@
 CFLAGS         = @CFLAGS@
 LDFLAGS                = @LDFLAGS@
 DEFS           = @DEFS@
 CFLAGS         = @CFLAGS@
 LDFLAGS                = @LDFLAGS@
 DEFS           = @DEFS@
+DEFS2          = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
 LIBS           = @LIBS@
 
 DEPEND         = @DEPEND@
 LIBS           = @LIBS@
 
 DEPEND         = @DEPEND@
@@ -32,13 +33,23 @@ SUID_FLAGS      = -o root -m 4755
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SETUID  = @INSTALL_SETUID@
 INSTALL_DATA   = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SETUID  = @INSTALL_SETUID@
 INSTALL_DATA   = @INSTALL_DATA@
+INSTALL_DIRS   = @INSTALL_DIRS@
 
 X_CFLAGS       = @X_CFLAGS@
 X_LIBS         = @X_LIBS@
 X_PRE_LIBS     = @X_PRE_LIBS@
 X_EXTRA_LIBS   = @X_EXTRA_LIBS@
 
 
 X_CFLAGS       = @X_CFLAGS@
 X_LIBS         = @X_LIBS@
 X_PRE_LIBS     = @X_PRE_LIBS@
 X_EXTRA_LIBS   = @X_EXTRA_LIBS@
 
-XLIBS          = $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
+# Note:
+#
+# X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
+# X_PRE_LIBS contains extra libraries you have to link against on some systems,
+#         and that must come before -lX11.  (e.g., -lSM and -lICE.)
+# X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
+#         (e.g., -lsocket, -lnsl, etc.)
+#
+XLIBS          = $(X_LIBS) $(X_PRE_LIBS)      -lX11 -lXext $(X_EXTRA_LIBS)
+XTLIBS         = $(X_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
 
 AD_DIR         = @APPDEFAULTS@
 
 
 AD_DIR         = @APPDEFAULTS@
 
@@ -88,11 +99,11 @@ SAVER_OBJS_1        = demo.o stderr.o subprocs.o timers.o windows.o \
 
 SAVER_SRCS     = $(SAVER_SRCS_1) $(DIALOG_SRCS) $(LOCK_SRCS) $(UTIL_SRCS)
 SAVER_OBJS     = $(SAVER_OBJS_1) $(DIALOG_OBJS) $(LOCK_OBJS) $(UTIL_OBJS)
 
 SAVER_SRCS     = $(SAVER_SRCS_1) $(DIALOG_SRCS) $(LOCK_SRCS) $(UTIL_SRCS)
 SAVER_OBJS     = $(SAVER_OBJS_1) $(DIALOG_OBJS) $(LOCK_OBJS) $(UTIL_OBJS)
-SAVER_LIBS     = $(X_LIBS) @SAVER_LIBS@ -lXt $(XLIBS) $(PASSWD_LIBS) $(LIBS)
+SAVER_LIBS     = @SAVER_LIBS@ -lXt $(XTLIBS) $(PASSWD_LIBS) $(LIBS)
 
 CMD_SRCS       = xscreensaver-command.c
 CMD_OBJS       = xscreensaver-command.o
 
 CMD_SRCS       = xscreensaver-command.c
 CMD_OBJS       = xscreensaver-command.o
-CMD_LIBS       = $(X_LIBS) $(XLIBS) $(LIBS)
+CMD_LIBS       = $(XLIBS) $(LIBS)
 
 EXES           = xscreensaver xscreensaver-command
 
 
 EXES           = xscreensaver xscreensaver-command
 
@@ -138,15 +149,18 @@ install-program:
  $$e ""                                                                             ;\
           fi ;                                                         \
        fi ;                                                            \
  $$e ""                                                                             ;\
           fi ;                                                         \
        fi ;                                                            \
+       if [ ! -d $(bindir) ]; then $(INSTALL_DIRS) $(bindir) ; fi ;    \
        echo $$inst xscreensaver $(bindir)/xscreensaver ;               \
        $$inst xscreensaver $(bindir)/xscreensaver
        $(INSTALL_PROGRAM) xscreensaver-command $(bindir)/xscreensaver-command
 
 install-ad:
        echo $$inst xscreensaver $(bindir)/xscreensaver ;               \
        $$inst xscreensaver $(bindir)/xscreensaver
        $(INSTALL_PROGRAM) xscreensaver-command $(bindir)/xscreensaver-command
 
 install-ad:
+       @if [ ! -d $(AD_DIR) ]; then $(INSTALL_DIRS) $(AD_DIR) ; fi ;   \
        $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver
 
 install-man:
        @men="$(MEN)" ;                                                 \
        $(INSTALL_DATA) XScreenSaver.ad $(AD_DIR)/XScreenSaver
 
 install-man:
        @men="$(MEN)" ;                                                 \
+       if [ ! -d $(man1dir) ]; then $(INSTALL_DIRS) $(man1dir) ; fi ;  \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
          echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
          echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
@@ -273,7 +287,11 @@ $(UTIL_OBJS):
 
 # How we build object files in this directory.
 .c.o:
 
 # How we build object files in this directory.
 .c.o:
-       $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
+       $(CC) -c $(INCLUDES) $(DEFS)  $(CFLAGS) $(X_CFLAGS) $<
+
+# subprocs is the only one that takes an extra -D option.
+subprocs.o: subprocs.c
+       $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) $<
 
 
 # How we build the default app-defaults file into the program.
 
 
 # How we build the default app-defaults file into the program.
index a4b78fb3c53041315df68685457e463d9586e879..6da779d925413210526531aac5100e140ceff329 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 2.21
-!                                15-Jun-98
+!                              version 2.23
+!                                21-Jun-98
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://people.netscape.com/jwz/xscreensaver/
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://people.netscape.com/jwz/xscreensaver/
@@ -24,8 +24,8 @@
 
 *captureStderr:        True
 *captureStdout:        True
 
 *captureStderr:        True
 *captureStdout:        True
-*overlayTextForeground:        Yellow
-*overlayTextBackground:        Black
+*overlayTextForeground:        #FFFF00
+*overlayTextBackground:        #000000
 *overlayStderr:                True
 *font:                 *-medium-r-*-140-*-m-*
 
 *overlayStderr:                True
 *font:                 *-medium-r-*-140-*-m-*
 
                interference -root                                      \n\
                truchet -root -randomize                                \n\
                bsod -root                                              \n\
                interference -root                                      \n\
                truchet -root -randomize                                \n\
                bsod -root                                              \n\
+               crystal -root                                           \n\
+               discrete -root                                          \n\
                                                                          \
        mono:   rocks -root                                             \n\
        color:  rocks -root -fg darksalmon                              \n\
                                                                          \
        mono:   rocks -root                                             \n\
        color:  rocks -root -fg darksalmon                              \n\
 XScreenSaver*XmList.fontList:      *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
 ! Need to fully-qualify the preceeding in the case of of *sgiMode.
 
 XScreenSaver*XmList.fontList:      *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
 ! Need to fully-qualify the preceeding in the case of of *sgiMode.
 
-*XmDialogShell*foreground:             black
-*XmDialogShell*background:             gray90
-*XmDialogShell*XmTextField.foreground: black
-*XmDialogShell*XmTextField.background: white
-*XmDialogShell*demoList.foreground:    black
-*XmDialogShell*demoList.background:    white
+*XmDialogShell*foreground:             #000000
+*XmDialogShell*background:             #E5E5E5
+*XmDialogShell*XmTextField.foreground: #000000
+*XmDialogShell*XmTextField.background: #FFFFFF
+*XmDialogShell*demoList.foreground:    #000000
+*XmDialogShell*demoList.background:    #FFFFFF
 
 ! Need to fully-qualify the following in the case of of *sgiMode.
 
 ! Need to fully-qualify the following in the case of of *sgiMode.
-XScreenSaver*XmDialogShell*rogerLabel.foreground:      red3
-XScreenSaver*XmDialogShell*rogerLabel.background:      white
+XScreenSaver*XmDialogShell*rogerLabel.foreground:      #CD0000
+XScreenSaver*XmDialogShell*rogerLabel.background:      #FFFFFF
 
 *XmDialogShell.title:          XScreenSaver
 *allowShellResize:             True
 
 *XmDialogShell.title:          XScreenSaver
 *allowShellResize:             True
@@ -322,14 +324,14 @@ XScreenSaver*XmDialogShell*rogerLabel.background: white
 *fadeToggle.labelString:       Fade Colormap
 *unfadeToggle.labelString:     Unfade Colormap
 *lockToggle.labelString:       Require Password
 *fadeToggle.labelString:       Fade Colormap
 *unfadeToggle.labelString:     Unfade Colormap
 *lockToggle.labelString:       Require Password
-*resourcesDone.labelString:    Done
+*resourcesDone.labelString:    OK
 *resourcesCancel.labelString:  Cancel
 
 *passwdDialog.title:           Password
 *passwdLabel1.labelString:     XScreenSaver %s
 *passwdLabel2.labelString:     This display is locked.
 *passwdLabel3.labelString:     Please type %s's password to unlock it.
 *resourcesCancel.labelString:  Cancel
 
 *passwdDialog.title:           Password
 *passwdLabel1.labelString:     XScreenSaver %s
 *passwdLabel2.labelString:     This display is locked.
 *passwdLabel3.labelString:     Please type %s's password to unlock it.
-*passwdDone.labelString:       Done
+*passwdDone.labelString:       OK
 *passwdCancel.labelString:     Cancel
 
 *passwdLabel1.alignment:       ALIGNMENT_BEGINNING
 *passwdCancel.labelString:     Cancel
 
 *passwdLabel1.alignment:       ALIGNMENT_BEGINNING
@@ -353,30 +355,34 @@ XScreenSaver*dragReceiverProtocolStyle:  DRAG_NONE
 *passwd_dialog*font:           *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1
 *demo_dialog*label1.font:      *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
 *resources_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
 *passwd_dialog*font:           *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1
 *demo_dialog*label1.font:      *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
 *resources_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
-*demo_dialog*List.font:                *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
+XScreenSaver.demo_dialog*List.font: \
+                               *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
 
 ! This is a hack to make the typed password invisible.
 ! Surely someone can do better than this...
 
 ! This is a hack to make the typed password invisible.
 ! Surely someone can do better than this...
-*passwd_dialog*passwd_form.value*font:         *nil*
+XScreenSaver.passwd_dialog*passwd_form.value*font:     *nil*
 
 
-*demo_dialog*foreground:                       black
-*demo_dialog*background:                       gray90
-*demo_dialog*List.background:                  white
-*demo_dialog*Scrollbar.background:             gray85
-*demo_dialog*Command.background:               gray85
+XScreenSaver.demo_dialog*foreground:                   #000000
+XScreenSaver.demo_dialog*background:                   #E5E5E5
+XScreenSaver.demo_dialog*List.background:              #FFFFFF
+XScreenSaver.demo_dialog*Scrollbar.background:         #D9D9D9
+XScreenSaver.demo_dialog*Command.background:           #D9D9D9
 
 
-*resources_dialog*foreground:                  black
-*resources_dialog*background:                  gray90
-*resources_dialog*Command.background:          gray85
-*resources_dialog*Toggle.background:           gray85
-*resources_dialog*Text*background:             white
+XScreenSaver.resources_dialog*foreground:              #000000
+XScreenSaver.resources_dialog*background:              #E5E5E5
+XScreenSaver.resources_dialog*Command.background:      #D9D9D9
+XScreenSaver.resources_dialog*Toggle.background:       #D9D9D9
+XScreenSaver.resources_dialog*Text*background:         #FFFFFF
 
 *resources_dialog*Dialog.value.translations: #override\n\
        <Key>Return: beginning-of-line()\n
 
 
 *resources_dialog*Dialog.value.translations: #override\n\
        <Key>Return: beginning-of-line()\n
 
-*passwd_dialog*foreground:                     black
-*passwd_dialog*background:                     gray90
-*passwd_dialog*Text*background:                        white
+XScreenSaver.passwd_dialog*foreground:                 #000000
+XScreenSaver.passwd_dialog*background:                 #E5E5E5
+XScreenSaver.passwd_dialog*Command.background:         #D9D9D9
+XScreenSaver.passwd_dialog*Text*background:            #FFFFFF
+XScreenSaver.passwd_dialog*roger.foreground:           #CD0000
+XScreenSaver.passwd_dialog*roger.background:           #FFFFFF
 
 *demo_dialog*viewport.width:                   400
 *demo_dialog*viewport.height:                  200
 
 *demo_dialog*viewport.width:                   400
 *demo_dialog*viewport.height:                  200
@@ -404,21 +410,19 @@ XScreenSaver*dragReceiverProtocolStyle:  DRAG_NONE
 *resources_dialog*buttonbox.fade.label:                Fade Colormap
 *resources_dialog*buttonbox.unfade.label:      Unfade Colormap
 *resources_dialog*buttonbox.lock.label:                Require Password
 *resources_dialog*buttonbox.fade.label:                Fade Colormap
 *resources_dialog*buttonbox.unfade.label:      Unfade Colormap
 *resources_dialog*buttonbox.lock.label:                Require Password
-*resources_dialog*done.label:                  Done
+*resources_dialog*done.label:                  OK
 *resources_dialog*cancel.label:                        Cancel
 
 *passwd_dialog*label1.label:                   XScreenSaver %s
 *passwd_dialog*label2.label:                   This display is locked.
 *passwd_dialog*label3.label:           Please type %s's password to unlock it.
 *resources_dialog*cancel.label:                        Cancel
 
 *passwd_dialog*label1.label:                   XScreenSaver %s
 *passwd_dialog*label2.label:                   This display is locked.
 *passwd_dialog*label3.label:           Please type %s's password to unlock it.
-*passwd_dialog*ok.label:                       Done
+*passwd_dialog*ok.label:                       OK
 *passwd_dialog*cancel.label:                   Cancel
 *passwd_dialog*passwd_form*label.label:                Enter password:
 *passwd_dialog*Dialog.label:                   Enter password:
 *passwd_dialog*passwd_form*Text.width:         200
 *passwd_dialog*roger.width:                    150
 *passwd_dialog*roger.height:                   150
 *passwd_dialog*cancel.label:                   Cancel
 *passwd_dialog*passwd_form*label.label:                Enter password:
 *passwd_dialog*Dialog.label:                   Enter password:
 *passwd_dialog*passwd_form*Text.width:         200
 *passwd_dialog*roger.width:                    150
 *passwd_dialog*roger.height:                   150
-*passwd_dialog*roger.foreground:               red3
-*passwd_dialog*roger.background:               white
 *passwd_dialog*roger.borderWidth:              1
 
 
 *passwd_dialog*roger.borderWidth:              1
 
 
index 4c6497306fe8a44e665d63316ad733fc141c016b..24f82dc6877a3b8162478633e890c00ddeefb528 100644 (file)
@@ -11,8 +11,8 @@
 "*fadeTicks:           20",
 "*captureStderr:       True",
 "*captureStdout:       True",
 "*fadeTicks:           20",
 "*captureStderr:       True",
 "*captureStdout:       True",
-"*overlayTextForeground:       Yellow",
-"*overlayTextBackground:       Black",
+"*overlayTextForeground:       #FFFF00",
+"*overlayTextBackground:       #000000",
 "*overlayStderr:               True",
 "*font:                        *-medium-r-*-140-*-m-*",
 "*installColormap:     True",
 "*overlayStderr:               True",
 "*font:                        *-medium-r-*-140-*-m-*",
 "*installColormap:     True",
@@ -85,6 +85,8 @@
                interference -root                                      \\n\
                truchet -root -randomize                                \\n\
                bsod -root                                              \\n\
                interference -root                                      \\n\
                truchet -root -randomize                                \\n\
                bsod -root                                              \\n\
+               crystal -root                                           \\n\
+               discrete -root                                          \\n\
                                                                          \
        mono:   rocks -root                                             \\n\
        color:  rocks -root -fg darksalmon                              \\n\
                                                                          \
        mono:   rocks -root                                             \\n\
        color:  rocks -root -fg darksalmon                              \\n\
 "*XmTextField.fontList:             *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
 "*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
 "XScreenSaver*XmList.fontList:      *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
 "*XmTextField.fontList:             *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
 "*passwdDialog.passwdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
 "XScreenSaver*XmList.fontList:      *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"*XmDialogShell*foreground:            black",
-"*XmDialogShell*background:            gray90",
-"*XmDialogShell*XmTextField.foreground:        black",
-"*XmDialogShell*XmTextField.background:        white",
-"*XmDialogShell*demoList.foreground:   black",
-"*XmDialogShell*demoList.background:   white",
-"XScreenSaver*XmDialogShell*rogerLabel.foreground:     red3",
-"XScreenSaver*XmDialogShell*rogerLabel.background:     white",
+"*XmDialogShell*foreground:            #000000",
+"*XmDialogShell*background:            #E5E5E5",
+"*XmDialogShell*XmTextField.foreground:        #000000",
+"*XmDialogShell*XmTextField.background:        #FFFFFF",
+"*XmDialogShell*demoList.foreground:   #000000",
+"*XmDialogShell*demoList.background:   #FFFFFF",
+"XScreenSaver*XmDialogShell*rogerLabel.foreground:     #CD0000",
+"XScreenSaver*XmDialogShell*rogerLabel.background:     #FFFFFF",
 "*XmDialogShell.title:         XScreenSaver",
 "*allowShellResize:            True",
 "*autoUnmanage:                        False",
 "*XmDialogShell.title:         XScreenSaver",
 "*allowShellResize:            True",
 "*autoUnmanage:                        False",
 "*fadeToggle.labelString:      Fade Colormap",
 "*unfadeToggle.labelString:    Unfade Colormap",
 "*lockToggle.labelString:      Require Password",
 "*fadeToggle.labelString:      Fade Colormap",
 "*unfadeToggle.labelString:    Unfade Colormap",
 "*lockToggle.labelString:      Require Password",
-"*resourcesDone.labelString:   Done",
+"*resourcesDone.labelString:   OK",
 "*resourcesCancel.labelString: Cancel",
 "*passwdDialog.title:          Password",
 "*passwdLabel1.labelString:    XScreenSaver %s",
 "*passwdLabel2.labelString:    This display is locked.",
 "*passwdLabel3.labelString:    Please type %s's password to unlock it.",
 "*resourcesCancel.labelString: Cancel",
 "*passwdDialog.title:          Password",
 "*passwdLabel1.labelString:    XScreenSaver %s",
 "*passwdLabel2.labelString:    This display is locked.",
 "*passwdLabel3.labelString:    Please type %s's password to unlock it.",
-"*passwdDone.labelString:      Done",
+"*passwdDone.labelString:      OK",
 "*passwdCancel.labelString:    Cancel",
 "*passwdLabel1.alignment:      ALIGNMENT_BEGINNING",
 "*passwdLabel2.alignment:      ALIGNMENT_BEGINNING",
 "*passwdCancel.labelString:    Cancel",
 "*passwdLabel1.alignment:      ALIGNMENT_BEGINNING",
 "*passwdLabel2.alignment:      ALIGNMENT_BEGINNING",
 "*passwd_dialog*font:          *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1",
 "*demo_dialog*label1.font:     *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
 "*resources_dialog*label1.font:        *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
 "*passwd_dialog*font:          *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1",
 "*demo_dialog*label1.font:     *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
 "*resources_dialog*label1.font:        *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
-"*demo_dialog*List.font:               *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"*passwd_dialog*passwd_form.value*font:                *nil*",
-"*demo_dialog*foreground:                      black",
-"*demo_dialog*background:                      gray90",
-"*demo_dialog*List.background:                 white",
-"*demo_dialog*Scrollbar.background:            gray85",
-"*demo_dialog*Command.background:              gray85",
-"*resources_dialog*foreground:                 black",
-"*resources_dialog*background:                 gray90",
-"*resources_dialog*Command.background:         gray85",
-"*resources_dialog*Toggle.background:          gray85",
-"*resources_dialog*Text*background:            white",
+"XScreenSaver.demo_dialog*List.font: \
+                               *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
+"XScreenSaver.passwd_dialog*passwd_form.value*font:    *nil*",
+"XScreenSaver.demo_dialog*foreground:                  #000000",
+"XScreenSaver.demo_dialog*background:                  #E5E5E5",
+"XScreenSaver.demo_dialog*List.background:             #FFFFFF",
+"XScreenSaver.demo_dialog*Scrollbar.background:                #D9D9D9",
+"XScreenSaver.demo_dialog*Command.background:          #D9D9D9",
+"XScreenSaver.resources_dialog*foreground:             #000000",
+"XScreenSaver.resources_dialog*background:             #E5E5E5",
+"XScreenSaver.resources_dialog*Command.background:     #D9D9D9",
+"XScreenSaver.resources_dialog*Toggle.background:      #D9D9D9",
+"XScreenSaver.resources_dialog*Text*background:                #FFFFFF",
 "*resources_dialog*Dialog.value.translations: #override\\n\
        <Key>Return: beginning-of-line()\\n",
 "*resources_dialog*Dialog.value.translations: #override\\n\
        <Key>Return: beginning-of-line()\\n",
-"*passwd_dialog*foreground:                    black",
-"*passwd_dialog*background:                    gray90",
-"*passwd_dialog*Text*background:                       white",
+"XScreenSaver.passwd_dialog*foreground:                        #000000",
+"XScreenSaver.passwd_dialog*background:                        #E5E5E5",
+"XScreenSaver.passwd_dialog*Command.background:                #D9D9D9",
+"XScreenSaver.passwd_dialog*Text*background:           #FFFFFF",
+"XScreenSaver.passwd_dialog*roger.foreground:          #CD0000",
+"XScreenSaver.passwd_dialog*roger.background:          #FFFFFF",
 "*demo_dialog*viewport.width:                  400",
 "*demo_dialog*viewport.height:                 200",
 "*Form.borderWidth:                            0",
 "*demo_dialog*viewport.width:                  400",
 "*demo_dialog*viewport.height:                 200",
 "*Form.borderWidth:                            0",
 "*resources_dialog*buttonbox.fade.label:               Fade Colormap",
 "*resources_dialog*buttonbox.unfade.label:     Unfade Colormap",
 "*resources_dialog*buttonbox.lock.label:               Require Password",
 "*resources_dialog*buttonbox.fade.label:               Fade Colormap",
 "*resources_dialog*buttonbox.unfade.label:     Unfade Colormap",
 "*resources_dialog*buttonbox.lock.label:               Require Password",
-"*resources_dialog*done.label:                 Done",
+"*resources_dialog*done.label:                 OK",
 "*resources_dialog*cancel.label:                       Cancel",
 "*passwd_dialog*label1.label:                  XScreenSaver %s",
 "*passwd_dialog*label2.label:                  This display is locked.",
 "*passwd_dialog*label3.label:          Please type %s's password to unlock it.",
 "*resources_dialog*cancel.label:                       Cancel",
 "*passwd_dialog*label1.label:                  XScreenSaver %s",
 "*passwd_dialog*label2.label:                  This display is locked.",
 "*passwd_dialog*label3.label:          Please type %s's password to unlock it.",
-"*passwd_dialog*ok.label:                      Done",
+"*passwd_dialog*ok.label:                      OK",
 "*passwd_dialog*cancel.label:                  Cancel",
 "*passwd_dialog*passwd_form*label.label:               Enter password:",
 "*passwd_dialog*Dialog.label:                  Enter password:",
 "*passwd_dialog*passwd_form*Text.width:                200",
 "*passwd_dialog*roger.width:                   150",
 "*passwd_dialog*roger.height:                  150",
 "*passwd_dialog*cancel.label:                  Cancel",
 "*passwd_dialog*passwd_form*label.label:               Enter password:",
 "*passwd_dialog*Dialog.label:                  Enter password:",
 "*passwd_dialog*passwd_form*Text.width:                200",
 "*passwd_dialog*roger.width:                   150",
 "*passwd_dialog*roger.height:                  150",
-"*passwd_dialog*roger.foreground:              red3",
-"*passwd_dialog*roger.background:              white",
 "*passwd_dialog*roger.borderWidth:             1",
 "XScreenSaver.pointerPollTime:         5",
 "XScreenSaver.initialDelay:            0",
 "*passwd_dialog*roger.borderWidth:             1",
 "XScreenSaver.pointerPollTime:         5",
 "XScreenSaver.initialDelay:            0",
index 2c90218d487fc5603e361e7ff762a0d9a801408c..23a42974c6ae88d7015d173d4b6940835efa04ae 100644 (file)
@@ -1,5 +1,5 @@
 /* demo.c --- implements the interactive demo-mode and options dialogs.
 /* demo.c --- implements the interactive demo-mode and options dialogs.
- * xscreensaver, Copyright (c) 1993-1997 Jamie Zawinski <jwz@netscape.com>
+ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@netscape.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -630,6 +630,7 @@ make_screenhack_dialog (saver_info *si)
 
 #endif /* HAVE_ATHENA */
 
 
 #endif /* HAVE_ATHENA */
 
+  monitor_power_on (si);
   pop_up_dialog_box(demo_dialog, demo_form,
                    /* for debugging -- don't ask */
                    (si->prefs.debug_p ? 69 : 0) +
   pop_up_dialog_box(demo_dialog, demo_form,
                    /* for debugging -- don't ask */
                    (si->prefs.debug_p ? 69 : 0) +
@@ -918,6 +919,7 @@ pop_resources_dialog (saver_info *si)
   set_toggle_button_state (unfade_toggle, res.unfade);
   set_toggle_button_state (lock_toggle, res.lock_p);
 
   set_toggle_button_state (unfade_toggle, res.unfade);
   set_toggle_button_state (lock_toggle, res.lock_p);
 
+  monitor_power_on (si);
   pop_up_dialog_box (resources_dialog, resources_form,
                     /* for debugging -- don't ask */
                     (si->prefs.debug_p ? 69 : 0) +
   pop_up_dialog_box (resources_dialog, resources_form,
                     /* for debugging -- don't ask */
                     (si->prefs.debug_p ? 69 : 0) +
@@ -933,6 +935,7 @@ demo_mode (saver_info *si)
 {
   saver_preferences *p = &si->prefs;
   si->dbox_up_p = True;
 {
   saver_preferences *p = &si->prefs;
   si->dbox_up_p = True;
+  monitor_power_on (si);
   raise_window (si, True, False, False);
   make_screenhack_dialog (si);
   while (si->demo_mode_p)
   raise_window (si, True, False, False);
   make_screenhack_dialog (si);
   while (si->demo_mode_p)
index a5579a37bd10f31489bf79952f377d3b7329f333..c6a715a5df43aea807911704c3ea68d84d368a22 100644 (file)
@@ -604,6 +604,7 @@ pop_passwd_dialog (saver_info *si)
     XMapRaised (dpy, XtWindow (passwd_dialog));
 #endif
 
     XMapRaised (dpy, XtWindow (passwd_dialog));
 #endif
 
+  monitor_power_on (si);
 #ifdef HAVE_ATHENA
   pop_up_athena_dialog_box (parent, passwd_text, passwd_dialog,
                            passwd_form, 2);
 #ifdef HAVE_ATHENA
   pop_up_athena_dialog_box (parent, passwd_text, passwd_dialog,
                            passwd_form, 2);
index 97904499981d1eeb69f1deebd416e0084144f52a..b2b341a8fde7e2af2f00e1dd423367e1f4cba260 100644 (file)
@@ -76,7 +76,7 @@ extern int kill (pid_t, int);         /* signal() is in sys/signal.h... */
 
 extern saver_info *global_si_kludge;   /* I hate C so much... */
 
 
 extern saver_info *global_si_kludge;   /* I hate C so much... */
 
-static void hack_environment (saver_screen_info *ssi);
+static void hack_subproc_environment (saver_screen_info *ssi);
 
 
 static void
 
 
 static void
@@ -831,7 +831,7 @@ spawn_screenhack_1 (saver_screen_info *ssi, Bool first_time_p)
        case 0:
          close (ConnectionNumber (si->dpy));   /* close display fd */
          nice_subproc (p->nice_inferior);      /* change process priority */
        case 0:
          close (ConnectionNumber (si->dpy));   /* close display fd */
          nice_subproc (p->nice_inferior);      /* change process priority */
-         hack_environment (ssi);               /* set $DISPLAY */
+         hack_subproc_environment (ssi);       /* set $DISPLAY */
          exec_screenhack (si, hack);           /* this does not return */
          abort();
          break;
          exec_screenhack (si, hack);           /* this does not return */
          abort();
          break;
@@ -849,6 +849,15 @@ void
 spawn_screenhack (saver_info *si, Bool first_time_p)
 {
   int i;
 spawn_screenhack (saver_info *si, Bool first_time_p)
 {
   int i;
+
+  if (!monitor_powered_on_p (si))
+    {
+      if (si->prefs.verbose_p)
+       printf ("%s: server reports that monitor has powered down; "
+               "not launching a new hack.\n", progname);
+      return;
+    }
+
   for (i = 0; i < si->nscreens; i++)
     {
       saver_screen_info *ssi = &si->screens[i];
   for (i = 0; i < si->nscreens; i++)
     {
       saver_screen_info *ssi = &si->screens[i];
@@ -968,7 +977,7 @@ demo_mode_restart_process (saver_info *si)
 }
 
 static void
 }
 
 static void
-hack_environment (saver_screen_info *ssi)
+hack_subproc_environment (saver_screen_info *ssi)
 {
   /* Store $DISPLAY into the environment, so that the $DISPLAY variable that
      the spawned processes inherit is correct.  First, it must be on the same
 {
   /* Store $DISPLAY into the environment, so that the $DISPLAY variable that
      the spawned processes inherit is correct.  First, it must be on the same
@@ -1009,6 +1018,28 @@ hack_environment (saver_screen_info *ssi)
 #endif /* HAVE_PUTENV */
 }
 
 #endif /* HAVE_PUTENV */
 }
 
+
+void
+hack_environment (saver_info *si)
+{
+#if defined(HAVE_PUTENV) && defined(DEFAULT_PATH_PREFIX)
+  static const char *def_path = DEFAULT_PATH_PREFIX;
+  if (def_path && *def_path)
+    {
+      const char *opath = getenv("PATH");
+      char *npath = (char *) malloc(strlen(def_path) + strlen(opath) + 20);
+      strcpy (npath, "PATH=");
+      strcat (npath, def_path);
+      strcat (npath, ":");
+      strcat (npath, opath);
+
+      if (putenv (npath))
+       abort ();
+    }
+#endif /* HAVE_PUTENV && DEFAULT_PATH_PREFIX */
+}
+
+
 \f
 /* Change the uid/gid of the screensaver process, so that it is safe for it
    to run setuid root (which it needs to do on some systems to read the 
 \f
 /* Change the uid/gid of the screensaver process, so that it is safe for it
    to run setuid root (which it needs to do on some systems to read the 
index bc92893a59c357b0d45503af94e0245f6c42b3a7..89026d1bd6d5b168bba4004cf1966c243e1e1fc2 100644 (file)
@@ -608,6 +608,14 @@ watchdog_timer (XtPointer closure, XtIntervalId *id)
 #endif /* DEBUG_TIMERS */
 
          raise_window (si, True, True, running_p);
 #endif /* DEBUG_TIMERS */
 
          raise_window (si, True, True, running_p);
+
+         if (!monitor_powered_on_p (si))
+           {
+             if (si->prefs.verbose_p)
+               printf ("%s: server reports that monitor has powered down; "
+                       "killing running hacks.\n", progname);
+             kill_screenhack (si);
+           }
        }
     }
 }
        }
     }
 }
index b91ee2a0b0c7f0366bdc52a9bbb4a63f5d6614c4..1ec24e4e4af2fecdad427bf8f7900d172163edeb 100644 (file)
@@ -1042,6 +1042,8 @@ unblank_screen (saver_info *si)
   saver_preferences *p = &si->prefs;
   int i;
 
   saver_preferences *p = &si->prefs;
   int i;
 
+  monitor_power_on (si);
+
   store_activate_time (si, True);
   reset_watchdog_timer (si, False);
 
   store_activate_time (si, True);
   reset_watchdog_timer (si, False);
 
index cc3de5869511073732e9aac68204db1894805b1e..f3d345bc071dc878e04a3d05b0f3f440627c017b 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "15-Jun-98 (2.21)" "X Version 11"
+.TH XScreenSaver 1 "21-Jun-98 (2.23)" "X Version 11"
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
index 7f4b0bd8a816a99b39582ba3c61248fc34ac85ce..f3f43a772747a098742b86cb6cf9ec0659126aae 100644 (file)
@@ -659,23 +659,23 @@ initialize (saver_info *si, int argc, char **argv)
 #ifdef NO_LOCKING
   si->locking_disabled_p = True;
   si->nolock_reason = "not compiled with locking support";
 #ifdef NO_LOCKING
   si->locking_disabled_p = True;
   si->nolock_reason = "not compiled with locking support";
-#else
+#else  /* !NO_LOCKING */
   si->locking_disabled_p = False;
 
   si->locking_disabled_p = False;
 
-#ifdef SCO
+# ifdef SCO
   set_auth_parameters(argc, argv);
   set_auth_parameters(argc, argv);
-#endif
+# endif /* SCO */
 
   if (! lock_init (argc, argv))        /* before hack_uid() for proper permissions */
     {
       si->locking_disabled_p = True;
       si->nolock_reason = "error getting password";
     }
 
   if (! lock_init (argc, argv))        /* before hack_uid() for proper permissions */
     {
       si->locking_disabled_p = True;
       si->nolock_reason = "error getting password";
     }
-#endif
+#endif  /* !NO_LOCKING */
 
 #ifndef NO_SETUID
   hack_uid (si);
 
 #ifndef NO_SETUID
   hack_uid (si);
-#endif
+#endif /* NO_SETUID */
 
   progclass = "XScreenSaver";
 
 
   progclass = "XScreenSaver";
 
@@ -704,6 +704,8 @@ initialize (saver_info *si, int argc, char **argv)
     if (ensure_no_screensaver_running (si->dpy, si->screens[i].screen))
       exit (1);
 
     if (ensure_no_screensaver_running (si->dpy, si->screens[i].screen))
       exit (1);
 
+  hack_environment (si);
+
   si->demo_mode_p = initial_demo_mode_p;
   srandom ((int) time ((time_t *) 0));
 
   si->demo_mode_p = initial_demo_mode_p;
   srandom ((int) time ((time_t *) 0));
 
index 347963a8cd211a07a1274c0616f4d904a01d7677..92cba9672b3960b9e4257ffc6a99bb8744691fb2 100644 (file)
@@ -267,6 +267,10 @@ extern Bool query_mit_saver_extension (saver_info *);
 extern Bool query_sgi_saver_extension (saver_info *);
 #endif
 
 extern Bool query_sgi_saver_extension (saver_info *);
 #endif
 
+/* Display Power Management System (DPMS) interface. */
+extern Bool monitor_powered_on_p (saver_info *si);
+extern void monitor_power_on (saver_info *si);
+
 
 /* =======================================================================
    blanking
 
 /* =======================================================================
    blanking
@@ -335,6 +339,7 @@ extern Bool handle_clientmessage (saver_info *, XEvent *, Bool);
    subprocs
    ======================================================================= */
 
    subprocs
    ======================================================================= */
 
+extern void hack_environment (saver_info *si);
 extern void init_sigchld (void);
 extern void spawn_screenhack (saver_info *si, Bool first_time_p);
 extern void kill_screenhack (saver_info *si);
 extern void init_sigchld (void);
 extern void spawn_screenhack (saver_info *si, Bool first_time_p);
 extern void kill_screenhack (saver_info *si);
index ce5756bb6b5b8c59a7e0917994d95430e8aec24a..6d646453cc27a1bdb89f090f9158b9b14b60ff90 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "15-Jun-98 (2.21)" "X Version 11"
+.TH XScreenSaver 1 "21-Jun-98 (2.23)" "X Version 11"
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
@@ -546,6 +546,25 @@ For all the gory details, see the commentary at the top of xscreensaver.c.
 You can control a running screensaver process by using the
 .BR xscreensaver\-command (1)
 program (which see.)
 You can control a running screensaver process by using the
 .BR xscreensaver\-command (1)
 program (which see.)
+.SH POWER MANAGEMENT
+Modern X servers contain support to power down the monitor after an idle
+period.  If the monitor has powered down, then \fIxscreensaver\fP will
+notice this, and will not waste CPU by drawing graphics demos on a black
+screen.  An attempt will also be made to explicitly power the monitor
+back up as soon as user activity is detected.
+
+If your X server supports power management, then
+.BR xset (1)
+will accept a \fBdpms\fP option.  So, if you wanted \fIxscreensaver\fP
+to activate after 5 minutes, but you wanted your monitor to power down
+after one hour (3600 seconds) you would do this:
+.EX
+xset dpms 3600
+.EE
+See the man page for the
+.BR xset (1)
+program for details.  (Note that power management requires both software
+support in the X server, and hardware support in the monitor itself.)
 .SH USING XDM(1)
 You can run \fIxscreensaver\fP from your xdm session, so that the 
 screensaver will run even when nobody is logged in on the console.  
 .SH USING XDM(1)
 You can run \fIxscreensaver\fP from your xdm session, so that the 
 screensaver will run even when nobody is logged in on the console.  
@@ -658,10 +677,16 @@ under VUE are similar to the above:
 .RS 4
 .TP 3
 \fB1: Switch off VUE's locker\fP
 .RS 4
 .TP 3
 \fB1: Switch off VUE's locker\fP
-Do this by turning off ``\fIScreen Saver and Screen Lock\fP'' in the
-Screen section of the Style Manager.
+Open the ``\fIStyle Manager\fP'' and select ``\fIScreen\fP.''
+Turn off ``\fIScreen Saver and Screen Lock\fP'' option.
+.TP 3
+\fB2: Make sure you have a Session\fP
+Next, go to the Style Manager's, ``\fIStartup\fP'' page.
+Click on ``\fISet Home Session\fP'' to create a session, then 
+on ``\fIReturn to Home Session\fP'' to select this session each
+time you log in.
 .TP 3
 .TP 3
-\fB2: Edit vue.session\fP
+\fB3: Edit vue.session\fP
 Edit the file \fI~/.vue/sessions/home/vue.session\fP and add to it
 the line
 .EX
 Edit the file \fI~/.vue/sessions/home/vue.session\fP and add to it
 the line
 .EX
@@ -700,7 +725,7 @@ or (probably) any of \fItwm\fP's many descendants, you can do it like this:
 .TP 3
 \fB1. Create ~/.mwmrc (or ~/.twmrc or ...)\fP
 If you don't have a \fI~/.mwmrc\fP file (or, on SGIs, a \fI~/.4Dwmrc\fP file;
 .TP 3
 \fB1. Create ~/.mwmrc (or ~/.twmrc or ...)\fP
 If you don't have a \fI~/.mwmrc\fP file (or, on SGIs, a \fI~/.4Dwmrc\fP file;
-or, with TWM, a \fI~/.twmrc\fP file) then create one by making a copy of
+or, with twm, a \fI~/.twmrc\fP file) then create one by making a copy of
 the \fI/usr/lib/X11/system.mwmrc\fP 
 file (or \fI/usr/lib/X11/twm/system.twmrc\fP, and so on.)
 .TP 3
 the \fI/usr/lib/X11/system.mwmrc\fP 
 file (or \fI/usr/lib/X11/twm/system.twmrc\fP, and so on.)
 .TP 3
@@ -972,6 +997,7 @@ http://people.netscape.com/jwz/xscreensaver/
 .BR X (1),
 .BR xscreensaver\-command (1),
 .BR xdm (1),
 .BR X (1),
 .BR xscreensaver\-command (1),
 .BR xdm (1),
+.BR xset (1),
 .BR ant (1),
 .BR atlantis (1),
 .BR attraction (1),
 .BR ant (1),
 .BR atlantis (1),
 .BR attraction (1),
index 0c6f6f89159c408cf4ef95d0ba359d8f38e54254..142acc325a35fba988530f1123fb1989647a2c85 100644 (file)
@@ -134,7 +134,7 @@ init_sgi_saver_extension (saver_info *si)
 #endif /* HAVE_SGI_SAVER_EXTENSION */
 
 \f
 #endif /* HAVE_SGI_SAVER_EXTENSION */
 
 \f
-/* Figuring out what the appropriate XSetScreenSaver() paramters are
+/* Figuring out what the appropriate XSetScreenSaver() parameters are
    (one wouldn't expect this to be rocket science.)
  */
 
    (one wouldn't expect this to be rocket science.)
  */
 
@@ -234,3 +234,121 @@ disable_builtin_screensaver (saver_info *si, Bool turn_off_p)
     /* Turn off the server builtin saver if it is now running. */
     XForceScreenSaver (si->dpy, ScreenSaverReset);
 }
     /* Turn off the server builtin saver if it is now running. */
     XForceScreenSaver (si->dpy, ScreenSaverReset);
 }
+
+\f
+/* Display Power Management System (DPMS.)
+
+   On XFree86 systems, "man xset" reports:
+
+       -dpms    The -dpms option disables DPMS (Energy Star) features.
+       +dpms    The +dpms option enables DPMS (Energy Star) features.
+
+       dpms flags...
+                The dpms option allows the DPMS (Energy Star)
+                parameters to be set.  The option can take up to three
+                numerical values, or the `force' flag followed by a
+                DPMS state.  The `force' flags forces the server to
+                immediately switch to the DPMS state specified.  The
+                DPMS state can be one of `standby', `suspend', or
+                `off'.  When numerical values are given, they set the
+                inactivity period before the three modes are activated.
+                The first value given is for the `standby' mode, the
+                second is for the `suspend' mode, and the third is for
+                the `off' mode.  Setting these values implicitly
+                enables the DPMS features.  A value of zero disables a
+                particular mode.
+
+   However, note that the implementation is more than a little bogus,
+   in that there is code in /usr/X11R6/lib/libXdpms.a to implement all
+   the usual server-extension-querying utilities -- but there are no
+   prototypes in any header file!  Thus, the prototypes here.  (The
+   stuff in X11/extensions/dpms.h and X11/extensions/dpmsstr.h define
+   the raw X protcol, they don't define the API to libXdpms.a.)
+ */
+
+#ifdef HAVE_DPMS_EXTENSION
+
+#include <X11/Xproto.h>                        /* for CARD16 */
+#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsstr.h>
+
+extern Bool DPMSQueryExtension (Display *dpy, int *event_ret, int *error_ret);
+extern Bool DPMSCapable (Display *dpy);
+extern Status DPMSForceLevel (Display *dpy, CARD16 level);
+extern Status DPMSInfo (Display *dpy, CARD16 *power_level, BOOL *state);
+
+#if 0 /* others we don't use */
+extern Status DPMSGetVersion (Display *dpy, int *major_ret, int *minor_ret);
+extern Status DPMSSetTimeouts (Display *dpy,
+                              CARD16 standby, CARD16 suspend, CARD16 off);
+extern Bool DPMSGetTimeouts (Display *dpy,
+                            CARD16 *standby, CARD16 *suspend, CARD16 *off);
+extern Status DPMSEnable (Display *dpy);
+extern Status DPMSDisable (Display *dpy);
+#endif /* 0 */
+
+
+Bool
+monitor_powered_on_p (saver_info *si)
+{
+  Bool result;
+  int event_number, error_number;
+  BOOL onoff = False;
+  CARD16 state;
+
+  if (!DPMSQueryExtension(si->dpy, &event_number, &error_number))
+    /* Server doesn't know -- assume the monitor is on. */
+    result = True;
+
+  else if (!DPMSCapable(si->dpy))
+    /* Server says the monitor doesn't do power management -- so it's on. */
+    result = True;
+
+  else
+    {
+      DPMSInfo(si->dpy, &state, &onoff);
+      if (!onoff)
+       /* Server says DPMS is disabled -- so the monitor is on. */
+       result = True;
+      else
+       switch (state) {
+       case DPMSModeOn:      result = True;  break;  /* really on */
+       case DPMSModeStandby: result = False; break;  /* kinda off */
+       case DPMSModeSuspend: result = False; break;  /* pretty off */
+       case DPMSModeOff:     result = False; break;  /* really off */
+       default:              result = True;  break;  /* protocol error? */
+       }
+    }
+
+  return result;
+}
+
+void
+monitor_power_on (saver_info *si)
+{
+  if (!monitor_powered_on_p (si))
+    {
+      DPMSForceLevel(si->dpy, DPMSModeOn);
+      XSync(si->dpy, False);
+      if (!monitor_powered_on_p (si))
+       fprintf (stderr,
+       "%s: DPMSForceLevel(dpy, DPMSModeOn) did not power the monitor on?\n",
+                progname);
+    }
+}
+
+#else  /* !HAVE_DPMS_EXTENSION */
+
+Bool
+monitor_powered_on_p (saver_info *si) 
+{
+  return True; 
+}
+
+void
+monitor_power_on (saver_info *si)
+{
+  return; 
+}
+
+#endif /* !HAVE_DPMS_EXTENSION */
index 5f299ce5753d0e4dbedd18d035a06269ceb3004b..ecc170c075525c30aa034c16ed27ba3ef048ae78 100644 (file)
@@ -30,6 +30,7 @@ SHELL         = /bin/sh
 INSTALL                = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA   = @INSTALL_DATA@
 INSTALL                = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA   = @INSTALL_DATA@
+INSTALL_DIRS   = @INSTALL_DIRS@
 HACKDIR                = @HACKDIR@
 
 X_CFLAGS       = @X_CFLAGS@
 HACKDIR                = @HACKDIR@
 
 X_CFLAGS       = @X_CFLAGS@
@@ -37,6 +38,8 @@ X_LIBS                = @X_LIBS@
 X_PRE_LIBS     = @X_PRE_LIBS@
 X_EXTRA_LIBS   = @X_EXTRA_LIBS@
 
 X_PRE_LIBS     = @X_PRE_LIBS@
 X_EXTRA_LIBS   = @X_EXTRA_LIBS@
 
+# Note: see comment in ../driver/Makefile.in for explanation of X_LIBS, etc.
+#
 HACK_PRE       = $(LIBS) $(X_LIBS) $(X_PRE_LIBS)
 HACK_POST      = -lXt -lX11 -lXext $(X_EXTRA_LIBS) -lm
 HACK_LIBS      = $(HACK_PRE)            @HACK_LIBS@ $(HACK_POST)
 HACK_PRE       = $(LIBS) $(X_LIBS) $(X_PRE_LIBS)
 HACK_POST      = -lXt -lX11 -lXext $(X_EXTRA_LIBS) -lm
 HACK_LIBS      = $(HACK_PRE)            @HACK_LIBS@ $(HACK_POST)
@@ -75,7 +78,7 @@ SRCS          = attraction.c blitspin.c bouboule.c braid.c bubbles.c \
                  rd-bomb.c coral.c mountain.c triangle.c lissie.c worm.c \
                  rotor.c ant.c xjack.c xlyap.c jigsaw.c xscreensaver-sgigl.c \
                  cynosure.c moire2.c flow.c epicycle.c interference.c \
                  rd-bomb.c coral.c mountain.c triangle.c lissie.c worm.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
+                 truchet.c bsod.c crystal.c discrete.c
 
 OBJS           = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  bubbles-default.o decayscreen.o deco.o drift.o flag.o \
 
 OBJS           = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  bubbles-default.o decayscreen.o deco.o drift.o flag.o \
@@ -89,7 +92,7 @@ OBJS          = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  rd-bomb.o coral.o mountain.o triangle.o lissie.o worm.o \
                  rotor.o ant.o xjack.o xlyap.o jigsaw.o xscreensaver-sgigl.o \
                  cynosure.o moire2.o flow.o epicycle.o interference.o \
                  rd-bomb.o coral.o mountain.o triangle.o lissie.o worm.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
+                 truchet.o bsod.o crystal.o discrete.o
 
 EXES           = attraction blitspin bouboule braid bubbles decayscreen deco \
                  drift flag flame forest vines galaxy grav greynetic halo \
 
 EXES           = attraction blitspin bouboule braid bubbles decayscreen deco \
                  drift flag flame forest vines galaxy grav greynetic halo \
@@ -99,7 +102,7 @@ EXES         = attraction blitspin bouboule braid bubbles decayscreen deco \
                  slip sphere spiral strange swirl xroger goop starfish munch \
                  fadeplot rd-bomb coral mountain triangle lissie worm rotor \
                  ant xjack xlyap jigsaw cynosure moire2 flow epicycle \
                  slip sphere spiral strange swirl xroger goop starfish munch \
                  fadeplot rd-bomb coral mountain triangle lissie worm rotor \
                  ant xjack xlyap jigsaw cynosure moire2 flow epicycle \
-                 interference truchet bsod
+                 interference truchet bsod crystal discrete
 
 HACK_OBJS_1    = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
                  $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@
 
 HACK_OBJS_1    = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
                  $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@
@@ -148,16 +151,16 @@ install-strip:
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
 
 install-program:
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
 
 install-program:
-       @if [ ! -d $(HACKDIR) ]; then mkdir $(HACKDIR) ; fi ;           \
-       for program in $(EXES); do                                      \
+       @exes="$(EXES)" ;                                               \
+       if [ ! -d $(HACKDIR) ]; then $(INSTALL_DIRS) $(HACKDIR) ; fi ;  \
+       for program in $$exes; do                                       \
          echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;      \
          $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;           \
        done
 
 install-man:
          echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;      \
          $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;           \
        done
 
 install-man:
-       @if [ ! -d $(mandir) ]; then mkdir $(mandir) ; fi ;             \
-       if [ ! -d $(man1dir) ]; then mkdir $(man1dir) ; fi ;            \
-       men="$(MEN)" ;                                                  \
+       @men="$(MEN)" ;                                                 \
+       if [ ! -d $(man1dir) ]; then $(INSTALL_DIRS) $(man1dir) ; fi ;  \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
          echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
          echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
@@ -529,6 +532,12 @@ ant:               ant.o           $(XLOCK_OBJS) $(ERASE)
 flow:          flow.o          $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
 flow:          flow.o          $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
+discrete:      discrete.o              $(XLOCK_OBJS) $(ERASE)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS)
+
+crystal:       crystal.o               $(XLOCK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+
 
 ##############################################################################
 #
 
 ##############################################################################
 #
@@ -1324,4 +1333,27 @@ bsod.o: $(UTILS_SRC)/grabscreen.h
 bsod.o: $(UTILS_SRC)/visual.h
 bsod.o: $(srcdir)/images/amiga.xpm
 bsod.o: $(srcdir)/images/mac.xbm
 bsod.o: $(UTILS_SRC)/visual.h
 bsod.o: $(srcdir)/images/amiga.xpm
 bsod.o: $(srcdir)/images/mac.xbm
+crystal.o: $(srcdir)/xlockmore.h
+crystal.o: ../config.h
+crystal.o: $(srcdir)/xlockmoreI.h
+crystal.o: $(srcdir)/screenhack.h
+crystal.o: $(UTILS_SRC)/yarandom.h
+crystal.o: $(UTILS_SRC)/usleep.h
+crystal.o: $(UTILS_SRC)/resources.h
+crystal.o: $(UTILS_SRC)/hsv.h
+crystal.o: $(UTILS_SRC)/colors.h
+crystal.o: $(UTILS_SRC)/grabscreen.h
+crystal.o: $(UTILS_SRC)/visual.h
+discrete.o: $(srcdir)/xlockmore.h
+discrete.o: ../config.h
+discrete.o: $(srcdir)/xlockmoreI.h
+discrete.o: $(srcdir)/screenhack.h
+discrete.o: $(UTILS_SRC)/yarandom.h
+discrete.o: $(UTILS_SRC)/usleep.h
+discrete.o: $(UTILS_SRC)/resources.h
+discrete.o: $(UTILS_SRC)/hsv.h
+discrete.o: $(UTILS_SRC)/colors.h
+discrete.o: $(UTILS_SRC)/grabscreen.h
+discrete.o: $(UTILS_SRC)/visual.h
+discrete.o: $(UTILS_SRC)/erase.h
 
 
index 667a67b0ffd249558b86014a04debb93b5038868..0cea509a40406b687b1c8b6a17cfdd80f945cd68 100644 (file)
@@ -612,8 +612,8 @@ run_balls (Display *dpy, Window window)
 char *progclass = "Attraction";
 
 char *defaults [] = {
 char *progclass = "Attraction";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*mode:      balls",
   "*points:    0",
   "*size:      0",
   "*mode:      balls",
   "*points:    0",
   "*size:      0",
index 5a58062637dc7ed4b9dd680a78ad70ca52bb3e6e..5b3cf8c14f4053a7738643eae0266ab2b6fd3bf6 100644 (file)
@@ -333,8 +333,8 @@ display (Pixmap pixmap)
 char *progclass = "BlitSpin";
 
 char *defaults [] = {
 char *progclass = "BlitSpin";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*delay:     500000",
   "*delay2:    500000",
   "*bitmap:    (default)",
   "*delay:     500000",
   "*delay2:    500000",
   "*bitmap:    (default)",
index e3c0994ab907e0a699cd9799c6b1e6c0b0a8f6ce..e127ea1b8a0c9139876d334be34f4931a3f00b44 100644 (file)
@@ -35,7 +35,9 @@
 
 static void
 draw_string (Display *dpy, Window window, GC gc, XGCValues *gcv,
 
 static void
 draw_string (Display *dpy, Window window, GC gc, XGCValues *gcv,
-            XFontStruct *font, int win_width, int win_height,
+            XFontStruct *font,
+            int xoff, int yoff,
+            int win_width, int win_height,
             const char *string, int delay)
 {
   int x, y;
             const char *string, int delay)
 {
   int x, y;
@@ -68,8 +70,11 @@ draw_string (Display *dpy, Window window, GC gc, XGCValues *gcv,
   x = (win_width - (width * char_width)) / 2;
   y = (win_height - (height * line_height)) / 2;
 
   x = (win_width - (width * char_width)) / 2;
   y = (win_height - (height * line_height)) / 2;
 
-  if (x < char_width) x = char_width;
-  if (y < line_height) y = line_height;
+  if (x < 0) x = 2;
+  if (y < 0) y = 2;
+
+  x += xoff;
+  y += yoff;
 
   se = s = string;
   while (1)
 
   se = s = string;
   while (1)
@@ -155,7 +160,7 @@ bsod_sleep(Display *dpy, int seconds)
   XEvent event;
   int q = seconds * 4;
   int mask = KeyPressMask|ButtonPressMask;
   XEvent event;
   int q = seconds * 4;
   int mask = KeyPressMask|ButtonPressMask;
-  while (q > 0)
+  do
     {
       XSync(dpy, False);
       if (XCheckMaskEvent(dpy, mask, &event))
     {
       XSync(dpy, False);
       if (XCheckMaskEvent(dpy, mask, &event))
@@ -164,9 +169,14 @@ bsod_sleep(Display *dpy, int seconds)
            ;
          return True;
        }
            ;
          return True;
        }
-      q--;
-      usleep(250000);
+      if (q > 0)
+       {
+         q--;
+         usleep(250000);
+       }
     }
     }
+  while (q > 0);
+
   return False; 
 }
 
   return False; 
 }
 
@@ -273,9 +283,10 @@ windows (Display *dpy, Window window, int delay, Bool w95p)
   gc = XCreateGC(dpy, window, GCFont|GCForeground|GCBackground, &gcv);
 
   if (w95p)
   gc = XCreateGC(dpy, window, GCFont|GCForeground|GCBackground, &gcv);
 
   if (w95p)
-    draw_string(dpy, window, gc, &gcv, font, xgwa.width, xgwa.height, w95, 0);
+    draw_string(dpy, window, gc, &gcv, font,
+               0, 0, xgwa.width, xgwa.height, w95, 0);
   else
   else
-    draw_string(dpy, window, gc, &gcv, font, 10, 10, wnt, 750);
+    draw_string(dpy, window, gc, &gcv, font, 0, 0, 10, 10, wnt, 750);
 
   XFreeGC(dpy, gc);
   XSync(dpy, False);
 
   XFreeGC(dpy, gc);
   XSync(dpy, False);
@@ -387,7 +398,7 @@ amiga (Display *dpy, Window window, int delay)
     }
 
   XFillRectangle(dpy, window, gc2, 0, 0, xgwa.width, height);
     }
 
   XFillRectangle(dpy, window, gc2, 0, 0, xgwa.width, height);
-  draw_string(dpy, window, gc, &gcv, font, xgwa.width, height, string, 0);
+  draw_string(dpy, window, gc, &gcv, font, 0, 0, xgwa.width, height, string,0);
 
   {
     GC gca = gc;
 
   {
     GC gca = gc;
@@ -459,8 +470,8 @@ mac (Display *dpy, Window window, int delay)
                                       gcv.background,
                                       xgwa.depth);
 
                                       gcv.background,
                                       xgwa.depth);
 
-  draw_string(dpy, window, gc, &gcv, font, xgwa.width, xgwa.height + offset,
-             string, 0);
+  draw_string(dpy, window, gc, &gcv, font, 0, 0,
+             xgwa.width, xgwa.height + offset, string, 0);
 
   for(i = 0; i < 2; i++)
     {
 
   for(i = 0; i < 2; i++)
     {
@@ -486,26 +497,208 @@ mac (Display *dpy, Window window, int delay)
   XFreeFont(dpy, font);
 }
 
   XFreeFont(dpy, font);
 }
 
+static void
+macsbug (Display *dpy, Window window, int delay)
+{
+  XGCValues gcv;
+  XWindowAttributes xgwa;
+  char *fontname;
+  const char *def_font = "fixed";
+  XFontStruct *font;
+  GC gc, gc2;
+
+  int char_width, line_height;
+  int col_right, row_top, row_bottom, page_right, page_bottom, body_top;
+  int xoff, yoff;
+
+  const char *left = ("    SP     \n"
+                     " 04EB0A58  \n"
+                     "58 00010000\n"
+                     "5C 00010000\n"
+                     "   ........\n"
+                     "60 00000000\n"
+                     "64 000004EB\n"
+                     "   ........\n"
+                     "68 0000027F\n"
+                     "6C 2D980035\n"
+                     "   ....-..5\n"
+                     "70 00000054\n"
+                     "74 0173003E\n"
+                     "   ...T.s.>\n"
+                     "78 04EBDA76\n"
+                     "7C 04EBDA8E\n"
+                     "   .S.L.a.U\n"
+                     "80 00000000\n"
+                     "84 000004EB\n"
+                     "   ........\n"
+                     "88 00010000\n"
+                     "8C 00010000\n"
+                     "   ...{3..S\n"
+                     "\n"
+                     "\n"
+                     " CurApName \n"
+                     "  Finder   \n"
+                     "\n"
+                     " 32-bit VM \n"
+                     "SR Smxnzvc0\n"
+                     "D0 04EC0062\n"
+                     "D1 00000053\n"
+                     "D2 FFFF0100\n"
+                     "D3 00010000\n"
+                     "D4 00010000\n"
+                     "D5 04EBDA76\n"
+                     "D6 04EBDA8E\n"
+                     "D7 00000001\n"
+                     "\n"
+                     "A0 04EBDA76\n"
+                     "A1 04EBDA8E\n"
+                     "A2 A0A00060\n"
+                     "A3 027F2D98\n"
+                     "A4 027F2E58\n"
+                     "A5 04EC04F0\n"
+                     "A6 04EB0A86\n"
+                     "A7 04EB0A58");
+  const char *bottom = ("  _A09D\n"
+                       "     +00884    40843714     #$0700,SR         "
+                       "                  ; A973        | A973\n"
+                       "     +00886    40843765     *+$0400           "
+                       "                                | 4A1F\n"
+                       "     +00888    40843718     $0004(A7),([0,A7[)"
+                       "                  ; 04E8D0AE    | 66B8");
+  const char *body = ("Bus Error at 4BF6D6CC\n"
+                     "while reading word from 4BF6D6CC in User data space\n"
+                     " Unable to access that address\n"
+                     "  PC: 2A0DE3E6\n"
+                     "  Frame Type: B008");
+  const char *s;
+  int body_lines = 1;
+
+  for (s = body; *s; s++) if (*s == '\n') body_lines++;
+
+  XGetWindowAttributes (dpy, window, &xgwa);
+
+  fontname = get_string_resource ((xgwa.height > 850
+                                  ? "macsbug.font3"
+                                  : (xgwa.height > 700
+                                     ? "macsbug.font2"
+                                     : "macsbug.font")),
+                                 "MacsBug.Font");
+  if (!fontname || !*fontname) fontname = (char *)def_font;
+  font = XLoadQueryFont (dpy, fontname);
+  if (!font) font = XLoadQueryFont (dpy, def_font);
+  if (!font) exit(-1);
+  if (fontname && fontname != def_font)
+    free (fontname);
+
+  gcv.font = font->fid;
+  gcv.foreground = get_pixel_resource("macsbug.foreground",
+                                     "MacsBug.Foreground",
+                                     dpy, xgwa.colormap);
+  gcv.background = get_pixel_resource("macsbug.background",
+                                     "MacsBug.Background",
+                                     dpy, xgwa.colormap);
+
+  gc = XCreateGC(dpy, window, GCFont|GCForeground|GCBackground, &gcv);
+
+  gcv.foreground = gcv.background;
+  gc2 = XCreateGC(dpy, window, GCForeground, &gcv);
+
+  XSetWindowBackground(dpy, window,
+                      get_pixel_resource("macsbug.borderColor",
+                                         "MacsBug.BorderColor",
+                                         dpy, xgwa.colormap));
+  XClearWindow(dpy, window);
+
+  char_width = (font->per_char
+               ? font->per_char['n'-font->min_char_or_byte2].width
+               : font->min_bounds.width);
+  line_height = font->ascent + font->descent + 1;
+
+  col_right = char_width * 12;
+  page_bottom = line_height * 47;
+
+  if (page_bottom > xgwa.height) page_bottom = xgwa.height;
+
+  row_bottom = page_bottom - line_height;
+  row_top = row_bottom - (line_height * 4);
+  page_right = col_right + (char_width * 88);
+  body_top = row_top - (line_height * body_lines);
+
+  page_bottom += 2;
+  row_bottom += 2;
+  body_top -= 4;
+
+  xoff = (xgwa.width - page_right) / 2;
+  yoff = (xgwa.height - page_bottom) / 2;
+  if (xoff < 0) xoff = 0;
+  if (yoff < 0) yoff = 0;
+
+  XFillRectangle(dpy, window, gc2, xoff, yoff, page_right, page_bottom);
+
+  draw_string(dpy, window, gc, &gcv, font, xoff, yoff, 10, 10, left, 0);
+  draw_string(dpy, window, gc, &gcv, font, xoff+col_right, yoff+row_top,
+             10, 10, bottom, 0);
+  draw_string(dpy, window, gc, &gcv, font,
+             xoff + col_right + char_width, yoff + body_top, 10, 10, body, 0);
+
+  XFillRectangle(dpy, window, gc, xoff + col_right, yoff, 2, page_bottom);
+  XDrawLine(dpy, window, gc,
+           xoff+col_right, yoff+row_top, xoff+page_right, yoff+row_top);
+  XDrawLine(dpy, window, gc,
+           xoff+col_right, yoff+row_bottom, xoff+page_right, yoff+row_bottom);
+  XDrawRectangle(dpy, window, gc,  xoff, yoff, page_right, page_bottom);
+
+  while (delay > 0)
+    {
+      XDrawLine(dpy, window, gc,
+               xoff+col_right+(char_width/2)+2, yoff+row_bottom+3,
+               xoff+col_right+(char_width/2)+2, yoff+page_bottom-3);
+      XSync(dpy, False);
+      usleep(666666L);
+      XDrawLine(dpy, window, gc2,
+               xoff+col_right+(char_width/2)+2, yoff+row_bottom+3,
+               xoff+col_right+(char_width/2)+2, yoff+page_bottom-3);
+      XSync(dpy, False);
+      usleep(333333L);
+      if (bsod_sleep(dpy, 0))
+       break;
+      delay--;
+    }
+
+  XFreeGC(dpy, gc);
+  XFreeGC(dpy, gc2);
+  XClearWindow(dpy, window);
+  XFreeFont(dpy, font);
+}
+
+
 \f
 char *progclass = "BSOD";
 
 char *defaults [] = {
 \f
 char *progclass = "BSOD";
 
 char *defaults [] = {
-  "*delay:                     30",
-
-  "BSOD.Windows.font:          -*-courier-bold-r-*-*-*-120-*-*-m-*-*-*",
-  "BSOD.Windows.font2:         -*-courier-bold-r-*-*-*-180-*-*-m-*-*-*",
-  "BSOD.Windows.foreground:    White",
-  "BSOD.Windows.background:    Blue",
-
-  "BSOD.Amiga.font:            -*-courier-bold-r-*-*-*-120-*-*-m-*-*-*",
-  "BSOD.Amiga.font2:           -*-courier-bold-r-*-*-*-180-*-*-m-*-*-*",
-  "BSOD.Amiga.foreground:      Red",
-  "BSOD.Amiga.background:      Black",
-  "BSOD.Amiga.background2:     White",
-
-  "BSOD.Mac.font:              -*-courier-bold-r-*-*-*-120-*-*-m-*-*-*",
-  "BSOD.Mac.foreground:                PaleTurquoise1",
-  "BSOD.Mac.background:                Black",
+  "*delay:              30",
+
+  ".Windows.font:       -*-courier-bold-r-*-*-*-120-*-*-m-*-*-*",
+  ".Windows.font2:      -*-courier-bold-r-*-*-*-180-*-*-m-*-*-*",
+  ".Windows.foreground:         White",
+  ".Windows.background:         Blue",
+
+  ".Amiga.font:                 -*-courier-bold-r-*-*-*-120-*-*-m-*-*-*",
+  ".Amiga.font2:        -*-courier-bold-r-*-*-*-180-*-*-m-*-*-*",
+  ".Amiga.foreground:   Red",
+  ".Amiga.background:   Black",
+  ".Amiga.background2:  White",
+
+  ".Mac.font:           -*-courier-bold-r-*-*-*-120-*-*-m-*-*-*",
+  ".Mac.foreground:     PaleTurquoise1",
+  ".Mac.background:     Black",
+
+  ".MacsBug.font:       -*-courier-medium-r-*-*-*-100-*-*-m-*-*-*",
+  ".MacsBug.font2:      -*-courier-bold-r-*-*-*-120-*-*-m-*-*-*",
+  ".MacsBug.font3:      -*-courier-bold-r-*-*-*-140-*-*-m-*-*-*",
+  ".MacsBug.foreground:         Black",
+  ".MacsBug.background:         White",
+  ".MacsBug.borderColor: #AAAAAA",
   0
 };
 
   0
 };
 
@@ -527,7 +720,7 @@ screenhack (Display *dpy, Window window)
 
   while (1)
     {
 
   while (1)
     {
-      while (i == j) i = random() % 4;
+      while (i == j) i = random() % 5;
       j = i;
 
       switch (i)
       j = i;
 
       switch (i)
@@ -536,6 +729,7 @@ screenhack (Display *dpy, Window window)
        case 1: windows(dpy, window, delay, False); break;
        case 2: amiga(dpy, window, delay); break;
        case 3: mac(dpy, window, delay); break;
        case 1: windows(dpy, window, delay, False); break;
        case 2: amiga(dpy, window, delay); break;
        case 3: mac(dpy, window, delay); break;
+       case 4: macsbug(dpy, window, delay); break;
        default: abort(); break;
        }
       XSync (dpy, True);
        default: abort(); break;
        }
       XSync (dpy, True);
index 7b4fdd56911ae8d52f9acf87976b23266437c48a..4946aeefde273ff2a7beb79a45eff9f87db9ed79 100644 (file)
@@ -76,8 +76,8 @@ extern char **default_bubbles[];
 char *progclass = "Bubbles";
 
 char *defaults [] = {
 char *progclass = "Bubbles";
 
 char *defaults [] = {
-  "Bubbles.background: black",
-  "*foreground:                white",
+  ".background:                black",
+  ".foreground:                white",
   "*simple:            false",
   "*broken:            false",
   "*delay:             800",
   "*simple:            false",
   "*broken:            false",
   "*delay:             800",
index d6421375493ee5b345ad7dceb5a8a040ccc35796..809004c86eec14ee4b0a27dc4fd4764917c8e437 100644 (file)
@@ -7,9 +7,11 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES-DEFAULT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CORAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES-DEFAULT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CORAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CRYSTAL.C
 $ 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]) 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]) DISCRETE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) EPICYCLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) EPICYCLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C
index d6421375493ee5b345ad7dceb5a8a040ccc35796..809004c86eec14ee4b0a27dc4fd4764917c8e437 100644 (file)
@@ -7,9 +7,11 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES-DEFAULT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CORAL.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES-DEFAULT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) BUBBLES.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CORAL.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) CRYSTAL.C
 $ 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]) 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]) DISCRETE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) EPICYCLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) EPICYCLE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C
index 74b5120b2609eed4f23c165f9476fb2e5092594f..8ace44d2c1e6787baa00bdca88b0448b4facf269 100644 (file)
@@ -225,13 +225,13 @@ coral(Display *dpy, Window window)
 char *progclass = "Coral";
 
 char *defaults[] = {
 char *progclass = "Coral";
 
 char *defaults[] = {
-    "Coral.background: black",
-    "Coral.foreground: white",
-    "*density: 25",
-    "*seeds: 20", /* too many for 640x480, too few for 1280x1024 */
-    "*delay: 5",
-    "*delay2: 1000",
-    0
+  ".background:        black",
+  ".foreground:        white",
+  "*density:   25",
+  "*seeds:     20", /* too many for 640x480, too few for 1280x1024 */
+  "*delay:     5",
+  "*delay2:    1000",
+  0
 };
 
 XrmOptionDescRec options[] = {
 };
 
 XrmOptionDescRec options[] = {
diff --git a/hacks/crystal.c b/hacks/crystal.c
new file mode 100644 (file)
index 0000000..caab2a8
--- /dev/null
@@ -0,0 +1,930 @@
+/* -*- Mode: C; tab-width: 4 -*- */
+/* crystal --- polygons moving according to plane group rules */
+
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)crystal.c    4.07 97/11/24 xlockmore";
+
+#endif
+
+/*-
+ * Copyright (c) 1997 by Jouk Jansen <joukj@crys.chem.uva.nl>
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * The author should like to be notified if changes have been made to the
+ * routine.  Response will only be guaranteed when a VMS version of the 
+ * program is available.
+ *
+ * A moving polygon-mode. The polygons obey 2D-planegroup symmetry.
+ *
+ * Revision History:
+ * 24-Feb-98: added option centre which turns on/off forcing the centre of
+ *              the screen to be used
+ *            added option maxsize which forces the dimensions to be chasen
+ *              in such ua way that the largest possible part of the screen is
+ *              used 
+ *            When only one unit cell is drawn, it is chosen at random
+ * 18-Feb-98: added support for negative numbers with -nx and -ny meaning
+ *            "random" choice with geiven maximum
+ *            added +/-grid option. If -cell is specified this option
+ *            determines if one or all unit cells are drawn.
+ *            -batchcount is now a parameter for all the objects on the screen
+ *            instead of the number of "unique" objects
+ *            The maximum size of the objects now scales with the part
+ *            of the screen used.
+ *            fixed "size" problem. Now very small non-vissable objects
+ *            are not allowed
+ * 13-Feb-98: randomized the unit cell size
+ *            runtime options -/+cell (turn on/off unit cell drawing)
+ *             -nx num (number of translational symmetries in x-direction
+ *             -ny num (idem y-direction but ignored for square and
+ *               hexagonal space groups
+ *               i.e. try xlock -mode crystal -nx 3 -ny 2
+ *            Fullrandom overrules the -/+cell option.
+ * 05-Feb-98: Revision + bug repairs
+ *            shows unit cell
+ *            use part of the screen for unit cell
+ *            in hexagonal and square groups a&b axis forced to be equal
+ *            cell angle for oblique groups randomly chosen between 60 and 120
+ *   bugs solved: planegroups with cell angles <> 90.0 now work properly
+ * 19-Sep-97: Added remaining hexagonal groups
+ * 12-Jun-97: Created
+ */
+
+#ifdef STANDALONE
+# define PROGCLASS             "Crystal"
+# define HACK_INIT             init_crystal
+# define HACK_DRAW             draw_crystal
+# define crystal_opts  xlockmore_opts
+# define DEFAULTS              "*delay:                60000   \n" \
+                                                "*count:                -500   \n" \
+                                                "*cycles:                200   \n" \
+                                                "*size:                  -15   \n" \
+                                                "*ncolors:               200   \n" \
+                                                "*fullrandom:   True   \n" \
+                                                "*verbose:             False   \n"
+# include "xlockmore.h"                /* in xscreensaver distribution */
+#else /* STANDALONE */
+# include "xlock.h"                    /* in xlockmore distribution */
+#endif /* STANDALONE */
+
+#define DEF_CELL "True"                /* Draw unit cell */
+#define DEF_GRID "False"       /* Draw unit all cell if DEF_CELL is True */
+#define DEF_NX "-3"            /* number of unit cells in x-direction */
+#define DEF_NX1 1              /* number of unit cells in x-direction */
+#define DEF_NY "-3"            /* number of unit cells in y-direction */
+#define DEF_NY1 1              /* number of unit cells in y-direction */
+#define DEF_CENTRE "False"
+#define DEF_MAXSIZE "False"
+
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+
+static int  nx, ny;
+
+static Bool unit_cell, grid_cell, centre, maxsize;
+
+static XrmOptionDescRec opts[] =
+{
+       {"-nx", "crystal.nx", XrmoptionSepArg, (caddr_t) NULL},
+       {"-ny", "crystal.ny", XrmoptionSepArg, (caddr_t) NULL},
+       {"-centre", ".crystal.centre", XrmoptionNoArg, (caddr_t) "on"},
+       {"+centre", ".crystal.centre", XrmoptionNoArg, (caddr_t) "off"},
+       {"-maxsize", ".crystal.maxsize", XrmoptionNoArg, (caddr_t) "on"},
+       {"+maxsize", ".crystal.maxsize", XrmoptionNoArg, (caddr_t) "off"},
+       {"-cell", ".crystal.cell", XrmoptionNoArg, (caddr_t) "on"},
+       {"+cell", ".crystal.cell", XrmoptionNoArg, (caddr_t) "off"},
+       {"-grid", ".crystal.grid", XrmoptionNoArg, (caddr_t) "on"},
+       {"+grid", ".crystal.grid", XrmoptionNoArg, (caddr_t) "off"}
+};
+
+static argtype vars[] =
+{
+       {(caddr_t *) & nx, "nx", "nx", DEF_NX, t_Int},
+       {(caddr_t *) & ny, "ny", "ny", DEF_NY, t_Int},
+       {(caddr_t *) & centre, "centre", "Centre", DEF_CENTRE, t_Bool},
+       {(caddr_t *) & maxsize, "maxsize", "Maxsize", DEF_MAXSIZE, t_Bool},
+       {(caddr_t *) & unit_cell, "cell", "Cell", DEF_CELL, t_Bool},
+       {(caddr_t *) & grid_cell, "grid", "Grid", DEF_GRID, t_Bool}
+};
+static OptionStruct desc[] =
+{
+       {"-nx num", "Number of unit cells in x-direction"},
+       {"-ny num", "Number of unit cells in y-direction"},
+       {"-/+centre", "turn on/off cenetering on screen"},
+       {"-/+maxsize", "turn on/off use of maximum part of screen"},
+       {"-/+cell", "turn on/off drawing of unit cell"},
+    {"-/+grid", "turn on/off drawing of grid of unit cells (if -cell is on)"}
+};
+
+ModeSpecOpt crystal_opts =
+{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc};
+
+#ifdef USE_MODULES
+ModStruct   crystal_description =
+{"crystal", "init_crystal", "draw_crystal", "release_crystal",
+ "refresh_crystal", "init_crystal", NULL, &crystal_opts,
+ 60000, -40, 200, -15, 64, 1.0, "",
+ "Shows polygons in 2D plane groups", 0, NULL};
+
+#endif
+
+#define DEF_NUM_ATOM 10
+
+#define DEF_SIZ_ATOM 10
+
+#define PI_RAD (M_PI / 180.0)
+
+static Bool centro[17] =
+{
+       False,
+       True,
+       False,
+       False,
+       False,
+       True,
+       True,
+       True,
+       True,
+       True,
+       True,
+       True,
+       False,
+       False,
+       False,
+       True,
+       True
+};
+
+static Bool primitive[17] =
+{
+       True,
+       True,
+       True,
+       True,
+       False,
+       True,
+       True,
+       True,
+       False,
+       True,
+       True,
+       True,
+       True,
+       True,
+       True,
+       True,
+       True
+};
+
+static short numops[34] =
+{
+       1, 0,
+       1, 0,
+       9, 7,
+       2, 0,
+       9, 7,
+       9, 7,
+       4, 2,
+       5, 3,
+       9, 7,
+       8, 6,
+       10, 6,
+       8, 4,
+       16, 13,
+       19, 13,
+       16, 10,
+       19, 13,
+       19, 13
+};
+
+static short operation[114] =
+{
+       1, 0, 0, 1, 0, 0,
+       -1, 0, 0, 1, 0, 1,
+       -1, 0, 0, 1, 1, 0,
+       1, 0, 0, 1, 0, 0,
+       -1, 0, 0, 1, 1, 1,
+       1, 0, 0, 1, 1, 1,
+       0, -1, 1, 0, 0, 0,
+       1, 0, 0, 1, 0, 0,
+       -1, 0, 0, 1, 0, 0,
+       0, 1, 1, 0, 0, 0,
+       -1, 0, -1, 1, 0, 0,
+       1, -1, 0, -1, 0, 0,
+       0, 1, 1, 0, 0, 0,
+       0, -1, 1, -1, 0, 0,
+       -1, 1, -1, 0, 0, 0,
+       1, 0, 0, 1, 0, 0,
+       0, -1, -1, 0, 0, 0,
+       -1, 1, 0, 1, 0, 0,
+       1, 0, 1, -1, 0, 0
+};
+
+typedef struct {
+       unsigned long colour;
+       int         x0, y0, velocity[2];
+       float       angle, velocity_a;
+       int         num_point, at_type, size_at;
+       XPoint      xy[5];
+} crystalatom;
+
+typedef struct {
+       Bool        painted;
+       int         win_width, win_height, num_atom;
+       int         planegroup, a, b, offset_w, offset_h, nx, ny;
+       float       gamma;
+       crystalatom *atom;
+       GC          gc;
+       Bool        unit_cell, grid_cell;
+} crystalstruct;
+
+static crystalstruct *crystals = NULL;
+
+static void
+trans_coor(XPoint * xyp, XPoint * new_xyp, int num_points,
+          float gamma)
+{
+       int         i;
+
+       for (i = 0; i <= num_points; i++) {
+               new_xyp[i].x = xyp[i].x +
+                       (int) (xyp[i].y * sin((gamma - 90.0) * PI_RAD));
+               new_xyp[i].y = (int) (xyp[i].y / cos((gamma - 90.0) * PI_RAD));
+       }
+}
+
+static void
+trans_coor_back(XPoint * xyp, XPoint * new_xyp,
+               int num_points, float gamma, int offset_w, int offset_h)
+{
+       int         i;
+
+       for (i = 0; i <= num_points; i++) {
+               new_xyp[i].y = (int) (xyp[i].y * cos((gamma - 90) * PI_RAD)) +
+                       offset_h;
+               new_xyp[i].x = xyp[i].x - (int) (xyp[i].y * sin((gamma - 90.0)
+                                                      * PI_RAD)) + offset_w;
+       }
+}
+
+static void
+crystal_setupatom(crystalatom * atom0, float gamma)
+{
+       XPoint      xy[5];
+       int         x0, y0;
+
+       y0 = (int) (atom0->y0 * cos((gamma - 90) * PI_RAD));
+       x0 = atom0->x0 - (int) (atom0->y0 * sin((gamma - 90.0) * PI_RAD));
+       switch (atom0->at_type) {
+               case 0: /* rectangles */
+                       xy[0].x = x0 + (int) (2 * atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (atom0->size_at * sin(atom0->angle));
+                       xy[0].y = y0 + (int) (atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (2 * atom0->size_at * sin(atom0->angle));
+                       xy[1].x = x0 + (int) (2 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (atom0->size_at * sin(atom0->angle));
+                       xy[1].y = y0 - (int) (atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (2 * atom0->size_at * sin(atom0->angle));
+                       xy[2].x = x0 - (int) (2 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (atom0->size_at * sin(atom0->angle));
+                       xy[2].y = y0 - (int) (atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (2 * atom0->size_at * sin(atom0->angle));
+                       xy[3].x = x0 - (int) (2 * atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (atom0->size_at * sin(atom0->angle));
+                       xy[3].y = y0 + (int) (atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (2 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[4].x = xy[0].x;
+                       xy[4].y = xy[0].y;
+                       trans_coor(xy, atom0->xy, 4, gamma);
+                       return;
+               case 1: /* squares */
+                       xy[0].x = x0 + (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[0].y = y0 + (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[1].x = x0 + (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[1].y = y0 - (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[2].x = x0 - (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[2].y = y0 - (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[3].x = x0 - (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[3].y = y0 + (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[4].x = xy[0].x;
+                       xy[4].y = xy[0].y;
+                       trans_coor(xy, atom0->xy, 4, gamma);
+                       return;
+               case 2: /* triangles */
+                       xy[0].x = x0 + (int) (1.5 * atom0->size_at *
+                                             sin(atom0->angle));
+                       xy[0].y = y0 + (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle));
+                       xy[1].x = x0 + (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[1].y = y0 - (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[2].x = x0 - (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) -
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[2].y = y0 - (int) (1.5 * atom0->size_at *
+                                             cos(atom0->angle)) +
+                               (int) (1.5 * atom0->size_at *
+                                      sin(atom0->angle));
+                       xy[3].x = xy[0].x;
+                       xy[3].y = xy[0].y;
+                       trans_coor(xy, atom0->xy, 3, gamma);
+                       return;
+       }
+}
+
+static void
+crystal_drawatom(ModeInfo * mi, crystalatom * atom0)
+{
+       crystalstruct *cryst;
+       Display    *display = MI_DISPLAY(mi);
+       Window      window = MI_WINDOW(mi);
+       int         j, k, l, m;
+
+       cryst = &crystals[MI_SCREEN(mi)];
+       for (j = numops[2 * cryst->planegroup + 1];
+            j < numops[2 * cryst->planegroup]; j++) {
+               XPoint      xy[5], new_xy[5];
+               XPoint      xy_1[5];
+               int         xtrans, ytrans;
+
+               xtrans = operation[j * 6] * atom0->x0 + operation[j * 6 + 1] *
+                       atom0->y0 + (int) (operation[j * 6 + 4] * cryst->a /
+                                          2.0);
+               ytrans = operation[j * 6 + 2] * atom0->x0 + operation[j * 6 +
+                              3] * atom0->y0 + (int) (operation[j * 6 + 5] *
+                                                      cryst->b / 2.0);
+               if (xtrans < 0) {
+                       if (xtrans < -cryst->a)
+                               xtrans = 2 * cryst->a;
+                       else
+                               xtrans = cryst->a;
+               } else if (xtrans >= cryst->a)
+                       xtrans = -cryst->a;
+               else
+                       xtrans = 0;
+               if (ytrans < 0)
+                       ytrans = cryst->b;
+               else if (ytrans >= cryst->b)
+                       ytrans = -cryst->b;
+               else
+                       ytrans = 0;
+               for (k = 0; k < atom0->num_point; k++) {
+                       xy[k].x = operation[j * 6] * atom0->xy[k].x +
+                               operation[j * 6 + 1] *
+                               atom0->xy[k].y + (int) (operation[j * 6 + 4] *
+                                                       cryst->a / 2.0) +
+                               xtrans;
+                       xy[k].y = operation[j * 6 + 2] * atom0->xy[k].x +
+                               operation[j * 6 + 3] *
+                               atom0->xy[k].y + (int) (operation[j * 6 + 5] *
+                                                       cryst->b / 2.0) +
+                               ytrans;
+               }
+               xy[atom0->num_point].x = xy[0].x;
+               xy[atom0->num_point].y = xy[0].y;
+               for (l = 0; l < cryst->nx; l++) {
+                       for (m = 0; m < cryst->ny; m++) {
+
+                               for (k = 0; k <= atom0->num_point; k++) {
+                                       xy_1[k].x = xy[k].x + l * cryst->a;
+                                       xy_1[k].y = xy[k].y + m * cryst->b;
+                               }
+                               trans_coor_back(xy_1, new_xy, atom0->num_point,
+                                               cryst->gamma, cryst->offset_w, cryst->offset_h);
+                               XFillPolygon(display, window, cryst->gc, new_xy,
+                                 atom0->num_point, Convex, CoordModeOrigin);
+                       }
+               }
+               if (centro[cryst->planegroup] == True) {
+                       for (k = 0; k <= atom0->num_point; k++) {
+                               xy[k].x = cryst->a - xy[k].x;
+                               xy[k].y = cryst->b - xy[k].y;
+                       }
+                       for (l = 0; l < cryst->nx; l++) {
+                               for (m = 0; m < cryst->ny; m++) {
+
+                                       for (k = 0; k <= atom0->num_point; k++) {
+                                               xy_1[k].x = xy[k].x + l * cryst->a;
+                                               xy_1[k].y = xy[k].y + m * cryst->b;
+                                       }
+                                       trans_coor_back(xy_1, new_xy, atom0->num_point,
+                                                       cryst->gamma, cryst->offset_w, cryst->offset_h);
+                                       XFillPolygon(display, window, cryst->gc,
+                                                    new_xy,
+                                                    atom0->num_point, Convex,
+                                                    CoordModeOrigin);
+                               }
+                       }
+               }
+               if (primitive[cryst->planegroup] == False) {
+                       if (xy[atom0->num_point].x >= (int) (cryst->a / 2.0))
+                               xtrans = (int) (-cryst->a / 2.0);
+                       else
+                               xtrans = (int) (cryst->a / 2.0);
+                       if (xy[atom0->num_point].y >= (int) (cryst->b / 2.0))
+                               ytrans = (int) (-cryst->b / 2.0);
+                       else
+                               ytrans = (int) (cryst->b / 2.0);
+                       for (k = 0; k <= atom0->num_point; k++) {
+                               xy[k].x = xy[k].x + xtrans;
+                               xy[k].y = xy[k].y + ytrans;
+                       }
+                       for (l = 0; l < cryst->nx; l++) {
+                               for (m = 0; m < cryst->ny; m++) {
+
+                                       for (k = 0; k <= atom0->num_point; k++) {
+                                               xy_1[k].x = xy[k].x + l * cryst->a;
+                                               xy_1[k].y = xy[k].y + m * cryst->b;
+                                       }
+                                       trans_coor_back(xy_1, new_xy, atom0->num_point,
+                                                       cryst->gamma, cryst->offset_w, cryst->offset_h);
+                                       XFillPolygon(display, window, cryst->gc,
+                                                    new_xy,
+                                                    atom0->num_point, Convex,
+                                                    CoordModeOrigin);
+                               }
+                       }
+                       if (centro[cryst->planegroup] == True) {
+                               XPoint      xy1[5];
+
+                               for (k = 0; k <= atom0->num_point; k++) {
+                                       xy1[k].x = cryst->a - xy[k].x;
+                                       xy1[k].y = cryst->b - xy[k].y;
+                               }
+                               for (l = 0; l < cryst->nx; l++) {
+                                       for (m = 0; m < cryst->ny; m++) {
+
+                                               for (k = 0; k <= atom0->num_point; k++) {
+                                                       xy_1[k].x = xy1[k].x + l * cryst->a;
+                                                       xy_1[k].y = xy1[k].y + m * cryst->b;
+                                               }
+                                               trans_coor_back(xy_1, new_xy, atom0->num_point,
+                                                               cryst->gamma, cryst->offset_w, cryst->offset_h);
+                                               XFillPolygon(display, window,
+                                                            cryst->gc,
+                                                   new_xy, atom0->num_point,
+                                                   Convex, CoordModeOrigin);
+                                       }
+                               }
+                       }
+               }
+       }
+}
+
+void
+draw_crystal(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+       crystalstruct *cryst = &crystals[MI_SCREEN(mi)];
+       int         i;
+
+       cryst->painted = True;
+       XSetFunction(display, cryst->gc, GXxor);
+       for (i = 0; i < cryst->num_atom; i++) {
+               crystalatom *atom0;
+
+               atom0 = &cryst->atom[i];
+               XSetForeground(display, cryst->gc, atom0->colour);
+               crystal_drawatom(mi, atom0);
+               atom0->velocity[0] += NRAND(3) - 1;
+               atom0->velocity[0] = MAX(-20, MIN(20, atom0->velocity[0]));
+               atom0->velocity[1] += NRAND(3) - 1;
+               atom0->velocity[1] = MAX(-20, MIN(20, atom0->velocity[1]));
+               atom0->x0 += atom0->velocity[0];
+               /*if (cryst->gamma == 90.0) { */
+               if (atom0->x0 < 0)
+                       atom0->x0 += cryst->a;
+               else if (atom0->x0 >= cryst->a)
+                       atom0->x0 -= cryst->a;
+               atom0->y0 += atom0->velocity[1];
+               if (atom0->y0 < 0)
+                       atom0->y0 += cryst->b;
+               else if (atom0->y0 >= cryst->b)
+                       atom0->y0 -= cryst->b;
+               /*} */
+               atom0->velocity_a += ((float) NRAND(1001) - 500.0) / 2000.0;
+               atom0->angle += atom0->velocity_a;
+               crystal_setupatom(atom0, cryst->gamma);
+               crystal_drawatom(mi, atom0);
+       }
+       XSetFunction(display, cryst->gc, GXcopy);
+}
+
+void
+refresh_crystal(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+       Window      window = MI_WINDOW(mi);
+       crystalstruct *cryst = &crystals[MI_SCREEN(mi)];
+       int         i;
+
+       if (!cryst->painted)
+               return;
+       MI_CLEARWINDOW(mi);
+       XSetFunction(display, cryst->gc, GXxor);
+
+       if (cryst->unit_cell) {
+               if (MI_NPIXELS(mi) > 2)
+                       XSetForeground(display, cryst->gc, MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))));
+               else
+                       XSetForeground(display, cryst->gc, MI_BLACK_PIXEL(mi));
+               if (cryst->grid_cell) {
+                       int         inx, iny;
+
+                       XDrawLine(display, window, cryst->gc, cryst->offset_w,
+                                 cryst->offset_h, cryst->offset_w + cryst->nx * cryst->a,
+                                 cryst->offset_h);
+                       XDrawLine(display, window, cryst->gc, cryst->offset_w,
+                                 cryst->offset_h, (int) (cryst->offset_w - cryst->ny * cryst->b *
+                                         sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (cryst->ny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+                       inx = cryst->nx;
+                       for (iny = 1; iny <= cryst->ny; iny++) {
+                               XDrawLine(display, window, cryst->gc,
+                                         (int) (cryst->offset_w +
+                                    inx * cryst->a - (int) (iny * cryst->b *
+                                        sin((cryst->gamma - 90) * PI_RAD))),
+                                         (int) (iny * cryst->b * cos((cryst->gamma - 90) *
+                                                 PI_RAD)) + cryst->offset_h,
+                                   (int) (cryst->offset_w - iny * cryst->b *
+                                          sin((cryst->gamma - 90) * PI_RAD)),
+                                         (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) +
+                                         cryst->offset_h);
+                       }
+                       iny = cryst->ny;
+                       for (inx = 1; inx <= cryst->nx; inx++) {
+                               XDrawLine(display, window, cryst->gc,
+                                         (int) (cryst->offset_w +
+                                    inx * cryst->a - (int) (iny * cryst->b *
+                                        sin((cryst->gamma - 90) * PI_RAD))),
+                                         (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                         cryst->offset_w + inx * cryst->a, cryst->offset_h);
+                       }
+               } else {
+                       int         inx, iny;
+
+                       inx = NRAND(cryst->nx);
+                       iny = NRAND(cryst->ny);
+                       XDrawLine(display, window, cryst->gc,
+                                 cryst->offset_w + inx * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                 cryst->offset_w + (inx + 1) * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+                       XDrawLine(display, window, cryst->gc,
+                                 cryst->offset_w + inx * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                 cryst->offset_w + inx * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) ((iny + 1) * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+                       XDrawLine(display, window, cryst->gc,
+                                 cryst->offset_w + (inx + 1) * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                 cryst->offset_w + (inx + 1) * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) ((iny + 1) * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+                       XDrawLine(display, window, cryst->gc,
+                                 cryst->offset_w + inx * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) ((iny + 1) * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                 cryst->offset_w + (inx + 1) * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) ((iny + 1) * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+               }
+       }
+       for (i = 0; i < cryst->num_atom; i++) {
+               crystalatom *atom0;
+
+               atom0 = &cryst->atom[i];
+               XSetForeground(display, cryst->gc, atom0->colour);
+               crystal_drawatom(mi, atom0);
+       }
+       XSetFunction(display, cryst->gc, GXcopy);
+}
+
+void
+release_crystal(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+
+       if (crystals != NULL) {
+               int         screen;
+
+               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
+                       crystalstruct *cryst = &crystals[screen];
+
+                       if (cryst->gc != NULL)
+                               XFreeGC(display, cryst->gc);
+                       if (cryst->atom != NULL)
+                               (void) free((void *) cryst->atom);
+               }
+               (void) free((void *) crystals);
+               crystals = NULL;
+       }
+}
+
+void
+init_crystal(ModeInfo * mi)
+{
+       Display    *display = MI_DISPLAY(mi);
+       Window      window = MI_WINDOW(mi);
+       crystalstruct *cryst;
+       int         i, max_atoms, size_atom, neqv;
+       int         cell_min;
+
+#define MIN_CELL 200
+
+/* initialize */
+       if (crystals == NULL) {
+               if ((crystals = (crystalstruct *) calloc(MI_NUM_SCREENS(mi),
+                                           sizeof (crystalstruct))) == NULL)
+                       return;
+       }
+       cryst = &crystals[MI_SCREEN(mi)];
+
+       if (!cryst->gc) {
+               if ((cryst->gc = XCreateGC(display, MI_WINDOW(mi),
+                            (unsigned long) 0, (XGCValues *) NULL)) == None)
+                       return;
+       }
+/* Clear Display */
+       MI_CLEARWINDOW(mi);
+       cryst->painted = False;
+       XSetFunction(display, cryst->gc, GXxor);
+
+/*Set up crystal data */
+       if (MI_IS_FULLRANDOM(mi)) {
+               if (LRAND() & 1)
+                       cryst->unit_cell = True;
+               else
+                       cryst->unit_cell = False;
+       } else
+               cryst->unit_cell = unit_cell;
+       if (cryst->unit_cell) {
+               if (MI_IS_FULLRANDOM(mi)) {
+                       if (LRAND() & 1)
+                               cryst->grid_cell = True;
+                       else
+                               cryst->grid_cell = False;
+               } else
+                       cryst->grid_cell = grid_cell;
+       }
+       cryst->win_width = MI_WIDTH(mi);
+       cryst->win_height = MI_HEIGHT(mi);
+       cell_min = min(cryst->win_width / 2 + 1, MIN_CELL);
+       cell_min = min(cell_min, cryst->win_height / 2 + 1);
+       cryst->planegroup = NRAND(17);
+       if (MI_IS_VERBOSE(mi))
+               (void) fprintf(stdout, "Selected plane group no %d\n",
+                              cryst->planegroup + 1);
+       if (cryst->planegroup > 11)
+               cryst->gamma = 120.0;
+       else if (cryst->planegroup < 2)
+               cryst->gamma = 60.0 + NRAND(60);
+       else
+               cryst->gamma = 90.0;
+       neqv = numops[2 * cryst->planegroup] - numops[2 * cryst->planegroup + 1];
+       if (centro[cryst->planegroup] == True)
+               neqv = 2 * neqv;
+       if (primitive[cryst->planegroup] == False)
+               neqv = 2 * neqv;
+
+
+       if (nx > 0)
+               cryst->nx = nx;
+       else if (nx < 0)
+               cryst->nx = NRAND(-nx) + 1;
+       else
+               cryst->nx = DEF_NX1;
+       if (cryst->planegroup > 8)
+               cryst->ny = cryst->nx;
+       else if (ny > 0)
+               cryst->ny = ny;
+       else if (ny < 0)
+               cryst->ny = NRAND(-ny) + 1;
+       else
+               cryst->ny = DEF_NY1;
+       neqv = neqv * cryst->nx * cryst->ny;
+
+       cryst->num_atom = MI_COUNT(mi);
+       max_atoms = MI_COUNT(mi);
+       if (cryst->num_atom == 0) {
+               cryst->num_atom = DEF_NUM_ATOM;
+               max_atoms = DEF_NUM_ATOM;
+       } else if (cryst->num_atom < 0) {
+               max_atoms = -cryst->num_atom;
+               cryst->num_atom = NRAND(-cryst->num_atom) + 1;
+       }
+       if (neqv > 1)
+               cryst->num_atom = cryst->num_atom / neqv + 1;
+
+       if (cryst->atom == NULL)
+               cryst->atom = (crystalatom *) calloc(max_atoms, sizeof (
+                                                              crystalatom));
+
+       if (maxsize) {
+               if (cryst->planegroup < 13) {
+                       cryst->gamma = 90.0;
+                       cryst->offset_w = 0;
+                       cryst->offset_h = 0;
+                       if (cryst->planegroup < 10) {
+                               cryst->b = cryst->win_height;
+                               cryst->a = cryst->win_width;
+                       } else {
+                               cryst->b = min(cryst->win_height, cryst->win_width);
+                               cryst->a = cryst->b;
+                       }
+               } else {
+                       cryst->gamma = 120.0;
+                       cryst->a = (int) (cryst->win_width * 2.0 / 3.0);
+                       cryst->b = cryst->a;
+                       cryst->offset_h = (int) (cryst->b * 0.25 *
+                                         cos((cryst->gamma - 90) * PI_RAD));
+                       cryst->offset_w = (int) (cryst->b * 0.5);
+               }
+       } else {
+               cryst->offset_w = -1;
+               while (cryst->offset_w < 4 || (int) (cryst->offset_w - cryst->b *
+                                   sin((cryst->gamma - 90) * PI_RAD)) < 4) {
+                       cryst->b = NRAND((int) (cryst->win_height / (cos((cryst->gamma - 90) *
+                                           PI_RAD))) - cell_min) + cell_min;
+                       if (cryst->planegroup > 8)
+                               cryst->a = cryst->b;
+                       else
+                               cryst->a = NRAND(cryst->win_width - cell_min) + cell_min;
+                       cryst->offset_w = (int) ((cryst->win_width - (cryst->a - cryst->b *
+                                                   sin((cryst->gamma - 90) *
+                                                       PI_RAD))) / 2.0);
+               }
+               cryst->offset_h = (int) ((cryst->win_height - cryst->b * cos((
+                                       cryst->gamma - 90) * PI_RAD)) / 2.0);
+               if (!centre) {
+                       if (cryst->offset_h > 0)
+                               cryst->offset_h = NRAND(2 * cryst->offset_h);
+                       cryst->offset_w = (int) (cryst->win_width - cryst->a -
+                                                cryst->b *
+                                   fabs(sin((cryst->gamma - 90) * PI_RAD)));
+                       if (cryst->gamma > 90.0) {
+                               if (cryst->offset_w > 0)
+                                       cryst->offset_w = NRAND(cryst->offset_w) +
+                                               cryst->b * sin((cryst->gamma - 90) * PI_RAD);
+                               else
+                                       cryst->offset_w = (int) (cryst->b * sin((cryst->gamma - 90) *
+                                                                   PI_RAD));
+                       } else if (cryst->offset_w > 0)
+                               cryst->offset_w = NRAND(cryst->offset_w);
+                       else
+                               cryst->offset_w = 0;
+               }
+       }
+
+       size_atom = min((int) ((float) (cryst->a) / 40.) + 1,
+                       (int) ((float) (cryst->b) / 40.) + 1);
+       if (MI_SIZE(mi) < size_atom) {
+               if (MI_SIZE(mi) < -size_atom)
+                       size_atom = -size_atom;
+               else
+                       size_atom = MI_SIZE(mi);
+       }
+       cryst->a = cryst->a / cryst->nx;
+       cryst->b = cryst->b / cryst->ny;
+       if (cryst->unit_cell) {
+               if (MI_NPIXELS(mi) > 2)
+                       XSetForeground(display, cryst->gc, MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))));
+               else
+                       XSetForeground(display, cryst->gc, MI_BLACK_PIXEL(mi));
+               if (cryst->grid_cell) {
+                       int         inx, iny;
+
+                       XDrawLine(display, window, cryst->gc, cryst->offset_w,
+                                 cryst->offset_h, cryst->offset_w + cryst->nx * cryst->a,
+                                 cryst->offset_h);
+                       XDrawLine(display, window, cryst->gc, cryst->offset_w,
+                                 cryst->offset_h, (int) (cryst->offset_w - cryst->ny * cryst->b *
+                                         sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (cryst->ny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+                       inx = cryst->nx;
+                       for (iny = 1; iny <= cryst->ny; iny++) {
+                               XDrawLine(display, window, cryst->gc,
+                                         (int) (cryst->offset_w +
+                                    inx * cryst->a - (int) (iny * cryst->b *
+                                        sin((cryst->gamma - 90) * PI_RAD))),
+                                         (int) (iny * cryst->b * cos((cryst->gamma - 90) *
+                                                 PI_RAD)) + cryst->offset_h,
+                                   (int) (cryst->offset_w - iny * cryst->b *
+                                          sin((cryst->gamma - 90) * PI_RAD)),
+                                         (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) +
+                                         cryst->offset_h);
+                       }
+                       iny = cryst->ny;
+                       for (inx = 1; inx <= cryst->nx; inx++) {
+                               XDrawLine(display, window, cryst->gc,
+                                         (int) (cryst->offset_w +
+                                    inx * cryst->a - (int) (iny * cryst->b *
+                                        sin((cryst->gamma - 90) * PI_RAD))),
+                                         (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                         cryst->offset_w + inx * cryst->a, cryst->offset_h);
+                       }
+               } else {
+                       int         inx, iny;
+
+                       inx = NRAND(cryst->nx);
+                       iny = NRAND(cryst->ny);
+                       XDrawLine(display, window, cryst->gc,
+                                 cryst->offset_w + inx * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                 cryst->offset_w + (inx + 1) * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+                       XDrawLine(display, window, cryst->gc,
+                                 cryst->offset_w + inx * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                 cryst->offset_w + inx * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) ((iny + 1) * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+                       XDrawLine(display, window, cryst->gc,
+                                 cryst->offset_w + (inx + 1) * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                 cryst->offset_w + (inx + 1) * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) ((iny + 1) * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+                       XDrawLine(display, window, cryst->gc,
+                                 cryst->offset_w + inx * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) ((iny + 1) * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h,
+                                 cryst->offset_w + (inx + 1) * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)),
+                                 (int) ((iny + 1) * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + cryst->offset_h);
+               }
+       }
+       for (i = 0; i < cryst->num_atom; i++) {
+               crystalatom *atom0;
+
+               atom0 = &cryst->atom[i];
+               if (MI_NPIXELS(mi) > 2)
+                       atom0->colour = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi)));
+               else
+                       atom0->colour = 1;      /*Xor'red so WHITE may not be appropriate */
+               XSetForeground(display, cryst->gc, atom0->colour);
+               atom0->x0 = NRAND(cryst->a);
+               atom0->y0 = NRAND(cryst->b);
+               atom0->velocity[0] = NRAND(7) - 3;
+               atom0->velocity[1] = NRAND(7) - 3;
+               atom0->velocity_a = (NRAND(7) - 3) * PI_RAD;
+               atom0->angle = NRAND(90) * PI_RAD;
+               atom0->at_type = NRAND(3);
+               if (size_atom == 0)
+                       atom0->size_at = DEF_SIZ_ATOM;
+               else if (size_atom > 0)
+                       atom0->size_at = size_atom;
+               else
+                       atom0->size_at = NRAND(-size_atom) + 1;
+               atom0->size_at++;
+               if (atom0->at_type == 2)
+                       atom0->num_point = 3;
+               else
+                       atom0->num_point = 4;
+               crystal_setupatom(atom0, cryst->gamma);
+               crystal_drawatom(mi, atom0);
+       }
+       XSetFunction(display, cryst->gc, GXcopy);
+}
index 3a837126dd7e060e96bee9ad24f6ebf0d4dc8464..7d41e7a269666f4b62228d25f8e6c3bd1c038add 100644 (file)
@@ -119,8 +119,8 @@ static int gridSize;
 
 char *progclass = "Cynosure";
 char *defaults [] = {
 
 char *progclass = "Cynosure";
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                white",
+  ".background:                black",
+  ".foreground:                white",
   "*delay:             500000",
   "*colors:            128",
   "*iterations:                100",
   "*delay:             500000",
   "*colors:            128",
   "*iterations:                100",
index 63ca3aead71674281d1f301aca49c36731740f43..4479c6408d8cde518f2815e34dd9051621348d2a 100644 (file)
@@ -59,8 +59,8 @@ deco (Display *dpy,
 char *progclass = "Deco";
 
 char *defaults [] = {
 char *progclass = "Deco";
 
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                white",
+  ".background:                black",
+  ".foreground:                white",
   "*maxDepth:          12",
   "*minWidth:          20",
   "*minHeight:         20",
   "*maxDepth:          12",
   "*minWidth:          20",
   "*minHeight:         20",
diff --git a/hacks/discrete.c b/hacks/discrete.c
new file mode 100644 (file)
index 0000000..7f336a6
--- /dev/null
@@ -0,0 +1,410 @@
+/* -*- Mode: C; tab-width: 4 -*- */
+/* discrete --- chaotic mappings */
+
+#if !defined( lint ) && !defined( SABER )
+static const char sccsid[] = "@(#)discrete.c 4.10 98/04/24 xlockmore";
+
+#endif
+
+/*-
+ * Copyright (c) 1996 by Tim Auckland <Tim.Auckland@Sun.COM>
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * "discrete" shows a number of fractals based on the "discrete map"
+ * type of dynamical systems.  They include a different way of looking
+ * at the HOPALONG system, an inverse julia-set iteration, the "Standard
+ * Map" and the "Bird in a Thornbush" fractal.
+ *
+ * Revision History:
+ * 31-Jul-97: Ported to xlockmore-4
+ * 08-Aug-96: Adapted from hop.c Copyright (c) 1991 by Patrick J. Naughton.
+ */
+
+#ifdef STANDALONE
+# define PROGCLASS             "Discrete"
+# define HACK_INIT             init_discrete
+# define HACK_DRAW             draw_discrete
+# define discrete_opts xlockmore_opts
+# define SMOOTH_COLORS
+# define BRIGHT_COLORS
+# define DEFAULTS              "*delay:  1000 \n" \
+                                               "*count:  4096 \n" \
+                                               "*cycles: 2500 \n" \
+                                               "*ncolors: 100 \n"
+
+# include "xlockmore.h"                /* in xscreensaver distribution */
+# include "erase.h"
+
+#else /* STANDALONE */
+# include "xlock.h"            /* in xlockmore distribution */
+#endif /* STANDALONE */
+
+ModeSpecOpt discrete_opts =
+{0, NULL, 0, NULL, NULL};
+
+#ifdef USE_MODULES
+ModStruct   discrete_description =
+{"discrete", "init_discrete", "draw_discrete", "release_discrete",
+ "refresh_discrete", "init_discrete", NULL, &discrete_opts,
+ 1000, 4096, 2500, 1, 64, 1.0, "",
+ "Shows various discrete maps", 0, NULL};
+
+#endif
+
+enum ftypes {
+       SQRT, BIRDIE, STANDARD, TRIG, CUBIC, HENON, AILUJ, HSHOE, DELOG
+};
+
+/*#define TEST STANDARD */
+
+#define BIASES 18
+static int  bias[BIASES] =
+{
+       STANDARD, STANDARD, STANDARD, STANDARD,
+       SQRT, SQRT, SQRT, SQRT,
+       BIRDIE, BIRDIE, BIRDIE,
+       AILUJ, AILUJ, AILUJ,
+       TRIG, TRIG,
+       CUBIC,
+       HENON,
+};
+
+typedef struct {
+       int         maxx;
+       int         maxy;       /* max of the screen */
+       double      a;
+       double      b;
+       double      c;
+       double      d;
+       double      e;
+       double      i;
+       double      j;          /* discrete parameters */
+       double      ic;
+       double      jc;
+       double      is;
+       double      js;
+       int         inc;
+       int         pix;
+       enum ftypes op;
+       int         count;
+       XPoint     *pointBuffer;        /* pointer for XDrawPoints */
+} discretestruct;
+
+static discretestruct *discretes = NULL;
+
+void
+init_discrete(ModeInfo * mi)
+{
+       double      range;
+       discretestruct *hp;
+
+       if (discretes == NULL) {
+               if ((discretes =
+                    (discretestruct *) calloc(MI_NUM_SCREENS(mi),
+                                          sizeof (discretestruct))) == NULL)
+                       return;
+       }
+       hp = &discretes[MI_SCREEN(mi)];
+
+
+       hp->maxx = MI_WIDTH(mi);
+       hp->maxy = MI_HEIGHT(mi);
+#ifdef TEST
+       hp->op = TEST;
+#else
+       hp->op = bias[LRAND() % BIASES];
+#endif
+       switch (hp->op) {
+               case HSHOE:
+                       hp->ic = 0;
+                       hp->jc = 0;
+                       hp->is = hp->maxx / (4);
+                       hp->js = hp->maxy / (4);
+                       hp->a = 0.5;
+                       hp->b = 0.5;
+                       hp->c = 0.2;
+                       hp->d = -1.25;
+                       hp->e = 1;
+                       hp->i = hp->j = 0.0;
+                       break;
+               case DELOG:
+                       hp->ic = 0.5;
+                       hp->jc = 0.3;
+                       hp->is = hp->maxx / 1.5;
+                       hp->js = hp->maxy / 1.5;
+                       hp->a = 2.176399;
+                       hp->i = hp->j = 0.01;
+                       break;
+               case HENON:
+                       hp->jc = ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.4;
+                       hp->ic = 1.3 * (1 - (hp->jc * hp->jc) / (0.4 * 0.4));
+                       hp->is = hp->maxx;
+                       hp->js = hp->maxy * 1.5;
+                       hp->a = 1;
+                       hp->b = 1.4;
+                       hp->c = 0.3;
+                       hp->i = hp->j = 0;
+                       break;
+               case SQRT:
+                       hp->ic = 0;
+                       hp->jc = 0;
+                       hp->is = 1;
+                       hp->js = 1;
+                       range = sqrt((double) hp->maxx * 2 * hp->maxx * 2 +
+                                    (double) hp->maxy * 2 * hp->maxy * 2) /
+                               (10.0 + LRAND() % 10);
+
+                       hp->a = (LRAND() / MAXRAND) * range - range / 2.0;
+                       hp->b = (LRAND() / MAXRAND) * range - range / 2.0;
+                       hp->c = (LRAND() / MAXRAND) * range - range / 2.0;
+                       if (!(LRAND() % 2))
+                               hp->c = 0.0;
+                       hp->i = hp->j = 0.0;
+                       break;
+               case STANDARD:
+                       hp->ic = M_PI;
+                       hp->jc = M_PI;
+                       hp->is = hp->maxx / (M_PI * 2);
+                       hp->js = hp->maxy / (M_PI * 2);
+                       hp->a = 0;      /* decay */
+                       hp->b = (LRAND() / MAXRAND) * 2.0;
+                       hp->c = 0;
+                       hp->i = M_PI;
+                       hp->j = M_PI;
+                       break;
+               case BIRDIE:
+                       hp->ic = 0;
+                       hp->jc = 0;
+                       hp->is = hp->maxx / 2;
+                       hp->js = hp->maxy / 2;
+                       hp->a = 1.99 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.2;
+                       hp->b = 0;
+                       hp->c = 0.8 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.1;
+                       hp->i = hp->j = 0;
+                       break;
+               case TRIG:
+                       hp->a = 5;
+                       hp->b = 0.5 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.3;
+                       hp->ic = hp->a;
+                       hp->jc = 0;
+                       hp->is = hp->maxx / (hp->b * 20);
+                       hp->js = hp->maxy / (hp->b * 20);
+                       hp->i = hp->j = 0;
+                       break;
+               case CUBIC:
+                       hp->a = 2.77;
+                       hp->b = 0.1 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.1;
+                       hp->ic = 0;
+                       hp->jc = 0;
+                       hp->is = hp->maxx / 4;
+                       hp->js = hp->maxy / 4;
+                       hp->i = hp->j = 0.1;
+                       break;
+               case AILUJ:
+                       {
+                               int         i;
+                               double      x, y, xn, yn;
+
+                               hp->ic = 0;
+                               hp->jc = 0;
+                               hp->is = hp->maxx / 4;
+                               hp->js = hp->maxx / 4;
+                               do {
+                                       hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * 1.5 - 0.5;
+                                       hp->b = ((LRAND() / MAXRAND) * 2.0 - 1.0) * 1.5;
+                                       x = y = 0;
+#define MAXITER 10
+                                       for (i = 0; i < MAXITER && x * x + y * y < 13; i++) {   /* 'Brot calc */
+                                               xn = x * x - y * y + hp->a;
+                                               yn = 2 * x * y + hp->b;
+                                               x = xn;
+                                               y = yn;
+                                       }
+                               } while (i < MAXITER);  /* wait for a connected set */
+                               hp->i = hp->j = 0.1;
+                               break;
+                       }
+       }
+       hp->pix = 0;
+       hp->inc = 0;
+
+       if (hp->pointBuffer == NULL)
+               hp->pointBuffer = (XPoint *) malloc(MI_COUNT(mi) * sizeof (XPoint));
+
+       /* Clear the background. */
+       MI_CLEARWINDOW(mi);
+
+       hp->count = 0;
+}
+
+
+void
+draw_discrete(ModeInfo * mi)
+{
+       Display    *dsp = MI_DISPLAY(mi);
+       Window      win = MI_WINDOW(mi);
+       double      oldj, oldi;
+       int         batchcount = MI_COUNT(mi);
+       int         cycles = MI_CYCLES(mi);
+       int         k;
+       XPoint     *xp;
+       GC          gc = MI_GC(mi);
+       discretestruct *hp = &discretes[MI_SCREEN(mi)];
+
+       k = batchcount;
+       xp = hp->pointBuffer;
+
+       hp->inc++;
+
+       if (MI_NPIXELS(mi) > 2) {
+               XSetForeground(dsp, gc, MI_PIXEL(mi, hp->pix));
+               if (++hp->pix >= MI_NPIXELS(mi))
+                       hp->pix = 0;
+       }
+       while (k--) {
+               oldj = hp->j;
+               oldi = hp->i;
+               switch (hp->op) {
+                       case HSHOE:
+                               {
+                                       int         i;
+
+#if 0
+                                       if (!k) {
+                                               XSetForeground(dsp, gc, MI_BLACK_PIXEL(mi));
+                                               XFillRectangle(dsp, win, gc, 0, 0, hp->maxx, hp->maxy);
+                                               XSetForeground(dsp, gc, MI_PIXEL(mi, hp->pix));
+                                       } else
+#endif
+#define HD
+#ifdef HD
+                                       if (k < batchcount / 4) {
+                                               hp->i = ((double) k / batchcount) * 8 - 1;
+                                               hp->j = 1;
+                                       } else if (k < batchcount / 2) {
+                                               hp->i = 1;
+                                               hp->j = 3 - ((double) k / batchcount) * 8;
+                                       } else if (k < 3 * batchcount / 4) {
+                                               hp->i = 5 - ((double) k / batchcount) * 8;
+                                               hp->j = -1;
+                                       } else {
+                                               hp->i = -1;
+                                               hp->j = ((double) k / batchcount) * 8 - 7;
+                                       }
+                                       for (i = 1; i < (hp->inc % 15); i++) {
+                                               oldj = hp->j;
+                                               oldi = hp->i;
+#endif
+                                               hp->i = (hp->a * oldi + hp->b) * oldj;
+                                               hp->j = (hp->e - hp->d + hp->c * oldi) * oldj * oldj - hp->c * oldi + hp->d;
+#ifdef HD
+                                       }
+#endif
+                                       break;
+                               }
+                       case DELOG:
+                               hp->j = oldi;
+                               hp->i = hp->a * oldi * (1 - oldj);
+                               break;
+                       case HENON:
+                               hp->i = oldj + hp->a - hp->b * oldi * oldi;
+                               hp->j = hp->c * oldi;
+                               break;
+                       case SQRT:
+                               if (k) {
+                                       hp->j = hp->a + hp->i;
+                                       hp->i = -oldj + (hp->i < 0
+                                       ? sqrt(fabs(hp->b * (hp->i - hp->c)))
+                                                        : -sqrt(fabs(hp->b * (hp->i - hp->c))));
+                               } else {
+                                       static int  s = 1;
+
+                                       hp->i = s * hp->inc * hp->maxx / cycles / 2;
+                                       hp->j = hp->a + hp->i;
+                                       s = -s;
+                               }
+                               break;
+                       case STANDARD:
+                               if (k) {
+                                       hp->j = (1 - hp->a) * oldj + hp->b * sin(oldi) + hp->a * hp->c;
+                                       hp->j = fmod(hp->j + 2 * M_PI, 2 * M_PI);
+                                       hp->i = oldi + hp->j;
+                                       hp->i = fmod(hp->i + 2 * M_PI, 2 * M_PI);
+                               } else {
+                                       static int  s = 1;
+
+                                       hp->j = M_PI + fmod(s * hp->inc * 2 * M_PI / (cycles - 0.5), M_PI);
+                                       hp->i = M_PI;
+                                       s = -s;
+                               }
+                               break;
+                       case BIRDIE:
+                               hp->j = oldi;
+                               hp->i = (1 - hp->c) * cos(M_PI * hp->a * oldj) + hp->c * hp->b;
+                               hp->b = oldj;
+                               break;
+                       case TRIG:
+                               {
+                                       double      r2 = oldi * oldi + oldj * oldj;
+
+                                       hp->i = hp->a + hp->b * (oldi * cos(r2) - oldj * sin(r2));
+                                       hp->j = hp->b * (oldj * cos(r2) + oldi * sin(r2));
+                               }
+                               break;
+                       case CUBIC:
+                               hp->i = oldj;
+                               hp->j = hp->a * oldj - oldj * oldj * oldj - hp->b * oldi;
+                               break;
+                       case AILUJ:
+                               hp->i = ((LRAND() < MAXRAND / 2) ? -1 : 1) *
+                                       sqrt(((oldi - hp->a) +
+                                             sqrt((oldi - hp->a) * (oldi - hp->a) + (oldj - hp->b) * (oldj - hp->b))) / 2);
+                               hp->j = (oldj - hp->b) / (2 * hp->i);
+                               break;
+               }
+               xp->x = hp->maxx / 2 + (int) ((hp->i - hp->ic) * hp->is);
+               xp->y = hp->maxy / 2 - (int) ((hp->j - hp->jc) * hp->js);
+               xp++;
+       }
+       XDrawPoints(dsp, win, gc, hp->pointBuffer, batchcount, CoordModeOrigin);
+       if (++hp->count > cycles) {
+#ifdef STANDALONE
+               erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif /* STANDALONE */
+               init_discrete(mi);
+       }
+}
+
+void
+release_discrete(ModeInfo * mi)
+{
+       if (discretes != NULL) {
+               int         screen;
+
+               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
+                       discretestruct *hp = &discretes[screen];
+
+                       if (hp->pointBuffer != NULL)
+                               (void) free((void *) hp->pointBuffer);
+               }
+               (void) free((void *) discretes);
+               discretes = NULL;
+       }
+}
+
+void
+refresh_discrete(ModeInfo * mi)
+{
+       MI_CLEARWINDOW(mi);
+}
index addaaaaf4365253deca7bfded1ab504660d2e797..eed186ca75551629d9b51cdc336ca949619b3797 100644 (file)
@@ -50,8 +50,8 @@ char *progclass="Epicycle";
  * to get pleasing figures.
  */
 char *defaults [] = {
  * to get pleasing figures.
  */
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*colors:    100",
   "*color0:    red",
   "*delay:     1000",
   "*colors:    100",
   "*color0:    red",
   "*delay:     1000",
index bbdbfdec93437ad43a22c508d85d101938615054..851b26151a84dfd79b34fe5545d683383848f64b 100644 (file)
@@ -381,8 +381,8 @@ int matherr(x)
 char *progclass = "Flame";
 
 char *defaults [] = {
 char *progclass = "Flame";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*colors:    64",
   "*iterations:        25",
   "*delay:     50000",
   "*colors:    64",
   "*iterations:        25",
   "*delay:     50000",
index 18df9f6ea31f1af0b9401eee92e79701be7db62c..f85df1cfd59659410c9af49963633a7a13f4697d 100644 (file)
@@ -30,6 +30,7 @@ SHELL         = /bin/sh
 INSTALL                = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA   = @INSTALL_DATA@
 INSTALL                = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA   = @INSTALL_DATA@
+INSTALL_DIRS   = @INSTALL_DIRS@
 HACKDIR                = @HACKDIR@
 
 X_CFLAGS       = @X_CFLAGS@
 HACKDIR                = @HACKDIR@
 
 X_CFLAGS       = @X_CFLAGS@
@@ -37,6 +38,8 @@ X_LIBS                = @X_LIBS@
 X_PRE_LIBS     = @X_PRE_LIBS@
 X_EXTRA_LIBS   = @X_EXTRA_LIBS@
 
 X_PRE_LIBS     = @X_PRE_LIBS@
 X_EXTRA_LIBS   = @X_EXTRA_LIBS@
 
+# Note: see comment in ../driver/Makefile.in for explanation of X_LIBS, etc.
+#
 HACK_LIBS      = $(LIBS) $(X_LIBS) $(X_PRE_LIBS) @GL_LIBS@ @HACK_LIBS@ \
                  -lXt -lX11 -lXext $(X_EXTRA_LIBS) -lm
 
 HACK_LIBS      = $(LIBS) $(X_LIBS) $(X_PRE_LIBS) @GL_LIBS@ @HACK_LIBS@ \
                  -lXt -lX11 -lXext $(X_EXTRA_LIBS) -lm
 
@@ -92,6 +95,7 @@ install-strip:
 
 install-program:
        @exes="$(EXES)" ;                                               \
 
 install-program:
        @exes="$(EXES)" ;                                               \
+       if [ ! -d $(HACKDIR) ]; then $(INSTALL_DIRS) $(HACKDIR) ; fi ;  \
        for program in $$exes; do                                       \
          echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;      \
          $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;           \
        for program in $$exes; do                                       \
          echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;      \
          $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ;           \
@@ -99,6 +103,7 @@ install-program:
 
 install-man:
        @men="$(MEN)" ;                                                 \
 
 install-man:
        @men="$(MEN)" ;                                                 \
+       if [ ! -d $(man1dir) ]; then $(INSTALL_DIRS) $(man1dir) ; fi ;  \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
          echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
        for man in $$men; do                                            \
          instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
          echo $(INSTALL_DATA) $(srcdir)/$$man $(man1dir)/$$instname ;  \
@@ -136,7 +141,7 @@ depend:
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
 # to include only dependencies on files which are themselves a part of this
 # package.
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
 # to include only dependencies on files which are themselves a part of this
 # package.
-distdepend:
+distdepend::
        @echo updating dependencies in `pwd`/Makefile.in... ;               \
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
        @echo updating dependencies in `pwd`/Makefile.in... ;               \
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
index f31f9b91e235ab3632cecf3a1341df448a1afcba..8619c9ffb88d0b7958c346d9e3de673aa091d81f 100644 (file)
@@ -488,8 +488,8 @@ run_goop (Display *dpy, Window window, struct goop *goop)
 char *progclass = "Goop";
 
 char *defaults [] = {
 char *progclass = "Goop";
 
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                white",
+  ".background:                black",
+  ".foreground:                white",
   "*delay:             12000",
   "*transparent:       true",
   "*additive:          true",
   "*delay:             12000",
   "*transparent:       true",
   "*additive:          true",
index 6018d125a4623aeff3bf071825e6869eda8dc08e..0ffb332a4e2d75c6fd3dc46e3c5a2fab20080728 100644 (file)
@@ -159,8 +159,8 @@ greynetic (Display *dpy, Window window)
 char *progclass = "Greynetic";
 
 char *defaults [] = {
 char *progclass = "Greynetic";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*delay:     0",
   0
 };
   "*delay:     0",
   0
 };
index 80166335b6235c4d0adf0cfb83840acdc4796f72..f159a02a68d315ff4328ea92c6a7590a9bcdd00d 100644 (file)
@@ -417,8 +417,8 @@ run_circles (Display *dpy, Window window)
 char *progclass = "Halo";
 
 char *defaults [] = {
 char *progclass = "Halo";
 
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                white",
+  ".background:                black",
+  ".foreground:                white",
   "*colorMode:         random",
   "*colors:            100",
   "*cycle:             true",
   "*colorMode:         random",
   "*colors:            100",
   "*cycle:             true",
index 3a26984ea8d9084333bea03746f6a54977b811f6..97de40dc7fb360ddd50a89b3ba5aba9659bb2a46 100644 (file)
@@ -282,7 +282,7 @@ random_helix_or_trig (Display *dpy, Window window)
 char *progclass = "Helix";
 
 char *defaults [] = {
 char *progclass = "Helix";
 
 char *defaults [] = {
-  "*background: black",
+  ".background: black",
   "*delay:      5",
   0
 };
   "*delay:      5",
   0
 };
index 3fef0e6a8ba0a15fb89a62840ff5db8f3e238ef4..6ad94a83c9c28ac09f455ad56d6751084f306209 100644 (file)
@@ -219,8 +219,8 @@ hyper (double xy, double xz, double yz, double xw, double yw, double zw)
 char *progclass = "Hypercube";
 
 char *defaults [] = {
 char *progclass = "Hypercube";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*color0:    red",
   "*color1:    orange",
   "*color2:    yellow",
   "*color0:    red",
   "*color1:    orange",
   "*color2:    yellow",
index a6b53cd6912bdfdb779fa3e028e5934a79281b49..fa861ac0be1f4177c43e762fbf5a7a5cedd58ca7 100644 (file)
@@ -453,8 +453,8 @@ draw_map (Display *dpy, Window window)
 char *progclass = "Imsmap";
 
 char *defaults [] = {
 char *progclass = "Imsmap";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        black",
+  ".background:        black",
+  ".foreground:        black",
   "*mode:      random",
   "*ncolors:   50",
   "*iterations:        7",
   "*mode:      random",
   "*ncolors:   50",
   "*iterations:        7",
index 892315e73036268966985e6f4ae3c8976ba4f8cb..0a21030761a06284e699d939a4fd6f799950f42d 100644 (file)
@@ -533,8 +533,8 @@ done(void)
 char *progclass = "Jigsaw";
 
 char *defaults [] = {
 char *progclass = "Jigsaw";
 
 char *defaults [] = {
-  "*background:                Black",
-  "*foreground:                Gray40",
+  ".background:                Black",
+  ".foreground:                Gray40",
   "*delay:             70000",
   "*delay2:            5",
   0
   "*delay:             70000",
   "*delay2:            5",
   0
index 22f4a9b0319917d9f317883aa70dfe05fd5b69cf..78890147c097c1e17388177a0ccc584fda9e7da6 100644 (file)
@@ -83,8 +83,8 @@ OBJECT *objects;
 
 char *progclass = "Kaleidescope";
 char *defaults [] = {
 
 char *progclass = "Kaleidescope";
 char *defaults [] = {
-  "*background:             black",
-  "*foreground:             white",
+  ".background:             black",
+  ".foreground:             white",
   "*color_mode:      nice",
   "*symmetry:         11",
   "*ntrails:         100",
   "*color_mode:      nice",
   "*symmetry:         11",
   "*ntrails:         100",
index 70c91eee893e5c730166100eaeb45be3c0f4fc6b..f372c1eeff7c8463bda4cda0fe5c826c0c9fa7aa 100644 (file)
@@ -7,18 +7,37 @@
  *  DESCRIPTION     Bilinear interpolation for morphing line shapes.
  *
  *  WRITTEN BY      Sverre H. Huseby                Glenn T. Lines
  *  DESCRIPTION     Bilinear interpolation for morphing line shapes.
  *
  *  WRITTEN BY      Sverre H. Huseby                Glenn T. Lines
- *                  Maridalsvn. 122, leil 101       Frysjavn. 3, 5. etg.
- *                  N-0461 Oslo                     N-0883 Oslo
+ *                  Kurvn. 30                       Ã˜stgaardsgt. 5
+ *                  N-0495 Oslo                     N-0474 Oslo
  *                  Norway                          Norway
  *
  *                  Norway                          Norway
  *
- *                  Phone:  +47 22 71 99 08         Phone:  +47 22 23 71 99
- *                  E-mail: sverrehu@ifi.uio.no     E-mail: gtl@si.sintef.no
+ *                  Phone:  +47 901 63 579          Phone:  +47 22 04 67 28
+ *                  E-mail: sverrehu@online.no      E-mail: gtl@si.sintef.no
+ *                  URL:    http://home.sol.no/~sverrehu/
  *
  *                  The original idea, and the bilinear interpolation
  *                  mathematics used, emerged in the head of the wise
  *
  *                  The original idea, and the bilinear interpolation
  *                  mathematics used, emerged in the head of the wise
- *                  Glenn Terje Lines.
+ *                  Glenn T. Lines.
  *
  *
- *  MODIFICATIONS   march 1995
+ *  MODIFICATIONS   june 1998 (shh)
+ *                    * Minor code cleanup.
+ *
+ *                  march 1997 (shh)
+ *                    * Added -mailfile option to allow checking for
+ *                      new mail while the screensaver is active.
+ *
+ *                  january 1997 (shh)
+ *                    * Some code reformatting.
+ *                    * Added possibility to use float arithmetic.
+ *                    * Added -figtype option.
+ *                    * Made color blue default.
+ *
+ *                  december 1995 (jwz)
+ *                    * Function headers converted from ANSI to K&R.
+ *                    * Added posibility for random number of steps, and
+ *                      made this the default.
+ *
+ *                  march 1995 (shh)
  *                    * Converted from an MS-Windows program to X Window.
  *
  **************************************************************************/
  *                    * Converted from an MS-Windows program to X Window.
  *
  **************************************************************************/
  *                                                                        *
  **************************************************************************/
 
  *                                                                        *
  **************************************************************************/
 
-/* Define MARGINS to make some space around the figure */
-#define MARGINS /**/
+/* define MARGINS to make some space around the figure. */
+#define MARGINS
+
+/* define USE_FLOAT to avoid using integer calculations in
+   createPoints. integer calculation is supposed to be faster, but it
+   won't work for displays larger than 2048x2048 or so pixels. */
+#undef USE_FLOAT
 
 #define MAXFIGS    20
 #define TWO_PI     (2.0 * M_PI)
 #define RND(x)     (random() % (x))
 
 #define MAXFIGS    20
 #define TWO_PI     (2.0 * M_PI)
 #define RND(x)     (random() % (x))
+
+#define FT_OPEN    1
+#define FT_CLOSED  2
+#define FT_ALL     (FT_OPEN | FT_CLOSED)
+
 static int
 static int
-    cFig = 0,                   /* Number of figure arrays. */
-    cPoint,                     /* Number of points in each array. */
-    nWork,                      /* Current work array number. */
-    nFrom,                      /* Current from array number. */
-    nTo;                        /* Current to array number. */
-static long
-    delay;                      /* usecs to wait between updates. */
+    numFigs = 0,                /* number of figure arrays. */
+    numPoints,                  /* number of points in each array. */
+    nWork,                      /* current work array number. */
+    nFrom,                      /* current from array number. */
+    nTo,                        /* current to array number. */
+    figType;
+static long delay;              /* usecs to wait between updates. */
 static XPoint
 static XPoint
-    *aWork[2],                  /* Working arrays. */
-    *a[MAXFIGS],                /* The figure arrays. */
-    *aTmp,                      /* Used as source when interrupting morph */
-    *aPrev,                     /* Previous points displayed. */
-    *aCurr,                     /* The current points displayed. */  
-    *aFrom,                     /* Figure converting from. */
-    *aTo;                       /* Figure converting to. */
-static double
-    gam,
-    maxGamma = 1.0,
-    delta_gam;
-static GC
-    gcDraw, gcClear;
-static Display
-    *dpy;
-static Window
-    window;
+    *aWork[2],                  /* working arrays. */
+    *a[MAXFIGS],                /* the figure arrays. */
+    *aTmp,                      /* used as source when interrupting morph */
+    *aPrev,                     /* previous points displayed. */
+    *aCurr,                     /* the current points displayed. */  
+    *aFrom,                     /* figure converting from. */
+    *aTo;                       /* figure converting to. */
+static int         scrWidth, scrHeight;
+static double      currGamma, maxGamma = 1.0, deltaGamma;
+static GC          gcDraw, gcClear;
+static Display     *dpy;
+static Window      window;
 
 
 
 
 
 
@@ -79,20 +103,24 @@ static Window
 char *progclass = "LMorph";
 
 char *defaults [] = {
 char *progclass = "LMorph";
 
 char *defaults [] = {
-    "LMorph.background: black",
-    "LMorph.foreground: green",
+    ".background: black",
+    ".foreground: blue",
     "*points: 150",
     "*steps: 0",
     "*delay: 50000",
     "*points: 150",
     "*steps: 0",
     "*delay: 50000",
+    "*figtype: all",
     0
 };
 
 XrmOptionDescRec options [] = {
     0
 };
 
 XrmOptionDescRec options [] = {
-  { "-points", ".points", XrmoptionSepArg, 0 },
-  { "-steps",  ".steps",  XrmoptionSepArg, 0 },
-  { "-delay",  ".delay",  XrmoptionSepArg, 0 },
+  { "-points",      ".points",      XrmoptionSepArg, 0 },
+  { "-steps",       ".steps",       XrmoptionSepArg, 0 },
+  { "-delay",       ".delay",       XrmoptionSepArg, 0 },
+  { "-figtype",     ".figtype",     XrmoptionSepArg, 0 },
   { 0, 0, 0, 0 }
 };
   { 0, 0, 0, 0 }
 };
+int options_size = (sizeof (options) / sizeof (options[0]));
+
 
 
 /**************************************************************************
 
 
 /**************************************************************************
@@ -113,308 +141,220 @@ xmalloc(size_t size)
     return ret;
 }
 
     return ret;
 }
 
-
-
-static double frnd (void)
-{
-    /*
-     *  Hm. for some reason the second line (using RAND_MAX) didn't
-     *  work on some machines, so I always use the first.
-     */
-#ifndef dont_use_RAND_MAX
-    return (double) (random() & 0x7FFF) / 0x7FFF;
-#else  /* RAND_MAX */
-    return ((double) random()) / RAND_MAX;
-#endif /* RAND_MAX */
-}
-
-
-
-static void initPointArrays (void)
+static void
+initPointArrays(void)
 {
 {
-    XWindowAttributes wa;
     int q, w,
     int q, w,
-        mx, my,                 /* Max screen coordinates. */
-        mp,                     /* Max point number. */
+        mx, my,                 /* max screen coordinates. */
+        mp,                     /* max point number. */
         s, rx, ry,
         marginx, marginy;
     double scalex, scaley;
 
         s, rx, ry,
         marginx, marginy;
     double scalex, scaley;
 
-    XGetWindowAttributes(dpy, window, &wa);
-    mx = wa.width - 1;
-    my = wa.height - 1;
-    mp = cPoint - 1;
-
-    aWork[0] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    aWork[1] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    aTmp     = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-
-
-    /*
-     *  Figure 0
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    s = cPoint / 4;
-    for (q = 0; q < s; q++) {
-        a[cFig][q].x = ((double) q / s) * mx;
-        a[cFig][q].y = 0;
-        a[cFig][s + q].x = mx;
-        a[cFig][s + q].y = ((double) q / s) * my;
-        a[cFig][2 * s + q].x = mx - ((double) q / s) * mx;
-        a[cFig][2 * s + q].y = my;
-        a[cFig][3 * s + q].x = 0;
-        a[cFig][3 * s + q].y = my - ((double) q / s) * my;
-    }
-    for (q = 4 * s; q < cPoint; q++) 
-        a[cFig][q].x = a[cFig][q].y = 0;
-    a[cFig][mp].x = a[cFig][0].x;
-    a[cFig][mp].y = a[cFig][0].y;
-    ++cFig;
-
-    /*
-     *  Figure 1
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = ((double) q / cPoint) * mx;
-        a[cFig][q].y = (1.0 - sin(((double) q / mp) * TWO_PI)) * my / 2.0;
-    }
-    ++cFig;
-
-    /*
-     *  Figure 2
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + rx * sin(1 * TWO_PI * (double) q / mp);
-        a[cFig][q].y = my / 2 + ry * cos(3 * TWO_PI * (double) q / mp);
-    }
-    a[cFig][mp].x = a[cFig][0].x;
-    a[cFig][mp].y = a[cFig][0].y;
-    ++cFig;
-
-    /*
-     *  Figure 3
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + ry * sin(3 * TWO_PI * (double) q / mp);
-        a[cFig][q].y = my / 2 + ry * cos(1 * TWO_PI * (double) q / mp);
-    }
-    a[cFig][mp].x = a[cFig][0].x;
-    a[cFig][mp].y = a[cFig][0].y;
-    ++cFig;
-
-    /*
-     *  Figure 4
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + ry * (1 - 0.1 * frnd())
-           * sin(TWO_PI * (double) q / mp);
-        a[cFig][q].y = my / 2 + ry * (1 - 0.1 * frnd())
-           * cos(TWO_PI * (double) q / mp);
-    }
-    a[cFig][mp].x = a[cFig][0].x;
-    a[cFig][mp].y = a[cFig][0].y;
-    ++cFig;
-
-    /*
-     *  Figure 5
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + ry * (0.8 - 0.2 * sin(30 * TWO_PI * q / mp))
-           * sin(TWO_PI * (double) q / mp);
-        a[cFig][q].y = my / 2 + ry * (0.8 - 0.2 * sin(30 * TWO_PI * q / mp))
-           * cos(TWO_PI * (double) q / mp);
-    }
-    a[cFig][mp].x = a[cFig][0].x;
-    a[cFig][mp].y = a[cFig][0].y;
-    ++cFig;
-
-    /*
-     *  Figure 6
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + ry * sin(TWO_PI * (double) q / mp);
-        a[cFig][q].y = my / 2 + ry * cos(TWO_PI * (double) q / mp);
-    }
-    a[cFig][mp].x = a[cFig][0].x;
-    a[cFig][mp].y = a[cFig][0].y;
-    ++cFig;
-
-    /*
-     *  Figure 7
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + rx * cos(TWO_PI * (double) q / mp);
-        a[cFig][q].y = my / 2 + ry * sin(TWO_PI * (double) q / mp);
-    }
-    a[cFig][mp].x = a[cFig][0].x;
-    a[cFig][mp].y = a[cFig][0].y;
-    ++cFig;
-
-    /*
-     *  Figure 8
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = ((double) q / mp) * mx;
-        a[cFig][q].y = (1.0 - cos(((double) q / mp) * 3 * TWO_PI)) * my / 2.0;
-    }
-    ++cFig;
-
-    /*
-     *  Figure 9
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + rx * sin(2 * TWO_PI * (double) q / mp);
-        a[cFig][q].y = my / 2 + ry * cos(3 * TWO_PI * (double) q / mp);
-    }
-    a[cFig][mp].x = a[cFig][0].x;
-    a[cFig][mp].y = a[cFig][0].y;
-    ++cFig;
-
-    /*
-     *  Figure 10
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + ry * sin(5 * TWO_PI * (double) q / mp)
-           * ((double) q / mp);
-        a[cFig][q].y = my / 2 + ry * cos(5 * TWO_PI * (double) q / mp)
-           * ((double) q / mp);
-    }
-    ++cFig;
-
-    /*
-     *  Figure 11
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    rx = mx / 2;
-    ry = my / 2;
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = mx / 2 + ry * sin(6 * TWO_PI * (double) q / mp)
-           * ((double) q / mp);
-        a[cFig][q].y = my / 2 - ry * cos(6 * TWO_PI * (double) q / mp)
-           * ((double) q / mp);
+    mx = scrWidth - 1;
+    my = scrHeight - 1;
+    mp = numPoints - 1;
+
+    aWork[0] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+    aWork[1] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+    aTmp     = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+
+    if (figType & FT_CLOSED) {
+       /* rectangle */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       s = numPoints / 4;
+       for (q = 0; q < s; q++) {
+           a[numFigs][q].x = ((double) q / s) * mx;
+           a[numFigs][q].y = 0;
+           a[numFigs][s + q].x = mx;
+           a[numFigs][s + q].y = ((double) q / s) * my;
+           a[numFigs][2 * s + q].x = mx - ((double) q / s) * mx;
+           a[numFigs][2 * s + q].y = my;
+           a[numFigs][3 * s + q].x = 0;
+           a[numFigs][3 * s + q].y = my - ((double) q / s) * my;
+       }
+       for (q = 4 * s; q < numPoints; q++) 
+           a[numFigs][q].x = a[numFigs][q].y = 0;
+       a[numFigs][mp].x = a[numFigs][0].x;
+       a[numFigs][mp].y = a[numFigs][0].y;
+       ++numFigs;
+
+       /*  */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       rx = mx / 2;
+       ry = my / 2;
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = mx / 2 + rx * sin(1 * TWO_PI * (double) q / mp);
+           a[numFigs][q].y = my / 2 + ry * cos(3 * TWO_PI * (double) q / mp);
+       }
+       a[numFigs][mp].x = a[numFigs][0].x;
+       a[numFigs][mp].y = a[numFigs][0].y;
+       ++numFigs;
+
+       /*  */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       rx = mx / 2;
+       ry = my / 2;
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = mx / 2 + ry * sin(3 * TWO_PI * (double) q / mp);
+           a[numFigs][q].y = my / 2 + ry * cos(1 * TWO_PI * (double) q / mp);
+       }
+       a[numFigs][mp].x = a[numFigs][0].x;
+       a[numFigs][mp].y = a[numFigs][0].y;
+       ++numFigs;
+
+       /*  */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       rx = mx / 2;
+       ry = my / 2;
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = mx / 2 + ry 
+               * (0.8 - 0.2 * sin(30 * TWO_PI * q / mp))
+               * sin(TWO_PI * (double) q / mp);
+           a[numFigs][q].y = my / 2 + ry
+               * (0.8 - 0.2 * sin(30 * TWO_PI * q / mp))
+               * cos(TWO_PI * (double) q / mp);
+       }
+       a[numFigs][mp].x = a[numFigs][0].x;
+       a[numFigs][mp].y = a[numFigs][0].y;
+       ++numFigs;
+
+       /*  */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       rx = mx / 2;
+       ry = my / 2;
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = mx / 2 + ry * sin(TWO_PI * (double) q / mp);
+           a[numFigs][q].y = my / 2 + ry * cos(TWO_PI * (double) q / mp);
+       }
+       a[numFigs][mp].x = a[numFigs][0].x;
+       a[numFigs][mp].y = a[numFigs][0].y;
+       ++numFigs;
+
+       /*  */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       rx = mx / 2;
+       ry = my / 2;
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = mx / 2 + rx * cos(TWO_PI * (double) q / mp);
+           a[numFigs][q].y = my / 2 + ry * sin(TWO_PI * (double) q / mp);
+       }
+       a[numFigs][mp].x = a[numFigs][0].x;
+       a[numFigs][mp].y = a[numFigs][0].y;
+       ++numFigs;
+
+       /*  */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       rx = mx / 2;
+       ry = my / 2;
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = mx / 2 + rx * sin(2 * TWO_PI * (double) q / mp);
+           a[numFigs][q].y = my / 2 + ry * cos(3 * TWO_PI * (double) q / mp);
+       }
+       a[numFigs][mp].x = a[numFigs][0].x;
+       a[numFigs][mp].y = a[numFigs][0].y;
+       ++numFigs;
     }
     }
-    ++cFig;
-
-    /*
-     *  Figure 12
-     */
-    a[cFig] = (XPoint *) xmalloc(cPoint * sizeof(XPoint));
-    for (q = 0; q < cPoint; q++) {
-        a[cFig][q].x = ((double) q / mp) * mx;
-        a[cFig][q].y = (1.0 - sin(((double) q / mp) * 5 * TWO_PI)) * my / 2.0;
+
+    if (figType & FT_OPEN) {
+       /* sine wave, one period */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = ((double) q / numPoints) * mx;
+           a[numFigs][q].y = (1.0 - sin(((double) q / mp) * TWO_PI))
+               * my / 2.0;
+       }
+       ++numFigs;
+
+       /*  */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = ((double) q / mp) * mx;
+           a[numFigs][q].y = (1.0 - cos(((double) q / mp) * 3 * TWO_PI))
+               * my / 2.0;
+       }
+       ++numFigs;
+
+       /* spiral, one endpoint at bottom */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       rx = mx / 2;
+       ry = my / 2;
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = mx / 2 + ry * sin(5 * TWO_PI * (double) q / mp)
+               * ((double) q / mp);
+           a[numFigs][q].y = my / 2 + ry * cos(5 * TWO_PI * (double) q / mp)
+               * ((double) q / mp);
+       }
+       ++numFigs;
+
+       /* spiral, one endpoint at top */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       rx = mx / 2;
+       ry = my / 2;
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = mx / 2 + ry * sin(6 * TWO_PI * (double) q / mp)
+               * ((double) q / mp);
+           a[numFigs][q].y = my / 2 - ry * cos(6 * TWO_PI * (double) q / mp)
+               * ((double) q / mp);
+       }
+       ++numFigs;
+
+       /*  */
+       a[numFigs] = (XPoint *) xmalloc(numPoints * sizeof(XPoint));
+       for (q = 0; q < numPoints; q++) {
+           a[numFigs][q].x = ((double) q / mp) * mx;
+           a[numFigs][q].y = (1.0 - sin(((double) q / mp) * 5 * TWO_PI))
+               * my / 2.0;
+       }
+       ++numFigs;
     }
     }
-    ++cFig;
 
 #ifdef MARGINS
 
 #ifdef MARGINS
-    /*
-     *  Make some space around the figures.
-     */
+    /* make some space around the figures.  */
     marginx = (mx + 1) / 10;
     marginy = (my + 1) / 10;
     scalex = (double) ((mx + 1) - 2.0 * marginx) / (mx + 1.0);
     scaley = (double) ((my + 1) - 2.0 * marginy) / (my + 1.0);
     marginx = (mx + 1) / 10;
     marginy = (my + 1) / 10;
     scalex = (double) ((mx + 1) - 2.0 * marginx) / (mx + 1.0);
     scaley = (double) ((my + 1) - 2.0 * marginy) / (my + 1.0);
-    for (q = 0; q < cFig; q++)
-       for (w = 0; w < cPoint; w++) {
+    for (q = 0; q < numFigs; q++)
+       for (w = 0; w < numPoints; w++) {
            a[q][w].x = marginx + a[q][w].x * scalex;
            a[q][w].y = marginy + a[q][w].y * scaley;
        }
 #endif
 }
 
            a[q][w].x = marginx + a[q][w].x * scalex;
            a[q][w].y = marginy + a[q][w].y * scaley;
        }
 #endif
 }
 
-
-
-static void createPoints (void)
-{
-    int    q;
-    XPoint *pa = aCurr, *pa1 = aFrom, *pa2 = aTo;
-    long   lg, l1g;
-
-
-    lg = 8192L * gam, l1g = 8192L * (1.0 - gam);
-    for (q = 0; q < cPoint; q++) {
-        pa->x = (short) ((l1g * pa1->x + lg * pa2->x) / 8192L);
-        pa->y = (short) ((l1g * pa1->y + lg * pa2->y) / 8192L);
-        ++pa;
-        ++pa1;
-        ++pa2;
-    }
-}
-
-
-static void drawImage (void)
-{
-    register int q;
-    XPoint *old0, *old1, *new0, *new1;
-
-    /*
-     *  Problem: update the window without too much flickering. I do
-     *  this by handling each linesegment separately. First remove a
-     *  line, then draw the new line. The problem is that this leaves
-     *  small black pixels on the figure. To fix this, I draw the
-     *  entire figure using XDrawLines() afterwards.
-     */
-    if (aPrev) {
-       old0 = aPrev;
-       old1 = aPrev + 1;
-       new0 = aCurr;
-       new1 = aCurr + 1;
-       for (q = cPoint - 1; q; q--) {
-           XDrawLine(dpy, window, gcClear,
-                     old0->x, old0->y, old1->x, old1->y);
-           XDrawLine(dpy, window, gcDraw,
-                     new0->x, new0->y, new1->x, new1->y);
-           ++old0;
-           ++old1;
-           ++new0;
-           ++new1;
-       }
-    }
-    XDrawLines(dpy, window, gcDraw, aCurr, cPoint, CoordModeOrigin);
-    XFlush(dpy);
-}
-
-static void initLMorph (void)
+static void
+initLMorph(void)
 {
     int               steps;
     XGCValues         gcv;
     XWindowAttributes wa;
     Colormap          cmap;
 {
     int               steps;
     XGCValues         gcv;
     XWindowAttributes wa;
     Colormap          cmap;
+    char              *ft;
     
     
-    cPoint = get_integer_resource("points", "Integer");
+    numPoints = get_integer_resource("points", "Integer");
     steps = get_integer_resource("steps", "Integer");
     delay = get_integer_resource("delay", "Integer");
     steps = get_integer_resource("steps", "Integer");
     delay = get_integer_resource("delay", "Integer");
+    ft = get_string_resource("figtype", "String");
+
+    if (strcmp(ft, "all") == 0)
+       figType = FT_ALL;
+    else if (strcmp(ft, "open") == 0)
+       figType = FT_OPEN;
+    else if (strcmp(ft, "closed") == 0)
+       figType = FT_CLOSED;
+    else {
+       fprintf(stderr, "figtype should be `all', `open' or `closed'.\n");
+       figType = FT_ALL;
+    }
 
     if (steps <= 0)
       steps = (random() % 400) + 100;
 
 
     if (steps <= 0)
       steps = (random() % 400) + 100;
 
-    delta_gam = 1.0 / steps;
+    deltaGamma = 1.0 / steps;
     XGetWindowAttributes(dpy, window, &wa);
     XGetWindowAttributes(dpy, window, &wa);
+    scrWidth = wa.width;
+    scrHeight = wa.height;
     cmap = wa.colormap;
     gcv.foreground = get_pixel_resource("foreground", "Foreground", dpy, cmap);
     gcDraw = XCreateGC(dpy, window, GCForeground, &gcv);
     cmap = wa.colormap;
     gcv.foreground = get_pixel_resource("foreground", "Foreground", dpy, cmap);
     gcDraw = XCreateGC(dpy, window, GCForeground, &gcv);
@@ -423,13 +363,14 @@ static void initLMorph (void)
     gcClear = XCreateGC(dpy, window, GCForeground, &gcv);
     XClearWindow(dpy, window);
 
     gcClear = XCreateGC(dpy, window, GCForeground, &gcv);
     XClearWindow(dpy, window);
 
+    srandom(time(NULL));
     initPointArrays();
     aCurr = aWork[nWork = 0];
     aPrev = NULL;
     initPointArrays();
     aCurr = aWork[nWork = 0];
     aPrev = NULL;
-    gam = 2.0;
-    nTo = RND(cFig);
+    currGamma = maxGamma + 1.0;  /* force creation of new figure at startup */
+    nTo = RND(numFigs);
 
 
-    {
+    { /* jwz for version 2.11 */
       int width = random() % 10;
       int style = LineSolid;
       int cap   = (width > 1 ? CapRound  : CapButt);
       int width = random() % 10;
       int style = LineSolid;
       int cap   = (width > 1 ? CapRound  : CapButt);
@@ -438,45 +379,108 @@ static void initLMorph (void)
       XSetLineAttributes(dpy, gcDraw,  width, style, cap, join);
       XSetLineAttributes(dpy, gcClear, width, style, cap, join);
     }
       XSetLineAttributes(dpy, gcDraw,  width, style, cap, join);
       XSetLineAttributes(dpy, gcClear, width, style, cap, join);
     }
+}
+
+/* 55% of execution time */
+static void
+createPoints(void)
+{
+    int             q;
+    XPoint *pa = aCurr, *pa1 = aFrom, *pa2 = aTo;
+#ifdef USE_FLOAT
+    float           fg, f1g;
+#else
+    long            lg, l1g;
+#endif
+
+#ifdef USE_FLOAT
+    fg  = currGamma;
+    f1g = 1.0 - currGamma;
+#else
+    lg  = 8192L * currGamma;
+    l1g = 8192L * (1.0 - currGamma);
+#endif
+    for (q = numPoints; q; q--) {
+#ifdef USE_FLOAT
+        pa->x = (short) (f1g * pa1->x + fg * pa2->x);
+        pa->y = (short) (f1g * pa1->y + fg * pa2->y);
+#else
+        pa->x = (short) ((l1g * pa1->x + lg * pa2->x) / 8192L);
+        pa->y = (short) ((l1g * pa1->y + lg * pa2->y) / 8192L);
+#endif
+        ++pa;
+        ++pa1;
+        ++pa2;
+    }
+}
+
+/* 36% of execution time */
+static void
+drawImage(void)
+{
+    int             q;
+    XPoint *old0, *old1, *new0, *new1;
+
+    /* Problem: update the window without too much flickering. I do
+     * this by handling each linesegment separately. First remove a
+     * line, then draw the new line. The problem is that this leaves
+     * small black pixels on the figure. To fix this, I draw the
+     * entire figure using XDrawLines() afterwards. */
+    if (aPrev) {
+       old0 = aPrev;
+       old1 = aPrev + 1;
+       new0 = aCurr;
+       new1 = aCurr + 1;
+       for (q = numPoints - 1; q; q--) {
+           XDrawLine(dpy, window, gcClear,
+                     old0->x, old0->y, old1->x, old1->y);
+           XDrawLine(dpy, window, gcDraw,
+                     new0->x, new0->y, new1->x, new1->y);
+           ++old0;
+           ++old1;
+           ++new0;
+           ++new1;
+       }
+    }
+    XDrawLines(dpy, window, gcDraw, aCurr, numPoints, CoordModeOrigin);
 
 
+    XFlush(dpy);
 }
 
 }
 
-static void animateLMorph (void)
+/* neglectible % of execution time */
+static void
+animateLMorph(void)
 {
 {
-    if (gam > maxGamma) {
-        gam = 0.0;
+    if (currGamma > maxGamma) {
+        currGamma = 0.0;
         if (maxGamma == 1.0) {
             nFrom = nTo;
             aFrom = a[nFrom];
         } else {
         if (maxGamma == 1.0) {
             nFrom = nTo;
             aFrom = a[nFrom];
         } else {
-            memcpy(aTmp, aCurr, cPoint * sizeof(XPoint));
+            memcpy(aTmp, aCurr, numPoints * sizeof(XPoint));
             aFrom = aTmp;
             nFrom = -1;
         }
         do {
             aFrom = aTmp;
             nFrom = -1;
         }
         do {
-            nTo = RND(cFig);
+            nTo = RND(numFigs);
         } while (nTo == nFrom);
         aTo = a[nTo];
         if (RND(2)) {
         } while (nTo == nFrom);
         aTo = a[nTo];
         if (RND(2)) {
-            /*
-             *  Reverse the array to get more variation.
-             */
+            /* reverse the array to get more variation. */
             int    i1, i2;
             XPoint p;
             
             int    i1, i2;
             XPoint p;
             
-            for (i1 = 0, i2 = cPoint - 1; i1 < cPoint / 2; i1++, i2--) {
+            for (i1 = 0, i2 = numPoints - 1; i1 < numPoints / 2; i1++, i2--) {
                 p = aTo[i1];
                 aTo[i1] = aTo[i2];
                 aTo[i2] = p;
             }
         }
                 p = aTo[i1];
                 aTo[i1] = aTo[i2];
                 aTo[i2] = p;
             }
         }
-        /*
-         *  It may be nice to interrupt the next run.
-         */
-        if (RND(3) > 0)
-            maxGamma = 0.1 + 0.7 * (RND(1001) / 1000.0);
+        /* occationally interrupt the next run. */
+        if (RND(4) == 0)
+            maxGamma = 0.1 + 0.7 * (RND(1001) / 1000.0); /* partial run */
         else
         else
-            maxGamma = 1.0;
+            maxGamma = 1.0;                              /* full run */
     }
 
     createPoints();
     }
 
     createPoints();
@@ -484,7 +488,7 @@ static void animateLMorph (void)
     aPrev = aCurr;
     aCurr = aWork[nWork ^= 1];
 
     aPrev = aCurr;
     aCurr = aWork[nWork ^= 1];
 
-    gam += delta_gam;
+    currGamma += deltaGamma;
 }
 
 
 }
 
 
index a631f24cbf6183fcce4501fcc8f503f03ef2888e..63ab3f691984c619725bf15f0f3a224f903e9e01 100644 (file)
@@ -3,7 +3,7 @@
 lmorph \- morphing lines
 .SH SYNOPSIS
 .B lmorph
 lmorph \- morphing lines
 .SH SYNOPSIS
 .B lmorph
-[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-steps \fIint\fP] [\-delay \fIusecs\fP]
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-steps \fIint\fP] [\-delay \fIusecs\fP] [\-figtype \fItype\fP]
 .SH DESCRIPTION
 The \fIlmorph\fP program morphs between simple linedrawings using bilinear
 interpolation.
 .SH DESCRIPTION
 The \fIlmorph\fP program morphs between simple linedrawings using bilinear
 interpolation.
@@ -37,6 +37,10 @@ means a random number between 100 and 500.
 .B \-delay \fImicroseconds\fP
 How much of a delay should be introduced between steps of the animation.
 Default 50000.
 .B \-delay \fImicroseconds\fP
 How much of a delay should be introduced between steps of the animation.
 Default 50000.
+.TP 8
+.B \-figtype \fItype\fP
+Limit the figures to only open or closed figures. Possible types are
+"all" (default), "open" and "closed".
 .SH ENVIRONMENT
 .PP
 .TP 8
 .SH ENVIRONMENT
 .PP
 .TP 8
@@ -50,5 +54,5 @@ stored in the RESOURCE_MANAGER property.
 .BR X (1),
 .BR xscreensaver (1)
 .SH AUTHOR
 .BR X (1),
 .BR xscreensaver (1)
 .SH AUTHOR
-Sverre H. Huseby <sverrehu@ifi.uio.no> and Glenn T. Lines <gtl@si.sintef.no>,
+Sverre H. Huseby <sverrehu@online.no> and Glenn T. Lines <gtl@si.sintef.no>,
 built on top of the screen saver routines by Jamie Zawinski <jwz@netscape.com>.
 built on top of the screen saver routines by Jamie Zawinski <jwz@netscape.com>.
index a037f3db3eac2762420f676560738ae42812eb30..dbb77535155b64474d892a50d4c8a032fc9ba6cb 100644 (file)
@@ -1324,8 +1324,8 @@ enter_square (int n)                      /* move into a neighboring square */
 char *progclass = "Maze";
 
 char *defaults[] = {
 char *progclass = "Maze";
 
 char *defaults[] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*gridSize:  0",
   "*solveDelay:        5000",
   "*preDelay:  2000000",
   "*gridSize:  0",
   "*solveDelay:        5000",
   "*preDelay:  2000000",
index 9ce9097d8c0320e8a764efb0d8748b07e3176ce3..4b48484ce33f93ee7cb88ea0022711339b900c6e 100644 (file)
@@ -161,8 +161,8 @@ moire (Display *dpy, Window window, int offset, XColor *colors, int ncolors)
 char *progclass = "Moire";
 
 char *defaults [] = {
 char *progclass = "Moire";
 
 char *defaults [] = {
-  "*background:                blue",
-  "*foreground:                red",
+  ".background:                blue",
+  ".foreground:                red",
   "*random:            true",
   "*delay:             5",
   "*ncolors:           64",
   "*random:            true",
   "*delay:             5",
   "*ncolors:           64",
index 61d68c7081c5f425aa3a17c55b8c0a5e04f249d1..ee85b89ebd9477b9ecb6ab60f5d301d6eb78023e 100644 (file)
@@ -207,8 +207,8 @@ moire2 (Display *dpy, Window window)
 char *progclass = "Moire2";
 
 char *defaults [] = {
 char *progclass = "Moire2";
 
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                white",
+  ".background:                black",
+  ".foreground:                white",
   "*delay:             50000",
   "*thickness:         0",
   "*colors:            150",
   "*delay:             50000",
   "*thickness:         0",
   "*colors:            150",
index b686b95a245c8eab4bcb21c0db216fdb81d3a7af..352c5dc915410ac16cde143cd86a52655a1a51f9 100644 (file)
@@ -44,8 +44,8 @@
 char *progclass = "Munch";
 
 char *defaults [] = {
 char *progclass = "Munch";
 
 char *defaults [] = {
-    "*background:      black",
-    "*foreground:      white",
+    ".background:      black",
+    ".foreground:      white",
     "*delay:           5000",
     "*hold:            100000",
     "*clear:           50",
     "*delay:           5000",
     "*hold:            100000",
     "*clear:           50",
index 606e9fef37a26c796bdad0026e19dd2945da7b2a..f23e8b6f47f10f36e91b078f6d82c9ec18e706b2 100644 (file)
@@ -610,8 +610,8 @@ get_words (void)
 char *progclass = "Noseguy";
 
 char *defaults [] = {
 char *progclass = "Noseguy";
 
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                gray80",
+  ".background:                black",
+  ".foreground:                gray80",
 #ifndef VMS
   "*mode:              program",
 #else
 #ifndef VMS
   "*mode:              program",
 #else
index 5d11097da502fc5c272a9dbe94fad3c98846dd2a..4306f8a2a2395270e1767cb35542112d7e9ee818 100644 (file)
@@ -351,8 +351,8 @@ char *progclass = "Pedal";
  * should be dark.
  */
 char *defaults [] = {
  * should be dark.
  */
 char *defaults [] = {
-  "*background:                        black",
-  "*foreground:                        white",
+  ".background:                        black",
+  ".foreground:                        white",
   "*delay:                     5",
   "*fadedelay:                 200000",
   "*maxlines:                  1000",
   "*delay:                     5",
   "*fadedelay:                 200000",
   "*maxlines:                  1000",
index 4aa71da73800995b4fcd2a5398d2c2f65fa98546..b62e17ac71c6fb4d2d72b58aa658ae23737b2788 100644 (file)
@@ -223,8 +223,8 @@ pyro (Display *dpy, Window window, Colormap cmap)
 char *progclass = "Pyro";
 
 char *defaults [] = {
 char *progclass = "Pyro";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*count:     100",
   "*frequency: 30",
   "*scatter:   20",
   "*count:     100",
   "*frequency: 30",
   "*scatter:   20",
index c86bf646265c5e8b37481ea40389de9e15ce292f..f2898f1ccff452b9e057b9368849af792b5d5ed4 100644 (file)
@@ -454,8 +454,8 @@ qix1 (Display *dpy, Window window, struct qix *qix)
 char *progclass = "Qix";
 
 char *defaults [] = {
 char *progclass = "Qix";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*count:     1",
   "*segments:  50",
   "*poly:      2",
   "*count:     1",
   "*segments:  50",
   "*poly:      2",
index 65295710ba6d5624f5c791b2c58888b3584a8f54..867ecf03a2f17680bc40dc521294a6447ff7d909 100644 (file)
@@ -282,8 +282,8 @@ char *progclass = "RD";
 
 
 char *defaults [] = {
 
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*width:     0",                     /* tried to use -1 but it complained */
   "*height:    0",
   "*epoch:     40000",
   "*width:     0",                     /* tried to use -1 but it complained */
   "*height:    0",
   "*epoch:     40000",
index fa5e504840ceeb8da2c9a6c32225852f558bfbf9..f70f26c2ab240c02a403acf3ec6e10f06854626d 100644 (file)
@@ -488,8 +488,8 @@ init_rocks (Display *d, Window w)
 char *progclass = "Rocks";
 
 char *defaults [] = {
 char *progclass = "Rocks";
 
 char *defaults [] = {
-  "*background:        Black",
-  "*foreground:        #E9967A",
+  ".background:        Black",
+  ".foreground:        #E9967A",
   "*colors:    5",
   "*count:     100",
   "*delay:     50000",
   "*colors:    5",
   "*count:     100",
   "*delay:     50000",
index d6e0e2252c69a3cf82d0173f956bb5015ea78306..4b623628449a5a21de27de7961be7a77fcc722ff 100644 (file)
@@ -108,8 +108,8 @@ hurm (Display *dpy, Window window)
 char *progclass = "Rorschach";
 
 char *defaults [] = {
 char *progclass = "Rorschach";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  ".background:        black",
+  ".foreground:        white",
   "*xsymmetry: true",
   "*ysymmetry: false",
   "*iterations:        4000",
   "*xsymmetry: true",
   "*ysymmetry: false",
   "*iterations:        4000",
index 86789e4800a594caa72e63c0cd4dd1060f5ed7fc..1f99b3ab495302d9d8def8840d93850fd400e02f 100644 (file)
@@ -71,7 +71,7 @@ static XrmOptionDescRec default_options [] = {
 };
 
 static char *default_defaults[] = {
 };
 
 static char *default_defaults[] = {
-  "*root:              false",
+  ".root:              false",
   "*geometry:          600x480", /* this should be .geometry, but nooooo... */
   "*mono:              false",
   "*installColormap:   false",
   "*geometry:          600x480", /* this should be .geometry, but nooooo... */
   "*mono:              false",
   "*installColormap:   false",
@@ -115,6 +115,23 @@ merge_options (void)
          def_defaults_size * sizeof(*defaults));
   memcpy (merged_defaults + def_defaults_size, defaults,
          (defaults_size + 1) * sizeof(*defaults));
          def_defaults_size * sizeof(*defaults));
   memcpy (merged_defaults + def_defaults_size, defaults,
          (defaults_size + 1) * sizeof(*defaults));
+
+  /* This totally sucks.  Xt should behave like this by default.
+     If the string in `defaults' looks like ".foo", change that
+     to "Progclass.foo".
+   */
+  {
+    char **s;
+    for (s = merged_defaults; *s; s++)
+      if (**s == '.')
+       {
+         const char *oldr = *s;
+         char *newr = (char *) malloc(strlen(oldr) + strlen(progclass) + 3);
+         strcpy (newr, progclass);
+         strcat (newr, oldr);
+         *s = newr;
+       }
+  }
 }
 
 \f
 }
 
 \f
index f910dbe7eb9ac15b13dec02d8d5ff3e7b139fafd..366cdfb9ab5072257a3d763c3b361c68ae75e601 100644 (file)
@@ -331,8 +331,8 @@ char *defaults [] = {
   "*visualID:                  Best",
 #endif
 
   "*visualID:                  Best",
 #endif
 
-  "SlidePuzzle.background:     Black",
-  "SlidePuzzle.foreground:     Gray",
+  ".background:                        Black",
+  ".foreground:                        Gray",
   "*gridSize:                  70",
   "*pixelIncrement:            10",
   "*internalBorderWidth:       4",
   "*gridSize:                  70",
   "*pixelIncrement:            10",
   "*internalBorderWidth:       4",
index 75880b5b7da4e36a1b7b33ce16f97d7db3036273..89638197312eb1749c5fcc9ae879de4022263267 100644 (file)
@@ -422,8 +422,8 @@ run_starfish (Display *dpy, Window window, struct starfish *s)
 char *progclass = "Starfish";
 
 char *defaults [] = {
 char *progclass = "Starfish";
 
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                white",
+  ".background:                black",
+  ".foreground:                white",
   "*delay:             10000",
   "*cycleDelay:                100000",
   "*thickness:         0",             /* pixels, 0 = random */
   "*delay:             10000",
   "*cycleDelay:                100000",
   "*thickness:         0",             /* pixels, 0 = random */
index 6bc76ff27c43af1bbd9df24fe39c39ecac4acc3b..5711be45d8c123d7863d3d158677c6801598b1cb 100644 (file)
@@ -23,8 +23,8 @@
 char *progclass = "XJack";
 
 char *defaults [] = {
 char *progclass = "XJack";
 
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                #00EE00",
+  ".background:                black",
+  ".foreground:                #00EE00",
   "XJack.font:         -*-courier-medium-r-*-*-*-240-*-*-m-*-*-*",
   "*delay:             50000",
   0
   "XJack.font:         -*-courier-medium-r-*-*-*-240-*-*-m-*-*-*",
   "*delay:             50000",
   0
index 9ad4e98e34bd5aaedddb5c3b2ba40853ee8ab3ff..b0b7ec41cf005c1ead15c6753746862d6bd7a5ca 100644 (file)
@@ -82,6 +82,8 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
 #define MI_COUNT(MI)           (MI_BATCHCOUNT((MI)))
 #define MI_BLACK_PIXEL(MI)     (MI_WIN_BLACK_PIXEL(MI))
 #define MI_WHITE_PIXEL(MI)     (MI_WIN_WHITE_PIXEL(MI))
 #define MI_COUNT(MI)           (MI_BATCHCOUNT((MI)))
 #define MI_BLACK_PIXEL(MI)     (MI_WIN_BLACK_PIXEL(MI))
 #define MI_WHITE_PIXEL(MI)     (MI_WIN_WHITE_PIXEL(MI))
+#define MI_IS_FULLRANDOM(MI)   (MI_WIN_IS_FULLRANDOM(MI))
+#define MI_IS_VERBOSE(MI)      (MI_WIN_IS_VERBOSE(MI))
 
 #define MI_CLEARWINDOW(mi) XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi))
 
 
 #define MI_CLEARWINDOW(mi) XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi))
 
index a343cfff4759176ddd169b117aa5c9e49a329625..908d8d82374207bac9991675d9691cae807e6706 100644 (file)
@@ -47,8 +47,8 @@
 char *progclass = "XLyap";
 
 char *defaults [] = {
 char *progclass = "XLyap";
 
 char *defaults [] = {
-  "*background:                black",
-  "*foreground:                white",
+  ".background:                black",
+  ".foreground:                white",
   "*randomize:         false",
   "*builtin:           -1",
   "*minColor:          1",
   "*randomize:         false",
   "*builtin:           -1",
   "*minColor:          1",
index d8db872c8a401c3e42ee3f9360ffc9a62cbe333d..0138c64aee496652caff416c9c4296dd8ab11957 100644 (file)
@@ -14,8 +14,8 @@
 char *progclass = "XRoger";
 
 char *defaults [] = {
 char *progclass = "XRoger";
 
 char *defaults [] = {
-  "XRoger.background:  black",
-  "XRoger.foreground:  red",
+  ".background:                black",
+  ".foreground:                red",
   "*delay:             5",
   0
 };
   "*delay:             5",
   0
 };
index ec5cd5dced3d2b1bcd9d1f8bf1971eeff622a7d4..00f3b0315d60caf6866f8c0effcf35c38cba5d62 100644 (file)
--- a/setup.com
+++ b/setup.com
@@ -11,9 +11,11 @@ $ braid              :== $'mydir'braid
 $ bsod         :== $'mydir'bsod
 $ bubbles      :== $'mydir'bubbles
 $ coral                :== $'mydir'coral
 $ bsod         :== $'mydir'bsod
 $ bubbles      :== $'mydir'bubbles
 $ coral                :== $'mydir'coral
+$ crystal      :== $'mydir'crystal
 $ cynosure     :== $'mydir'cynosure
 $ decayscreen  :== $'mydir'decayscreen
 $ deco         :== $'mydir'deco
 $ cynosure     :== $'mydir'cynosure
 $ decayscreen  :== $'mydir'decayscreen
 $ deco         :== $'mydir'deco
+$ discrete     :== $'mydir'discrete
 $ drift                :== $'mydir'drift
 $ epicycle     :== $'mydir'epicycle
 $ fadeplot     :== $'mydir'fadeplot
 $ drift                :== $'mydir'drift
 $ epicycle     :== $'mydir'epicycle
 $ fadeplot     :== $'mydir'fadeplot
index 9fbd8af3545de120685f46127cb6df3af935606e..021352d599c56018fda6be34f671d5c79a6a21d5 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
 static const char screensaver_id[] =
-       "@(#)xscreensaver 2.21, by Jamie Zawinski (jwz@netscape.com)";
+       "@(#)xscreensaver 2.23, by Jamie Zawinski (jwz@netscape.com)";
index 6e20d120bde72fe0b627f8458918846d9e13cc4a..d729d382f55d954015c153d8bfe9850106e37991 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title:          xscreensaver
 Begin3
 Title:          xscreensaver
-Version:        2.21
-Entered-date:   15JUN98
+Version:        2.23
+Entered-date:   21JUN98
 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.
 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.
@@ -11,12 +11,12 @@ Keywords:       screen saver, screen lock, lock, xlock, X11
 Author:         jwz@netscape.com (Jamie Zawinski)
 Maintained-by:  jwz@netscape.com (Jamie Zawinski)
 Primary-site:   ftp.x.org /contrib/applications/
 Author:         jwz@netscape.com (Jamie Zawinski)
 Maintained-by:  jwz@netscape.com (Jamie Zawinski)
 Primary-site:   ftp.x.org /contrib/applications/
-                805K xscreensaver-2.21.tar.gz
-                21K  xscreensaver.README
+                819K xscreensaver-2.23.tar.gz
+                22K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
-                805K xscreensaver-2.21.tar.gz
-                21K  xscreensaver.README
+                819K xscreensaver-2.23.tar.gz
+                22K  xscreensaver.README
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
                 BSDI, SCO, OSF1, Ultrix, VMS.
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
                 BSDI, SCO, OSF1, Ultrix, VMS.