[Top][All Lists]

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

Re: PKG_CHECK_MODULES not working in Solaris

From: Eric Blake
Subject: Re: PKG_CHECK_MODULES not working in Solaris
Date: Wed, 20 Jul 2011 08:12:02 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11

On 07/20/2011 02:39 AM, Kaushik BV wrote:
But somehow it fails in `Solaris` with the following error

     checking if libxml2 is present... ./configure: line 11586: syntax error
near unexpected token `LIBXML2,'
     ./configure: line 11586: `PKG_CHECK_MODULES(LIBXML2, libxml-2.0>=

That means that your aclocal.m4 (either hand-written, or as generated by 'aclocal' from automake) file did not include enough instructions to have a definition of the macro PKG_CHECK_MODULES. Is your project using automake? If so, it means that you were probably relying on automake's search path of installed public .m4 files on one machine where the pkg-config package had been installed, but on your Solaris machine, automake is not set up to find that external macro by default.

Relying on external .m4 macros when rerunning aclocal (or autoreconf) is always dangerous - it means you are dependent on what else is already installed on your machine. Better is to copy the pkg-config .m4 file that defined PKG_CHECK_MODULES into your project, so that the macro is available for all people who autoreconf your package, even in cases like your Solaris setup where pkg-config has not already been installed in such a way that its public .m4 files are visible to automake.

Googled for a solution, most of them complain of `pkg-config` not being
installed. But in my test machine its actually installed, checked it by
executing the following command.

     bash-3.00# pkg-config libxml-2.0 --modversion

That says that the pkg-config binary is installed, but doesn't say whether the public .m4 files provided by the pkg-config package are located somewhere that automake will find them by default.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library

reply via email to

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