[Top][All Lists]

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

Re: Checking versions and defining macros

From: Jason Curl
Subject: Re: Checking versions and defining macros
Date: Tue, 11 Mar 2008 22:13:24 +0100
User-agent: Thunderbird (Windows/20080213)

Ralf Wildenhues wrote:
Hello Jason,

let's please limit replies to the autoconf list, thanks.
Sorry, I wanted to check for various solutions for all the packages, not just autoconf.
* Jason Curl wrote on Wed, Mar 05, 2008 at 06:47:04AM CET:
To achieve my goals, I've borrowed some of the internals of the auto* tools (and libtool). I'd like to somehow check the version of the autotools during "autoreconf" time and include macros specific to a particular version. If I see a version that I haven't tested with, then I'd like to print a warning that something needs to be looked at (i.e. update my macros). This will allow me especially to upgrade to libtool-2.2 and play with it, while knowing it will always work with 1.5.24.

A summary of what I've had to hack:
AC_CHECK_LIB: borrowed from here for the Solaris networking features
AC_CHECK_DECL: Disable printing, to encapsulate in my own scripts
AC_PROG_LD: Would die if it couldn't find LD, rather than allow my to provide an alternate

Not sure what your question is.  Autoconf minimum version can be
required with AC_PREREQ, its exact version is
m4_defn([m4_PACKAGE_VERSION]).  Automake minimum version can be required
with AM_INIT_AUTOMAKE.  Libtool minimum version can be required with
LT_PREREQ (starting from 2.2).  To rule out earlier versions, you can
see whether LT_PREREQ is defined: m4_ifdef([LT_PREREQ], [...]).
If I have autoconf 2.59, I would like to use macro A. But if I have autoconf 2.61, then I'd like to use macro B instead. Ideally, they would be the same name, but might have slightly different definitions, especially if I start to use the internals.

I would do this, because I've had to modify and borrow implementations from libtool 1.5.24. As autotools don't guarantee internal APIs as being stable, I would warn when autotools are too new, or use a different implementation.

There are two development environments I use. One is older than the other and when I start using internal APIs, they may become incompatible, unless I can include macro A for version A of autotools and macro B for version B of autotools.

I hope I make more sense this time.


reply via email to

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