I would like to know the exact background tasks that happen when you install an application from source. What happens when you run ./configure, make, and make install?
I tried googling a bit about it but was unable to find any explanations.
./configure runs a script named "configure" in the current directory. make runs the program "make" in your path, and make install runs it again with the argument "install".
Generally, the "configure" script was generated by a collection of programs known as "autotools". It checks your system and tries to generate a makefile (see below) appropriate for your system. It often succeeds.
This makefile it creates (usually called "Makefile", note the capital "M") is used by the program make (on Linux it's probably GNU's make, but there are other versions) to actually compile the software.
The make install command invokes make again, after the software is built, and tells it to execute the series of commands defined as "install" in the makefile.
These things are all conventional, so there's no guarantee that any random file named "configure" will actually do that, or that the target named "install" in a makefile will actually install software, but that's what most people expect from a file named "configure" in somebody's source directory: that it will generate a makefile to compile the program.
configure is generated by autoconf, which is one of the collection of programs that comprise autotools. The makefile is generated by automake. configure, using a template file generated by automake.
configureand read the script. Read the man page ofmakeand then the contents of the Makefile (generated byconfigure). Capture the output of running the commands with redirection and look at each line individually. Nothing is hidden, you just have to put in effort (in the order of a few days the first time, if you have never looked at things).