I've been reading the manuals for autoconf/automake and have been unable
to get a setup working correctly with autoconf. I've written up a toy
shared library and right now the Makefile has a rule to install the
library directly to `/usr/local`. All I really want from autoconf is to
be able to have `--prefix` user-configurable. I figured it was better to
use autoconf/automake than reinvent the wheel, but I'm totally unable to
get it working.
Does anyone here know a source for a very simple example of what is
needed (configure.ac/Makefile.in) to get this type of setup working?
I've been reading both manuals, but I can't figure it out. Maybe someone
here can even immediately see how to do this.
I'm attaching an extremely simplified version of a shared library setup.
I'm also pasting the text of the files in below in case you just want to
read directly (instead of extracting something from a random person on
the internet). Basically if you run `make` it compiles a shared library
for you with publicly exports one function called `public_func`. If you
run `make test` it will test it by setting the current directory to
LD_LIBRARY_PATH. You can install it by running `make install` and then
ldconfig (though I doubt you want to...). This is the repo structure: