First thing to do is check all the files in the package along the lines of README, INSTALL, README.LINUX and so forth, they will usually have specific info on compiling and making the program. Read them very carefully, you cannot usually type "./configure && make && make install" blindly and expect it to work.
Second, make sure you have the required shared libraries needed to compile the program, this should also be on the README's. Check the program website for more help.
Also, you can run "./configure --help" which will give you a list of options to pass to GCC during compile, which may or may not be useful.
Make sure that everytime you try to make a program you run "make clean" to clean the binaries and makefiles from the source-tree of your previous unsuccessful make attempt.
That should get you started. . .