I have developed a program that uses two additional libraries not usually found in linux systems. Since I am using my own linux machine, I have root access and can install these in the standard directories. However, when I want to compile/run this program in a linux cluster which I have no root access, I need to install these libraries in my home directory. In order to move between the two systems, I have written two makefiles for each system. To complicate things even more, one of the libraries ends up with a different file name between the two systems. Therefore the two makefiles I have written are looking in different directories for the headers and libraries, and are also linking the library that its file name is different between the two systems.
I would like to start using autotools so that there is a single makefile, but because I have never used autotools before, I have no idea where to start to read/learn so that I can create something for my needs. I have read basic tutorials, but none give examples which might be useful for me. Does anyone have any information or suggestions on how to go on about this?
I for myself started to use the autotools few months ago, and I've been reading that book that I found quite nice : Autotools : a practitioner's guide to GNU Autoconf, Automake, and Libtool / by John Calcote. You don't have to read it from the beginning to the end, you can just focus on what you need.
Another thing that I did was to take a look at the configure.ac and makefile.am files of different open source project (for me avahi and libmicrohttpd), and it gave me a lot of good ideas.
I hope this helps!