# Previously written for xscreensaver-2.17 and xscreensaver-5.10.
Currently this is for getting xlockmore modes running in xscreensaver-5.66.

First figure out how to compile xscreensaver without my changes.
For me I had to do this:
  install intltool 0.51.0
  ./configure
  make
  dies trying to build ximage-loader.o... not my issue
  (previously had trouble with: libglade-2.0 not found... no demo it warns and no jpeg)

Then... with a "make -f Makefile.in disclean" copy of latest code say xlockmore-5.66
  cp -rp xlockmore-5.66 xsreensaver-5.44/xlockmore 
  cd xsreensaver-5.44
  edit configure.in replace 
for d in utils jwxyz hacks hacks/glx driver ; do
for d in utils jwxyz hacks xlockmore/xlock xlockmore/modes xlockmore/modes/glx hacks/glx driver; do
   similar for AC_OUTPUT add these 2 lines after hacks/Makefile
          xlockmore/xlock/Makefile
          xlockmore/modes/Makefile
          xlockmore/modes/glx/Makefile

   autoconf
(I made copies configure.in and configure in this directory, but may go out of date)
  cd xlockmore/xlock
  mv Makefile.inxs Makefile.in
  cd ../modes
  mv Makefile.inxs Makefile.in
  cd glx
  mv Makefile.inxs Makefile.in
  cd ../../..
  ./configure
For me I had to edit the config.h and comment out
/*#define HAVE_GDK_PIXBUF 1*/
add next line
#define HAVE_GTK2 1

I had to add -lpng16 to the end of HACK_POST in many Makefiles (hacks/Makefile)

 make
 cd hacks
 cp ../xlockmore/xscreensaver/xlockmore.h .  # just edited to add common.h, stuff Jamie forgot about I guess
 cp ../xlockmore/xscreensaver/xlockmoreI.h .  # small edit for recursion_depth
 cp ../xlockmore/xscreensaver/xlockmore.c .  # small edit for blank mode for the completionist
 make xlockmore.o
 cd glx
 make # fails so needed -lpng16 also
 cd ../../xlockmore/xlock
 make
gives a few warnings about iostuff
 cd ../modes
 make
New automata.c and automata.h supplied and all automata modes should use this.
(Makefile.inxs modified to use this version already rather than the one in xscreensaver.)
ball, bat, pacman, puzzle converted though it runs it is not working correctly yet
solitaire needs refresh and green/red swap.
The build should stop with random.c... (no reason to convert that one I guess).
 cd glx
 rm *track* # confuses build
 make
Should buld most now.
fire needs its trees and ground images.
atunnels needs bitmap


Some warnings to clean up:
iostuff.c: In function ‘getWords’:
iostuff.c:855:14: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  855 |       (void) fgets(p, BUFSIZ - strlen(&buf[screen * BUFSIZ]), pp);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iostuff.c:857:14: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  857 |       (void) fgets(p, BUFSIZ - strlen(&buf[screen * BUFSIZ]), pp);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:494,
                 from /usr/include/X11/Xos.h:62,
                 from xlock.h:240,
                 from iostuff.c:27:
In function ‘strncpy’,
    inlined from ‘getImage’ at iostuff.c:510:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘getPixmap’ at iostuff.c:719:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘getModeFont’ at iostuff.c:748:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

deluxe.c: In function ‘init_deluxe’:
deluxe.c:462:7: warning: implicit declaration of function ‘allocate_alpha_colors’; did you mean ‘allocate_writable_colors’? [-Wimplicit-function-declaration]
       allocate_alpha_colors (dlp->xgwa.screen, dlp->xgwa.visual,
       ^~~~~~~~~~~~~~~~~~~~~
       allocate_writable_colors
deluxe.c:462:7: warning: nested extern declaration of ‘allocate_alpha_colors’ [-Wnested-externs]

fzort.c:557:14: warning: no previous prototype for ‘fill_triangle_1bpp_lsb_to_msb’ [-Wmissing-prototypes]
 #define NAME fill_triangle_1bpp_lsb_to_msb
              ^
fz_filler.h:7:1: note: in expansion of macro ‘NAME’
 NAME(fzort_ctx *ctx, struct pvertex *v1,
 ^~~~
fzort.c:563:14: warning: no previous prototype for ‘fill_triangle_1bpp_msb_to_lsb’ [-Wmissing-prototypes]
 #define NAME fill_triangle_1bpp_msb_to_lsb
              ^
fz_filler.h:7:1: note: in expansion of macro ‘NAME’
 NAME(fzort_ctx *ctx, struct pvertex *v1,
 ^~~~
fzort.c:568:14: warning: no previous prototype for ‘fill_triangle_8bpp’ [-Wmissing-prototypes]
 #define NAME fill_triangle_8bpp
              ^
fz_filler.h:7:1: note: in expansion of macro ‘NAME’
 NAME(fzort_ctx *ctx, struct pvertex *v1,
 ^~~~
fzort.c:572:14: warning: no previous prototype for ‘fill_triangle_16bpp’ [-Wmissing-prototypes]
 #define NAME fill_triangle_16bpp
              ^
fz_filler.h:7:1: note: in expansion of macro ‘NAME’
 NAME(fzort_ctx *ctx, struct pvertex *v1,
 ^~~~
fzort.c:576:14: warning: no previous prototype for ‘fill_triangle_32bpp’ [-Wmissing-prototypes]
 #define NAME fill_triangle_32bpp
              ^
fz_filler.h:7:1: note: in expansion of macro ‘NAME’
 NAME(fzort_ctx *ctx, struct pvertex *v1,
 ^~~~

xjack.c: In function ‘draw_xjack’:
xjack.c:374:9: warning: implicit declaration of function ‘tolower’ [-Wimplicit-function-declaration]
    if ((tolower(c) != tolower(*(jp->s)))
         ^~~~~~~

run.c: In function ‘free_run_screen’:
run.c:107:10: warning: implicit declaration of function ‘kill’; did you mean ‘ceill’? [-Wimplicit-function-declaration]
   (void) kill(rp->numberprocess, SIGKILL);
          ^~~~
          ceill
run.c:107:10: warning: nested extern declaration of ‘kill’ [-Wnested-externs]
run.c:108:10: warning: implicit declaration of function ‘wait’; did you mean ‘write’? [-Wimplicit-function-declaration]
   (void) wait(&n);
          ^~~~
          write
run.c:108:10: warning: nested extern declaration of ‘wait’ [-Wnested-externs]

rubik.c: In function ‘rubik_handle_event’:
rubik.c:2001:6: warning: implicit declaration of function ‘gltrackball_event_handler’; did you mean ‘gltrackball_rotate’? [-Wimplicit-function-declaration]
  if (gltrackball_event_handler (event, rp->trackball,
      ^~~~~~~~~~~~~~~~~~~~~~~~~
      gltrackball_rotate
rubik.c:2001:6: warning: nested extern declaration of ‘gltrackball_event_handler’ [-Wnested-externs]
rubik.c: In function ‘free_rubik_screen’:
rubik.c:2052:3: warning: implicit declaration of function ‘gltrackball_free’; did you mean ‘gltrackball_reset’? [-Wimplicit-function-declaration]
   gltrackball_free (rp->trackball);
   ^~~~~~~~~~~~~~~~
   gltrackball_reset
rubik.c:2052:3: warning: nested extern declaration of ‘gltrackball_free’ [-Wnested-externs]

skewb.c: In function ‘skewb_handle_event’:
skewb.c:1421:6: warning: implicit declaration of function ‘gltrackball_event_handler’; did you mean ‘gltrackball_rotate’? [-Wimplicit-function-declaration]
  if (gltrackball_event_handler (event, sp->trackball,
      ^~~~~~~~~~~~~~~~~~~~~~~~~
      gltrackball_rotate
skewb.c:1421:6: warning: nested extern declaration of ‘gltrackball_event_handler’ [-Wnested-externs]
skewb.c: In function ‘free_skewb_screen’:
skewb.c:1470:3: warning: implicit declaration of function ‘gltrackball_free’; did you mean ‘gltrackball_reset’? [-Wimplicit-function-declaration]
   gltrackball_free (sp->trackball);
   ^~~~~~~~~~~~~~~~
   gltrackball_reset
skewb.c:1470:3: warning: nested extern declaration of ‘gltrackball_free’ [-Wnested-externs]

sproingies.c:606:1: warning: no previous prototype for ‘DisplaySproingies’ [-Wmissing-prototypes]
 DisplaySproingies(int screen)
 ^~~~~~~~~~~~~~~~~
sproingies.c:661:1: warning: no previous prototype for ‘NextSproingieDisplay’ [-Wmissing-prototypes]
 NextSproingieDisplay(int screen)
 ^~~~~~~~~~~~~~~~~~~~
sproingies.c:683:1: warning: no previous prototype for ‘CleanupSproingies’ [-Wmissing-prototypes]
 CleanupSproingies(int screen)
 ^~~~~~~~~~~~~~~~~
sproingies.c:713:1: warning: no previous prototype for ‘InitSproingies’ [-Wmissing-prototypes]
 InitSproingies(int wfmode, int grnd, int mspr, int screen, int numscreens,
 ^~~~~~~~~~~~~~
sproingiewrap.c:125:1: warning: no previous prototype for ‘SproingieSwap’ [-Wmissing-prototypes]
 SproingieSwap(void)
 ^~~~~~~~~~~~~


Textureless modes:

Atlantis, Atunnels, Fire, Lament, Sballs

Unusable:

Stairs, Decay, Deluxe, Helix, Image, Petal, Puzzle

Not opening immediately:

Bomb

Freezes Xorg with 99% CPU Usage:

Clock, Euler2d, Scooter (very fast)

Trails (fixed?):

Galaxy

Floating point exception on Click:

Qix

Other errors:

lightning: not working correctly
pacman: sometimes erratic movement
penrose: resets on first polygon render; working fine without polygon
X error in star:
X Error of failed request:  BadPixmap (invalid Pixmap parameter)
  Major opcode of failed request:  54 (X_FreePixmap)
  Resource id in failed request:  0x320006a
  Serial number of failed request:  6115
  Current serial number in output stream:  6128
toneclock: sometimes graphical glitches happen

