http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.01.tar.gz
[xscreensaver] / driver / Makefile.in
index cfcb366c6dba755412d5ef6fc532608792bf4f9d..563e9028ed356a17f4c1d829f3775f17fc5dd08f 100644 (file)
@@ -17,17 +17,23 @@ man1dir             = $(mandir)/man1
 mansuffix      = 1
 
 GNOME_DATADIR  = @GNOME_DATADIR@
-GNOME_CCDIR    = $(GNOME_DATADIR)/control-center/Desktop
+GNOME_CCDIR_1  = $(GNOME_DATADIR)/control-center/Desktop
+GNOME_CCDIR_2  = $(GNOME_DATADIR)/control-center/capplets
 GNOME_PANELDIR = $(GNOME_DATADIR)/gnome/apps/Settings/Desktop
 GNOME_ICONDIR  = $(GNOME_DATADIR)/pixmaps
 GNOME_BINDIR   = $(bindir)
+HACK_CONF_DIR  = @HACK_CONF_DIR@
 
 CC             = @CC@
 CFLAGS         = @CFLAGS@
 LDFLAGS                = @LDFLAGS@
 DEFS           = @DEFS@
-DEFS2          = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
+SUBP_DEFS      = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
+GTK_DEFS       = $(DEFS) -DDEFAULT_ICONDIR='"$(GNOME_ICONDIR)"'
+CONF_DEFS      = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
+
 LIBS           = @LIBS@
+PERL           = @PERL@
 
 DEPEND         = @DEPEND@
 DEPEND_FLAGS   = @DEPEND_FLAGS@
@@ -37,7 +43,7 @@ SHELL         = /bin/sh
 INSTALL                = @INSTALL@
 SUID_FLAGS      = -o root -m 4755
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT  = @INSTALL_PROGRAM@
+INSTALL_SCRIPT  = @INSTALL_SCRIPT@
 INSTALL_SETUID  = @INSTALL_SETUID@
 INSTALL_DATA   = @INSTALL_DATA@
 INSTALL_DIRS   = @INSTALL_DIRS@
@@ -46,6 +52,7 @@ X_CFLAGS      = @X_CFLAGS@
 X_LIBS         = @X_LIBS@
 X_PRE_LIBS     = @X_PRE_LIBS@
 X_EXTRA_LIBS   = @X_EXTRA_LIBS@
+XMU_LIBS       = @XMU_LIBS@
 
 # Note:
 #
@@ -59,6 +66,7 @@ X_EXTRA_LIBS  = @X_EXTRA_LIBS@
 #
 # SAVER_LIBS is the link line for "xscreensaver", and
 # CMD_LIBS is the link line for "xscreensaver-command".
+# GETIMG_LIBS is the link line for "xscreensaver-getimage".
 
 
 AD_DIR         = @APPDEFAULTS@
@@ -73,8 +81,10 @@ INCLUDES     = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
 MOTIF_SRCS     = demo-Xm.c demo-Xm-widgets.c
 MOTIF_OBJS     = demo-Xm.o demo-Xm-widgets.o
 
-GTK_SRCS       = demo-Gtk.c demo-Gtk-widgets.c
-GTK_OBJS       = demo-Gtk.o demo-Gtk-widgets.o
+GTK_SRCS       = demo-Gtk.c demo-Gtk-conf.c \
+                 demo-Gtk-widgets.c demo-Gtk-support.c
+GTK_OBJS       = demo-Gtk.o demo-Gtk-conf.o \
+                 demo-Gtk-widgets.o demo-Gtk-support.o
 
 PWENT_SRCS     = passwd-pwent.c
 PWENT_OBJS     = passwd-pwent.o
@@ -91,12 +101,13 @@ NOLOCK_SRCS_1      = lock.c
 NOLOCK_OBJS_1  = lock.o
 
 TEST_SRCS      = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
-                 test-apm.c xdpyinfo.c
+                 test-apm.c test-fade.c xdpyinfo.c
 TEST_EXES      = test-passwd   test-uid   test-xdpms   test-grab \
-                 test-apm   xdpyinfo
+                 test-apm   test-fade   xdpyinfo
 
-MOTIF_LIBS     = @MOTIF_LIBS@ @XPM_LIBS@
-GTK_LIBS       = @GTK_LIBS@
+MOTIF_LIBS     = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
+GTK_LIBS       = @GTK_LIBS@ $(XMU_LIBS)
+XML_LIBS       = @XML_LIBS@
 
 XDPMS_LIBS     = @XDPMS_LIBS@
 
@@ -114,24 +125,42 @@ GL_SRCS           = @SAVER_GL_SRCS@
 GL_OBJS                = @SAVER_GL_OBJS@
 GL_LIBS                = @SAVER_GL_LIBS@
 
-LOGO           = $(UTILS_SRC)/logo-50.xpm
+ICON_SRC        = $(UTILS_SRC)/images
+LOGO           = $(ICON_SRC)/logo-50.xpm
+GNOME_ICONS     = $(ICON_SRC)/screensaver-*.xpm
+
 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
                  $(UTILS_SRC)/visual.c
 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
                  $(UTILS_BIN)/visual.o
 
 SAVER_UTIL_SRCS        = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
-                 $(UTILS_SRC)/logo.c $(UTILS_SRC)/spline.c \
-                 $(UTILS_SRC)/yarandom.c \
+                 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
                  $(DEMO_UTIL_SRCS)
 SAVER_UTIL_OBJS        = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
-                 $(UTILS_BIN)/logo.o $(UTILS_BIN)/spline.o \
-                 $(UTILS_BIN)/yarandom.o \
+                 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
                  $(DEMO_UTIL_OBJS)
 
-SAVER_SRCS_1   = xscreensaver.c windows.c timers.c subprocs.c \
+GETIMG_SRCS_1  = xscreensaver-getimage.c
+GETIMG_OBJS_1  = xscreensaver-getimage.o
+
+GETIMG_SRCS    = $(GETIMG_SRCS_1) \
+                 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
+                 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
+                 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
+                 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
+                 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
+
+GETIMG_OBJS    = $(GETIMG_OBJS_1) \
+                 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
+                 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
+                 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
+                 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
+                 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
+
+SAVER_SRCS_1   = xscreensaver.c windows.c timers.c subprocs.c exec.c \
                  xset.c splash.c setuid.c stderr.c
-SAVER_OBJS_1   = xscreensaver.o windows.o timers.o subprocs.o \
+SAVER_OBJS_1   = xscreensaver.o windows.o timers.o subprocs.o exec.o \
                  xset.o splash.o setuid.o stderr.o
 
 SAVER_SRCS     = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
@@ -145,25 +174,33 @@ CMD_OBJS  = remote.o xscreensaver-command.o
 DEMO_SRCS_1    = prefs.c dpms.c $(XMU_SRCS)
 DEMO_OBJS_1    = prefs.o dpms.o $(XMU_OBJS)
 
-DEMO_SRCS      = prefs.c dpms.c remote.c $(DEMO_UTIL_SRCS)
-DEMO_OBJS      = prefs.o dpms.o remote.o $(DEMO_UTIL_OBJS)
+DEMO_SRCS      = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
+DEMO_OBJS      = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
 
-SAVER_LIBS     = $(LIBS) $(X_LIBS) @SAVER_LIBS@ $(XDPMS_LIBS) $(GL_LIBS) \
-                 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
+SAVER_LIBS     = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
+                 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
+                 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
                  $(PASSWD_LIBS)
 
 CMD_LIBS       = $(LIBS) $(X_LIBS) \
                  $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
 
-EXES           = xscreensaver xscreensaver-command xscreensaver-demo
+GETIMG_LIBS    = $(LIBS) $(X_LIBS) \
+                 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
+
+EXES           = xscreensaver xscreensaver-command xscreensaver-demo \
+                 xscreensaver-getimage
 EXES2          = @ALL_DEMO_PROGRAMS@
+SCRIPTS                = xscreensaver-getimage-file xscreensaver-getimage-video
 
 HDRS           = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
-                 demo-Gtk-widgets.h demo-Gtk-stubs.h
+                 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
+                 demo-Gtk-conf.h
 MEN            = xscreensaver.man xscreensaver-demo.man \
-                 xscreensaver-command.man
-ALL_MEN                = xscreensaver.man \
-                 xscreensaver-demo.man xscreensaver-command.man
+                 xscreensaver-command.man \
+                 xscreensaver-getimage.man \
+                 xscreensaver-getimage-file.man \
+                 xscreensaver-getimage-video.man
 EXTRAS         = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
                  xscreensaver.kss xscreensaver-demo.glade \
                  screensaver-properties.desktop.in \
@@ -176,21 +213,21 @@ VMSFILES  = compile_axp.com compile_decc.com link_axp.com link_decc.com \
 TARFILES       = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
                  $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
                  $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
-                 $(CMD_SRCS) $(HDRS) $(TEST_SRCS) $(ALL_MEN)
+                 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
+                 $(TEST_SRCS) $(MEN)
 
 
 default: $(EXES)
 all: $(EXES) $(EXES2)
 tests: $(TEST_EXES)
 
-install:   install-program   install-ad   install-gnome   install-kde   \
-          install-man   @INSTALL_PAM@
-uninstall: uninstall-program uninstall-ad uninstall-gnome uninstall-kde \
-          uninstall-man
+install:   install-program   install-ad    install-scripts \
+          install-gnome     install-kde   install-man   @INSTALL_PAM@
+uninstall: uninstall-program uninstall-ad  \
+          uninstall-gnome   uninstall-kde uninstall-man
 
 install-strip:
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
-               INSTALL_SETUID='$(INSTALL_SETUID) -s' \
                install
 
 install-program: $(EXES)
@@ -228,6 +265,10 @@ install-program: $(EXES)
          $(install_prefix)$(bindir)/xscreensaver-demo ; \
        $(INSTALL_PROGRAM) xscreensaver-demo \
          $(install_prefix)$(bindir)/xscreensaver-demo
+       @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
+         $(install_prefix)$(bindir)/xscreensaver-getimage ; \
+       $(INSTALL_PROGRAM) xscreensaver-getimage \
+         $(install_prefix)$(bindir)/xscreensaver-getimage
 
 install-ad: XScreenSaver.ad
        @if [ ! -d $(install_prefix)$(AD_DIR) ]; then                         \
@@ -262,6 +303,35 @@ install-ad: XScreenSaver.ad
          fi                                                                  \
        fi
 
+install-scripts: $(SCRIPTS) munge-scripts
+       @for program in $(SCRIPTS); do                                  \
+         if [ -r $$program ] ; then                                    \
+           p=$$program ;                                               \
+         else                                                          \
+           p=$(srcdir)/$$program ;                                     \
+         fi ;                                                          \
+         echo $(INSTALL_SCRIPT) $$p                                    \
+           $(install_prefix)$(bindir)/$$program ;                      \
+         $(INSTALL_SCRIPT) $$p                                         \
+           $(install_prefix)$(bindir)/$$program ;                      \
+       done
+
+munge-scripts: $(SCRIPTS)
+       @tmp=/tmp/mf.$$$$ ;                                             \
+       perl="${PERL}" ;                                                \
+       rm -f $$tmp ;                                                   \
+       for program in $(SCRIPTS); do                                   \
+         echo "adjusting location of perl in $$program..." ;           \
+         sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@"      \
+             < $(srcdir)/$$program > $$tmp ;                           \
+         if cmp -s $(srcdir)/$$program $$tmp ; then                    \
+           true ;                                                      \
+         else                                                          \
+           cat $$tmp > ./$$program ;                                   \
+         fi ;                                                          \
+       done ;                                                          \
+       rm -f $$tmp
+
 install-man: $(MEN)
        @men="$(MEN)" ;                                                 \
        if [ ! -d $(install_prefix)$(man1dir) ]; then                   \
@@ -276,7 +346,7 @@ install-man: $(MEN)
        done
 
 uninstall-program:
-       @for program in $(EXES); do                                     \
+       @for program in $(EXES) $(SCRIPTS); do                          \
          echo rm -f $(install_prefix)$(bindir)/$$program ;             \
          rm -f $(install_prefix)$(bindir)/$$program ;                  \
        done
@@ -356,23 +426,36 @@ install-pam:
        fi
 
 install-gnome:: screensaver-properties.desktop
-       @lost1=""                                                            ;\
-         lost2=""                                                            ;\
+       @lost=""                                                             ;\
          if [ "$(GNOME_DATADIR)" != "" ]; then                                \
                                                                              \
-           if [ ! -d "$(install_prefix)$(GNOME_CCDIR)" ]; then                \
-             echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)"          ;\
-                  $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)"          ;\
+           if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then              \
+             echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)"        ;\
+                  $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)"        ;\
+           fi                                                                ;\
+           if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then              \
+             echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)"        ;\
+                  $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)"        ;\
            fi                                                                ;\
                                                                              \
            echo    $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop   \
-             $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop  ;\
+             $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
                                                                              \
            if      $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop   \
-             $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop  ;\
+             $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
              then true                                                       ;\
            else                                                               \
-             lost1="$(install_prefix)$(GNOME_CCDIR)"                         ;\
+             lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)"                 ;\
+           fi                                                                ;\
+                                                                             \
+           echo    $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop   \
+             $(install_prefix)$(GNOME_CCDIR_2)/screensaver.desktop           ;\
+                                                                             \
+           if      $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop   \
+             $(install_prefix)$(GNOME_CCDIR_2)/screensaver.desktop           ;\
+             then true                                                       ;\
+           else                                                               \
+             lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)"                 ;\
            fi                                                                ;\
                                                                              \
            if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then             \
@@ -386,26 +469,18 @@ install-gnome:: screensaver-properties.desktop
        $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop     ;\
              then true                                                       ;\
            else                                                               \
-             lost2="$(install_prefix)$(GNOME_PANELDIR)"                      ;\
+             lost="$$lost $(install_prefix)$(GNOME_PANELDIR)"                ;\
            fi                                                                ;\
                                                                              \
-           if [ "$$lost1" != "" -o "$$lost2" != "" ]; then                    \
+           if [ "$$lost" != "" ]; then                                        \
              e=echo ;                                                         \
  $$e ""                                                                      ;\
  $$e "  ####################################################################";\
- $$e "  Warning: unable to install screensaver-properties.desktop into"      ;\
-                 plurality="this file"                                       ;\
-          if [ "$$lost1" != "" -a "$$lost2" != "" ]; then                     \
- $$e "           $$lost1/ or into"                                           ;\
- $$e "           $$lost2/."                                                  ;\
-                 plurality="these files"                                     ;\
-          elif [ "$$lost1" != "" ]; then                                      \
- $$e "           $$lost1/."                                                  ;\
-          else                                                                \
- $$e "           $$lost2/."                                                  ;\
-          fi                                                                 ;\
- $$e "           Without $$plurality," 'the "Screen Saver" section of the'   ;\
- $$e "           Gnome Control Center (gnomecc) will not work properly."     ;\
+ $$e "  Warning: unable to install screensaver-properties.desktop into:"     ;\
+       set - $$lost                                                         ;\
+       for f in $$@ ; do echo "             $$f/" ; done                    ;\
+ $$e '           This means the "Screen Saver" section of the Gnome'         ;\
+ $$e "           Control Center (gnomecc) may not work properly."           ;\
  $$e "  ####################################################################";\
  $$e ""                                                                      ;\
              exit 1 ;                                                         \
@@ -438,6 +513,7 @@ install-gnome:: screensaver-properties-capplet
           fi ;                                                               \
         fi
 
+# xscreensaver.xpm
 install-gnome:: $(LOGO)
        @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
            if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then              \
@@ -451,6 +527,23 @@ install-gnome:: $(LOGO)
                  $(install_prefix)$(GNOME_ICONDIR)/$$target                 ;\
         fi
 
+# ../utils/images/screensaver-*.xpm
+install-gnome::
+       @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
+           if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then              \
+             echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)"        ;\
+                  $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)"        ;\
+           fi                                                                ;\
+          for target in $(GNOME_ICONS) ; do                                  \
+            dest=`echo $$target | sed 's@^.*/@@'`                           ;\
+            echo $(INSTALL_DATA) $$target                                    \
+                 $(install_prefix)$(GNOME_ICONDIR)/$$dest                   ;\
+                 $(INSTALL_DATA) $$target                                    \
+                 $(install_prefix)$(GNOME_ICONDIR)/$$dest                   ;\
+          done                                                              ;\
+        fi
+
+# screensaver-properties.desktop
 uninstall-gnome::
        @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
           f=screensaver-properties.desktop                                   ;\
@@ -460,6 +553,7 @@ uninstall-gnome::
                rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f                  ;\
         fi
 
+# screensaver-properties-capplet
 uninstall-gnome::
        @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
          program=screensaver-properties-capplet                             ;\
@@ -467,6 +561,7 @@ uninstall-gnome::
               rm -f $(install_prefix)$(bindir)/$$program                    ;\
         fi
 
+# xscreensaver.xpm
 uninstall-gnome::
        @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
          target=xscreensaver.xpm                                            ;\
@@ -474,6 +569,16 @@ uninstall-gnome::
               rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target              ;\
         fi
 
+# xscreensaver.xpm
+uninstall-gnome::
+       @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
+          for target in $(GNOME_ICONS) ; do                                  \
+            dest=`echo $$target | sed 's@^.*/@@'`                           ;\
+            echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$dest             ;\
+                 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$dest             ;\
+          done                                                              ;\
+        fi
+
 install-kde:
        @src="$(srcdir)/xscreensaver.kss" ;                                   \
        if [ "$$KDEDIR" != "" ]; then                                         \
@@ -520,7 +625,7 @@ depend: XScreenSaver_ad.h
        $(DEPEND) -s '# DO NOT DELETE: updated by make depend'              \
        $(DEPEND_FLAGS) --                                                  \
        $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --      \
-       $(SAVER_SRCS) $(CMD_SRCS)
+       $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
 
 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
@@ -531,7 +636,7 @@ distdepend: update_ad_version update_man_version XScreenSaver_ad.h
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
        $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --      \
-       $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS)                           \
+       $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1)          \
        $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS)             \
        $(TEST_SRCS) |                                                      \
        (                                                                   \
@@ -549,22 +654,25 @@ distdepend: update_ad_version update_man_version XScreenSaver_ad.h
 # Updates the version number in the app-defaults file to be in sync with 
 # the version number in version.h.  This is so people can tell when they
 # have a version skew between the app-defaults file and the executable.
+# Also update hacks/config/README in the same way.
 update_ad_version::
-       @S=XScreenSaver.ad.in ;                                             \
+       @files="XScreenSaver.ad.in ../hacks/config/README" ;                \
        U=$(UTILS_SRC)/version.h ;                                          \
        V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
        D=`date '+%d-%b-%Y'` ;                                              \
-       echo -n "Updating version number in $$S to $$V $$D... " ;           \
-       T=/tmp/xs.$$$$ ;                                                    \
-       sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/"         \
-           -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/"     \
-         < $$S > $$T ;                                                     \
-       if cmp -s $$S $$T ; then                                            \
-         echo "unchanged." ;                                               \
-       else                                                                \
-         cat $$T > $$S ;                                                   \
-         echo "done." ;                                                    \
-       fi ;                                                                \
+       for S in $$files ; do                                               \
+         echo -n "Updating version number in $$S to $$V $$D... " ;         \
+         T=/tmp/xs.$$$$ ;                                                  \
+         sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/"       \
+             -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/"   \
+           < $$S > $$T ;                                                   \
+         if cmp -s $$S $$T ; then                                          \
+           echo "unchanged." ;                                             \
+         else                                                              \
+           cat $$T > $$S ;                                                 \
+           echo "done." ;                                                  \
+         fi ;                                                              \
+       done ;                                                              \
        rm $$T
 
 update_man_version::
@@ -605,8 +713,8 @@ $(UTILS_BIN)/usleep.o:              $(UTILS_SRC)/usleep.c
 $(UTILS_BIN)/visual.o:         $(UTILS_SRC)/visual.c
 $(UTILS_BIN)/xmu.o:            $(UTILS_SRC)/xmu.c
 $(UTILS_BIN)/logo.o:           $(UTILS_SRC)/logo.c
-$(UTILS_BIN)/spline.o:         $(UTILS_SRC)/spline.c
 $(UTILS_BIN)/yarandom.o:       $(UTILS_SRC)/yarandom.c
+$(UTILS_BIN)/colorbars.o:      $(UTILS_SRC)/colorbars.c
 
 $(SAVER_UTIL_OBJS):
        cd $(UTILS_BIN) ; \
@@ -616,11 +724,22 @@ $(SAVER_UTIL_OBJS):
 .c.o:
        $(CC) -c $(INCLUDES) $(DEFS)  $(CFLAGS) $(X_CFLAGS) $<
 
-# subprocs is the only one that takes an extra -D option.
+# subprocs takes an extra -D option.
 subprocs.o: subprocs.c
-       $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) \
+       $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
          $(srcdir)/subprocs.c
 
+# demo-Gtk takes an extra -D option, and an extra -I option.
+demo-Gtk.o: demo-Gtk.c
+       $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) $(GTK_DEFS) \
+         $(CFLAGS) $(X_CFLAGS) \
+         $(srcdir)/demo-Gtk.c
+
+# demo-Gtk-conf takes an extra -D option.
+demo-Gtk-conf.o: demo-Gtk-conf.c
+       $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
+         $(srcdir)/demo-Gtk-conf.c
+
 
 # How we build the default app-defaults file into the program.
 #
@@ -643,7 +762,7 @@ xscreensaver-command: $(CMD_OBJS)
 
 
 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
-       cp -p @PREFERRED_DEMO_PROGRAM@ $@
+       $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@
 
 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
@@ -652,9 +771,11 @@ xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
 
 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
-       $(GTK_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
+       $(GTK_LIBS) $(XML_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
        $(X_EXTRA_LIBS)
 
+xscreensaver-getimage: $(GETIMG_OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
 
 
 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
@@ -678,6 +799,10 @@ test-grab: test-grab.o
 test-apm: test-apm.o
        $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
 
+TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
+test-fade: test-fade.o $(UTILS_BIN)/fade.o
+       $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
+
 
 xdpyinfo.o: xdpyinfo.c
        $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
@@ -697,72 +822,59 @@ xdpyinfo: xdpyinfo.o
 xscreensaver.o: ../config.h
 xscreensaver.o: $(srcdir)/xscreensaver.h
 xscreensaver.o: $(srcdir)/prefs.h
-xscreensaver.o: $(UTILS_SRC)/version.h
-xscreensaver.o: $(UTILS_SRC)/yarandom.h
-xscreensaver.o: $(UTILS_SRC)/resources.h
-xscreensaver.o: $(UTILS_SRC)/visual.h
-xscreensaver.o: $(UTILS_SRC)/usleep.h
 xscreensaver.o: XScreenSaver_ad.h
 windows.o: ../config.h
 windows.o: $(srcdir)/xscreensaver.h
 windows.o: $(srcdir)/prefs.h
-windows.o: $(UTILS_SRC)/visual.h
-windows.o: $(UTILS_SRC)/fade.h
 timers.o: ../config.h
 timers.o: $(srcdir)/xscreensaver.h
 timers.o: $(srcdir)/prefs.h
 subprocs.o: ../config.h
 subprocs.o: $(srcdir)/xscreensaver.h
 subprocs.o: $(srcdir)/prefs.h
-subprocs.o: $(UTILS_SRC)/yarandom.h
-subprocs.o: $(UTILS_SRC)/visual.h
+exec.o: ../config.h
 xset.o: ../config.h
 xset.o: $(srcdir)/xscreensaver.h
 xset.o: $(srcdir)/prefs.h
 splash.o: ../config.h
 splash.o: $(srcdir)/xscreensaver.h
 splash.o: $(srcdir)/prefs.h
-splash.o: $(UTILS_SRC)/resources.h
 setuid.o: ../config.h
 setuid.o: $(srcdir)/xscreensaver.h
 setuid.o: $(srcdir)/prefs.h
 stderr.o: ../config.h
 stderr.o: $(srcdir)/xscreensaver.h
 stderr.o: $(srcdir)/prefs.h
-stderr.o: $(UTILS_SRC)/resources.h
-stderr.o: $(UTILS_SRC)/visual.h
 demo-Xm.o: ../config.h
-demo-Xm.o: $(UTILS_SRC)/version.h
 demo-Xm.o: $(srcdir)/prefs.h
-demo-Xm.o: $(UTILS_SRC)/resources.h
-demo-Xm.o: $(UTILS_SRC)/visual.h
 demo-Xm.o: $(srcdir)/remote.h
-demo-Xm.o: $(UTILS_SRC)/usleep.h
 demo-Xm.o: XScreenSaver_ad.h
 demo-Xm-widgets.o: ../config.h
 demo-Gtk.o: ../config.h
-demo-Gtk.o: $(UTILS_SRC)/version.h
 demo-Gtk.o: $(srcdir)/prefs.h
-demo-Gtk.o: $(UTILS_SRC)/resources.h
-demo-Gtk.o: $(UTILS_SRC)/visual.h
 demo-Gtk.o: $(srcdir)/remote.h
-demo-Gtk.o: $(UTILS_SRC)/usleep.h
-demo-Gtk.o: $(UTILS_SRC)/logo-50.xpm
-demo-Gtk.o: $(UTILS_SRC)/logo-180.xpm
 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
+demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
+demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
 demo-Gtk.o: XScreenSaver_ad.h
+demo-Gtk-conf.o: ../config.h
+demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
 demo-Gtk-widgets.o: ../config.h
 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
+demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
+demo-Gtk-support.o: ../config.h
+demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
+xscreensaver-getimage.o: ../config.h
+xscreensaver-getimage.o: $(srcdir)/prefs.h
+xscreensaver-getimage.o: XScreenSaver_ad.h
 passwd-pwent.o: ../config.h
 lock.o: ../config.h
 lock.o: $(srcdir)/xscreensaver.h
 lock.o: $(srcdir)/prefs.h
-lock.o: $(UTILS_SRC)/resources.h
 passwd.o: ../config.h
 prefs.o: ../config.h
 prefs.o: $(srcdir)/prefs.h
-prefs.o: $(UTILS_SRC)/resources.h
 dpms.o: ../config.h
 dpms.o: $(srcdir)/xscreensaver.h
 dpms.o: $(srcdir)/prefs.h
@@ -770,16 +882,15 @@ remote.o: ../config.h
 remote.o: $(srcdir)/remote.h
 xscreensaver-command.o: ../config.h
 xscreensaver-command.o: $(srcdir)/remote.h
-xscreensaver-command.o: $(UTILS_SRC)/version.h
 test-passwd.o: ../config.h
 test-passwd.o: $(srcdir)/xscreensaver.h
 test-passwd.o: $(srcdir)/prefs.h
-test-passwd.o: $(UTILS_SRC)/resources.h
-test-passwd.o: $(UTILS_SRC)/version.h
-test-passwd.o: $(UTILS_SRC)/visual.h
 test-passwd.o: XScreenSaver_ad.h
 test-uid.o: ../config.h
 test-xdpms.o: ../config.h
 test-grab.o: ../config.h
 test-apm.o: ../config.h
+test-fade.o: ../config.h
+test-fade.o: $(srcdir)/xscreensaver.h
+test-fade.o: $(srcdir)/prefs.h