How to write configure and makefile

Hi,
I am new to writing programs for linux (although have programmed extensively in C,C++ before on windows.).I want to write the configure and makefile for the programs I recently wrote in linux (Ubuntu 9.04) so as to easily install them on other *nix systems. Please do guide me how to write these configure and makefile (any good and easy to uderstand link would suffice). I shall be highly grateful to you. Please pardon if I posted it in wrong place or repost. (newbie here:o)

Here's a complete book on the autotools (autoconf/automake/libtool)

Thanks a lot buddy:). Will go through it and give the feedback in evening. Please do provide links to such books on other unix programming related subjects as well like ncurses, networking (found one known as beej guide. Its great.), Gtk programming,Kernel programming. Please share only the
detailed ones like the 'autobook'. Thanks in advance.

P.S.: the problem with the documents and man pages shipped with these tools is that they are too cryptic for a newbie in linux programming arena.

Don't feel bad -- they really are that cryptic. :wink: Some coders use their templates and hope they never have to touch them again. I just write my own makefiles unless I can't possibly avoid them. Makefiles are easy.