autoconf
[Top][All Lists]
Advanced

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

Re: library version number


From: Philip Herron
Subject: Re: library version number
Date: Wed, 15 Apr 2009 11:29:32 +0100

2009/4/15 Ralf Wildenhues <address@hidden>:
> Hello Philip,
>
> * Philip Herron wrote on Wed, Apr 15, 2009 at 12:33:31AM CEST:
>>
>> Just wondering it would be nice if i could in my configure.ac check for
>> the library version.
>
> You already got answers on how to maybe do that.  Here's one about why
> you shouldn't: Autoconf is all about testing features.  So if you need
> some feature in a library, test for that feature.  If you want to avoid
> some specific bug in one version of the library, just test for presence
> of that very bug.  Distributors might have fixed the bug without
> adjusting the version the way your configure script expects.
>
> Cheers,
> Ralf
>

Hey

Thanks for all that i decided to do this:

# Checks for libraries.
AC_CHECK_LIB([xml2],[xmlTextReaderGetAttribute])
if test "$xml2" = "no"
then
        AC_MSG_ERROR(["libxml2 is needed to be installed for ovf xml
reading.. Debian: apt-get intstall libxml2-dev, or SUSE:yast -i
libxml2-devel"])
else
        CFLAGS="$CFLAGS -I/usr/include/libxml2"
fi

It seems to work ok i dont think i am doing it properly because the
libxml2 headers are like:

/usr/include/libxml2/libxml/*.h

So i thought i could just force that include, but its probably not
right. I think testing for that function probably works better.

-Phil




reply via email to

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