If you have a configure script (a shell script) and want to install the desired program into a different location, you can run the following command:

./configure --prefix=/somewhere/else
make
make install