I made a while back GNU readline support for GCL-2.3 and all programs
using GCL like Maxima. Back then I needed to link readline statically, and
it worked fine.
Now I'm porting the patch to GCL-2.3.8 and it seems that readline gets
linked dynamically just fine. Nevertheless, it seems that my code in GCL
gets linked in "statically"--which means that my initialization routine,
which initializes Readline variables, gets called only while GCL is being
compiled. But when the user later actually runs GCL, the readline
variables are resetted and it doesn't work.
So, I should ensure that some C-function would be called when GCL is
actually run, after compilation. stracing saved_maxima it seems that it
might run "init.lsp" at the startup. So I could register a C function
as a LISP command and call my initialization routine from
init.lsp. However this might not be ideal solution, since it wouldn't be
transparent to GCL user.
How could I trigger my C function at Maxima load time (instead of compile
time)?