The configure script in order to allow a program to run on a variety of different types of machine design. Before using make to compile the source code, configure and will be matched on the target machine depends according to their libraries.
Convention, all the configure script from the script file name is regarded configure
, in general, is a shell script to generate the makefile according to where the system environment. When I read the contents of some programs configure super much, it was hard to read.
Scan the current environment running the configure script to generate a named config.status
sub-script. Sub-script Makefile.in
files to adapt to the current system environment Makefile
file.
GNU build system
This tool can help us generate the configure script. System Build the GNU , also known as Autotools
.
This tool queries the current system environment variables, platform architecture, currently dependent libraries and their location, and then based on this information to make, so that we can achieve the same set of code only what you can configure different unix / linux systems in compile and run.
Autotools contains commands are autoconf
, automake
, libtool
.
autoconf
The main role is to create autoconf command configure
. It is based on configure.ac
documents generated configure
file.
autoscan
autoscan
Autoconf is an auxiliary command, it creates a preparation of the configure ( configure.scan
), as autoconf command input. We can add on demand content on this file, manually change the name after the modification becomes configure.ac
files.
autoheader
autoheader
Autoconf is also an auxiliary command to generate a configure template header file config.h.in
.
automake
The main role is to create automake command Makefile
. To Makefile.am
and configure.ac
as an input to Makefile.in
the output. Makefile.in
Configure for generating at execution Makefile
.
libtool
The main role of libtool command is to create and use shared (dynamic link) library portable.
Other related commands
ifnames
Command lists preprocessing program identifier, for example #if
, #ifdef
and the like.
m4
File processing macros.
pkg-config
Query interface has been installed library.
configure the standard file stream
The following command file stream and clear description to configure the entire process from the make.
Reference material
Original: Big Box understanding configure script