Hi emannuel,

[email protected] wrote:
Hi,

my software uses an extern library which has its version number in it header.h 
like following:
#define LIB_VERSION 424242

I need to check this version number (because the API was changed and this 
introduced an incompatibility).

I think about something like AC_CHECK_DEFINE_VALUE... bug nothing like that 
seems to exist.

Does someone knows how to do that?

I would use a more low-level macro such as AC_COMPILE_IFELSE, e.g., as follows (not tested)

   AC_COMPILE_IFELSE(
     [AC_LANG_PROGRAM([...@%:@include <header.h>],
       [ #if LIB_VERSION >= 424242
         // OK
         #else
         # error version too old
         #endif
       ])
     ],
   [ACTION-IF_OK], ACTION-IF_NOT_OK])

Cheers,
Peter

--
Peter Johansson

svndigest maintainer, http://dev.thep.lu.se/svndigest
yat maintainer,       http://dev.thep.lu.se/yat



_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to