Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any difference between configure.ac and configure.in, and Makefile.am and Makefile.in?

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?

like image 908
Mohit Deshpande Avatar asked Sep 23 '10 22:09

Mohit Deshpande


People also ask

What is the difference between Makefile am and Makefile in?

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 .

What is configure AC file?

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.

What is Autotools configure?

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.

How do I set up a Makefile?

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.


1 Answers

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.

like image 177
zwol Avatar answered Sep 19 '22 22:09

zwol