Why no AC_MSG_RESULT in pkg.m4:PKG_CHECK_MODULES when package not found?

Peter Kjellerstedt peter.kjellerstedt at axis.com
Wed Jun 7 06:25:50 PDT 2006


> -----Original Message-----
> From: Tollef Fog Heen [mailto:tfheen at err.no] 
> Sent: Wednesday, June 07, 2006 14:04
> To: Peter Kjellerstedt
> Cc: pkg-config at lists.freedesktop.org
> Subject: Re: Why no AC_MSG_RESULT in pkg.m4:PKG_CHECK_MODULES 
> when package not found?
> 
> Peter Kjellerstedt skrev:
> 
> > Somehow I feel that there is something I am missing here,
> > but otherwise I have attached a patch to add AC_MSG_RESULT
> > macro calls as appropriate.
> 
> I see what you mean, but your patch is wrong, it should only call 
> AC_MSG_RESULT if $4 is set, else it'll do the AC_MSG_ERROR 
> and complain that way.  (In addition, in this case, it'd be more 

Actually, according to the documentation of AC_MSG_CHECKING, it 
must be followed by a call to AC_MSG_RESULT.  And I think this is
the right thing to do whether AC_MSG_ERROR is called or not.  The
reason is that otherwise the error message and the prefix generated
by AC_MSG_ERROR will appear on the same line as what AC_MSG_CHECKING
printed.

> useful to use PKG_CHECK_EXISTS rather than PKG_CHECK_MODULES.)

Using PKG_CHECK_EXISTS here does not work since the check is
for an explicit version (i.e., 2.2.0 or above).

> I have a bunch of patches I should commit and get 0.21 
> released soon, I think.
> 
> - tfheen

//Peter


More information about the pkg-config mailing list