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 04:28:09 PDT 2006


Hello,

I stumbled upon the pkg.m4 file when I was investigating
some odd looking messages from configure for GStreamer.
The problem was that some messages were "unfinished" and
that the next message came on the same line as the previous
message.  It turned out that the PKG_CHECK_MODULES macro
uses AC_MSG_CHECKING, but no AC_MSG_RESULT in case the check
fails, which leaves the checking message hanging...  

I have very little experience with actual autoconf macros, but
should it not be assumed that if a macro use AC_MSG_CHECKING
it should always use an AC_MSG_RESULT macro as well?

As an example I had to change the following macro call

	PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes,
HAVE_GTK_22=no)

to

	PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, [
	  AC_MSG_RESULT([no])
	  HAVE_GTK_22=no
	])

to get it to look right when GTK+ 2.2 is not installed.
This seems overly complicated to me.

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.

//Peter

PS. Please keep my mail address in the Cc: list when 
responding as I am not on the mailing list.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkg.m4.patch
Type: application/octet-stream
Size: 585 bytes
Desc: pkg.m4.patch
Url : http://lists.freedesktop.org/archives/pkg-config/attachments/20060607/56d2a34a/pkg.m4.obj


More information about the pkg-config mailing list