automake
[Top][All Lists]
Advanced

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

Re: PKG_CHECK_MODULES on system without pkg-config installed?


From: Jef Driesen
Subject: Re: PKG_CHECK_MODULES on system without pkg-config installed?
Date: Mon, 7 Mar 2011 00:03:47 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

On 06/03/11 14:23, Vincent Torri wrote:
On Sun, Mar 6, 2011 at 2:08 PM, Jef Driesen<address@hidden>  wrote:

On 05/03/11 23:16, Vincent Torri wrote:

On Sat, Mar 5, 2011 at 9:06 AM, Jef Driesen<address@hidden>
  wrote:

I'm trying to use the PKG_CHECK_MODULES macro to check for an external
library:

PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], [have_libusb=yes],
[have_libusb=no])

This works great, except when trying to compile on a system without
pkg-config installed. The configure script fails with a syntax error. I
tried to wrap the PKG_CHECK_MODULES check in an AC_ARG_ENABLE enable
block,
in an attempt to enable to skip this check. But this makes no difference.

Is there another way to make this work?


before any  PKG_CHECK_MODULES, call PKG_PROG_PKG_CONFIG to check if
pkg-config is available


I tried that, and it makes no difference.


is pkg.m4 in /usr/share/aclocal ?

No. I suppose that file is only present if pkg-config is installed?

I'm trying to build on Mac OS X in case that would matter.



reply via email to

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