automake, autoconf compiling

Giorgos Keramidas keramida at
Fri Jan 14 01:49:06 PST 2005

On 2005-01-13 20:13, Tom Huppi <thuppi at> wrote:
>On Thu, 13 Jan 2005, Giorgos Keramidas wrote:
>> I use autoconf/automake and libtool daily at work[1].
>> The programs I write have to run on at least 3 different operating
>> systems (FreeBSD, Linux and Solaris) without the need for constant
>> manual tweaking of the source.
> At work (former), I was responsible for code which was to *compile* on
> 6 or 7 different platforms.  I choose one (often my FreeBSD
> workstation) upon which to execute the auto-tools and didn't bother
> with most of the others though I kept a compatible set of these tools
> on Linux and Solaris for convenience.

Very well said.

I'd only like to note that the important thing to note here is:

    'a compatible set of these tools'

> Indeed, the whole paradigm behind these tools is that they should
> _not_ be needed on the target platform.  'autoconf' goes to great
> pains to generate platform independent Bourne shell configure script
> for a very good reason!

The compatibility problems are usually encountered long before the
program reaches 'the target platform'.  The generated Bourne shell
scripts are indeed very platform independent.  The autoconf/automake
stuff used to write them is not though.

> Unfortunately too many people either misunderstand the paradigm and/or
> or mis-use the tools and I suspect that this is a good portion of the
> reason why the FreeBSD ports infrastructure needs to play so many
> silly games with the auto-tools.

No, the reason the Ports go through all the hoops you see is that they
are meant to be used by people who don't care or don't need to know the
internals of the autotools.  They just need a version that 'works good
enough for installing port foo/bar-1.2.3'.

One other reason is, of course, the fact that the autotools have changed
and are constantly changing the 'canonical' way of writing their input
files.  This is both a good and bad thing, depending on the viewpoint.

It is a good thing, because it shows that they are alive, actively
maintained projects.

It is a bad thing, because every time a developer tries to regenerate
the `configure' scripts and all associated files with a mismatched
autotools version, they are forced to either: a) install the exact same
versions the original scripts have been written for, or b)
abandon the idea of using autotools altogether.

I usually go for (a), if I have a choise.  The ports people do not have
that choise, because they need to support programs coming from various
sources, with the minimal amount of changes to the original program

- Giorgos

More information about the freebsd-questions mailing list