* use [http://en.wikipedia.org/wiki/GNU_build_system Autotools] (see the [http://www.gnu.org/software/automake/manual/automake.html manual] and this [http://www.lrde.epita.fr/~adl/autotools.html tutorial]; for the tests, have a look [http://www.sourceware.org/autobook/autobook/autobook_98.html here]):

* use [http://en.wikipedia.org/wiki/GNU_build_system Autotools] (see the [http://www.gnu.org/software/automake/manual/automake.html manual] and this [http://www.lrde.epita.fr/~adl/autotools.html tutorial]; for the tests, have a look [http://www.sourceware.org/autobook/autobook/autobook_98.html here]):

touch configure.ac Makefile.am src/Makefile.am doc/Makefile.am #and edit
autoreconf --install # use autoreconf --force the next times
./configure #can be followed by --prefix=~/bin, LDFLAGS=-L/usr/local/lib, etc
make
make check