Die GNU autotools

Die GNU autotools

Shachar Shemesh shachar at shemesh.biz
Mon Jan 10 15:51:10 IST 2011


On 10/01/11 15:09, Nadav Har'El wrote:

> Things like Cmake
> and Adon-Banai can hardly be considered replacements to Autoconf - perhaps
> they are better "make", perhaps they are "imake done again", but not
> "better than autoconf".
>    
I tried, twice, in the past to poke people who were recommending CMake 
on these points. To date, I have not managed to receive any satisfactory 
answers.

The way I see it, from the somewhat limited research I've done:

autoconf: More or less like Nadav put it. A vital tool (with it's should 
be mandatory friend, autoheader, of course) for cross-platform posix 
code. Need to use O_NOFOLLOW, but only some platforms have it? Write a 
tiny test, define O_NOFOLLOW to zero if the test fails, and you're done. 
No need to check anything in the source code. No #ifdefs. Also, many 
people who do not like autoconf have simply never heard of autoscan.

Automake: I actually use it, and quite like it. It gives a strange but 
useful balance between the straitjacket that is any makefile generator 
and does leave some space for actual customization, if you care enough 
to learn the idiosyncrasies. I do not use it for all my projects, and 
even when I do use it, I do not always use it for ALL of the project 
(check out fakeroot-ng for a project that uses automake for some, but 
not all, of the build process), but where I do use it, I find it does a 
decent job of it. The main advantage, as far as I'm concerned, is that 
all it requires from the destination platform is a functioning bourne shell.

m4/aclocal - I use it as part of the autoconf generation, but have never 
bothered to learn it properly.

libtool - there's a loaded subject. Yes, I usually use it, but no, I 
don't think it's a great tool. It has horrible bugs where 
cross-compiling is concerned (by which point it's not your project that 
has those bugs, which makes it all the more difficult to solve). It does 
take some headache away from you, and so I do use it occasionally, but I 
am not a great fan. If there was an easy way to generate shared 
libraries with automake without libtool, I would.

Then again, about the competition:
CMake - as far as I could dig up, it is even more restrictive than 
automake, require CMake itself to be ported and installed on the 
compiling platform, and its greatest touted advantage, that it is much 
simpler to learn than auto*, is irrelevant to me as I already know auto*.

In general, I feel much more at home with systems that boil down to a 
makefile of one sort of another. So, automake, kbuild, and even the 
horrific thing the Android system uses are better, in my eyes, than 
something that seeks to reinvent the core build system. Then again, 
there are one or two things I wish gmake could do (such as path 
adjusting includes), which would cause me to say I don't need even 
those, and make do with just autoconf.

Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com




More information about the Linux-il mailing list