For a general explanation of how to build from source see my answer here:
To address your specific question here about
./configure please read on:
To gain a list of the appropriate flags and options available for the program you are compiling, enter
Part of a sample file for
Pinta generated from the above command:
`configure' configures pinta 1.3 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
Some influential environment variables:
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L< lib dir > if you have libraries in a
LIBS libraries to pass to the linker, e.g. -l
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I< include dir > if
you have headers in a nonstandard directory
CPP C preprocessor
You can override the default options by specifying locations of packages or libraries if they are in non-standard locations or have different names than
configure expects as this article showed. For more on flags as used in the configure script itself, see this discussion here.
Or if the program is not to be installed in the default location (the
/usr/local hierarchy) you can specify, for example
There are many more options that can be used, and the list of commands passed to
./configure can become very long, but it is all very specific to the program you are compiling; very often no special options are needed.