git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Autoconf/Automake

From
JLJerome Lovy <rqe28bj3vfyi4eo@jetable.net>
Date
Jun 16, 2006, 09:06 UTC
Message-ID
<e6tso3$s3s$1@sea.gmane.org>
In-Reply-To
<20060615174833.GA32247@dspnet.fr.eu.org>
Olivier Galibert wrote:
Show 17 quoted lines
> On Thu, Jun 15, 2006 at 10:02:10AM -0700, Linus Torvalds wrote:
> 
>>These days, there aren't fifteen different versions of UNIX. There's a 
>>couple, and it's perfectly ok to actually say "fix your damn system and 
>>just install GNU make". It's easier to install GNU make than it is to 
>>install autoconf/automake.
> 
> 
> You should be careful to separate autoconf and automake.  Autoconf is
> not so bad, and you can make clean, maintainable Makefile.in and
> config.h.in files with it, because it uses simple substitution.  It is
> quite useful to detect available librairies when some are optional,
> and also to lightly[1] ensure that prefix and friends will stay the
> same between make and make install.  Also, especially if you hack a
> little bit to alias 'enable' and 'with', you get a sane interface to
> optional feature selection.  Oh, and to seperate compilation
> directories too (vpath generation).

I fully agree with Olivier. It seems to me that you don't have to buy the whole autoconf/automake/libtool stack to leverage the autoconf functionality. autoconf alone provides the full "autoconfiguration" framework (running scriptlets and setting substitution variables accordingly). You still have to write Makefile.in (with statements looking like: CC=@CC@). Therefore the resulting Makefile is just as beautiful or as ugly as you wrote the initial Makefile.in: you have full control over it.

As for dependencies, one shouldn't confuse what is needed on the autoconfiguration developer's side (in order to build the configure script from the configure.in file) and what is needed on the installer's side to run the configure script and process the generated makefile. The former needs the autoconf package which itself relies on GNU m4. The latter merely needs a decently compatible Bourne shell and a decently compatible make.

On the other hand, what you get with automake is a fully automatically generated makefile, with make targets conforming to the GNU standards. But then you fully loose control over the Makefile: you don't write the Makefile.in anymore (automake does it for you) but rather the terce Makefile.am. In this respect, automake is like imake: you write few lines of (i)makefile, but then you cannot complain if you don't understand what comes in the generated makefile ;-) .

Jérôme Lovy
Previous: Petr BaudisNext: Yakov Lerner
Message 13 of 26 in “Autoconf/Automake”
  1. Pavel RoskinJun 14, 2006
  2. Linus TorvaldsJun 14, 2006
  3. Bertrand JacquinJun 14, 2006
  4. Timo HirvonenJun 14, 2006
  5. Yann DirsonJun 15, 2006
  6. Alex RiesenJun 15, 2006
  7. Yann DirsonJun 15, 2006
  8. Linus TorvaldsJun 15, 2006
  9. Olivier GalibertJun 15, 2006
  10. Jakub NarebskiJun 15, 2006
  11. Olivier GalibertJun 15, 2006
  12. Petr BaudisJun 16, 2006
  13. Jerome LovyJun 16, 2006
  14. Yakov LernerJun 15, 2006
  15. Yann DirsonJun 15, 2006
  16. Linus TorvaldsJun 15, 2006
  17. Johannes SchindelinJun 15, 2006
  18. Nikolai WeibullJun 16, 2006
  19. Phil RichardsJun 15, 2006
  20. Timo HirvonenJun 15, 2006
  21. Johannes SchindelinJun 15, 2006
  22. Yann DirsonJun 15, 2006
  23. Johannes SchindelinJun 15, 2006
  24. Yann DirsonJun 16, 2006
  25. Petr BaudisJun 16, 2006
  26. Petr BaudisJun 16, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.