autoconf
[Top][All Lists]
Advanced

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

Re: Library version thru autoconf ?


From: Warren Young
Subject: Re: Library version thru autoconf ?
Date: Fri, 13 Feb 2009 11:09:29 -0700
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Sébastien Le Roux wrote:

I wonder if there is a way (a macro ?) to obtain the version of a library.

Maybe, but the Autoconf Way is to test for features, not versions.

Take the simple case, only two supported versions of a library, old and new. You write a single autoconf test that tries to link a program containing a routine only available in the new library. AC_TRY_LINK If the new library differs only in the interface to the same set of functions, you'd have to use AC_TRY_COMPILE instead, with an attempt to call the newer interface.

You probably need at least two tests, in actual use. The second one is in case the first fails, to check that the old version exists, to differentiate that case from the one where neither version is present.




reply via email to

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