I have seen both in different things I have configured. What I the difference? Is it notable to use only one? Or does it not matter which one to use?
Makefile.am is a programmer-defined file and is used by automake to generate the Makefile.in file (the . am stands for automake). The configure script typically seen in source tarballs will use the Makefile.in to generate a Makefile .
The configure.ac file is used to create the ./configure script. It consists of a series of macros which are processed and expanded by autoconf . These macros can check for packages and libraries, handle --enable and --with switches, and generate various files.
Autotools configurationThis file is used by autoconf to create the configure shell script that users run before building. The file must contain, at the very least, the AC_INIT and AC_OUTPUT M4 macros.
You need to run the command ./configure first. This will configure the makefile. However, it would really be helpful first to read the README file that is in whatever package you are trying to make. They will (or should) have examples on how to install the package.
configure.ac
and configure.in
are two possible names for the master Autoconf source file, which is processed by autoconf
to generate the configure
shell script. configure.ac
is preferred for new packages, configure.in
is an older name which still works. (The .in
suffix is now recommended to be used only for files which will be processed by config.status
, which is the result of running configure
.)
Makefile.am
is an Automake source file. Automake processes it and generates Makefile.in
, which is then further processed by config.status
to generate the final Makefile. An Automake-generated Makefile.in
is not meant to be edited by hand. However, if a project doesn't use Automake (but does use Autoconf), then it will only have a Makefile.in
which is hand-edited.
For further details see http://www.gnu.org/software/autoconf/manual/html_node/Making-configure-Scripts.html - particularly the diagrams.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With