[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best practices to detect autoconf version in macro.

From: Ralf Corsepius
Subject: Re: Best practices to detect autoconf version in macro.
Date: Tue, 30 Mar 2010 18:02:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100301 Fedora/3.0.3-1.fc12 Thunderbird/3.0.3

On 03/30/2010 04:41 PM, Eric Blake wrote:
On 03/30/2010 03:13 AM, Konstantin Andreev wrote:

I need to write a macro, which will be expanded by various versions of
autoconf, including 2.13  :(

Simultaneously targeting 2.59 and newer is moderately easy, and still
supported by this list.  Supporting 2.50 and newer is a bit tougher, but
not intractable.

But simultaneously supporting 2.13 and 2.50+ is MUCH
harder, with very few people even attempting it (my gut feel is that it
is technically still doable, although I won't be the one doing it).
Testing is the problem.

Trying to say 2.13 compatible is likely doable for trivial configure scripts, but it easily becomes tedious for complex ones and .., close to impossible to test.

If m4_version_compare is defined (added in 2.53, documented in 2.62),
then use it.  Otherwise, you know that you are targeting an older autoconf.

Read this thread for another person who attempted this feat for PHP, and
later gave up, because the changes from 2.13 to 2.50 were so dramatic.
I could tell similar stories.

From my experience, it's way easier to "do the plunge once", i.e. to once convert all 2.13 anacronisms and bugward-compatibilities (which typically means exploits of autoconf-2.13 internal) to autoconf-2.50+.

At some point, very likely will want to take advantage of some autoconf-2.50+ features or finds that certain autoconf versions > 2.50 provides a feature "one has always missed" in older autoconfs.

The lesson at least I've learnt, is not wanting to look back to 2.13.

BTW: Even more dramatic, similar considerations apply to automake.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]