autoconf
[Top][All Lists]
Advanced

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

Re: Why does 'AC_MSG_CHECKING' output extra junk.


From: Dr. David Kirkby
Subject: Re: Why does 'AC_MSG_CHECKING' output extra junk.
Date: Fri, 07 Aug 2009 22:09:04 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090218)

Daniel Leidert wrote:
Am Freitag, den 07.08.2009, 12:45 +0100 schrieb Dr. David Kirkby:
If I have this in my configure.ac

AC_MSG_CHECKING([if gcc uses the GNU or Sun linker])

then run the configure script, I see:

checking if gcc uses the GNU or Sun linker... checking for a sed that does not truncate output... /opt/csw/bin/gsed

I've not asked it to check for sed, so why is it putting that in the end?

Because you don't output any result to your own check. AC_MSG_CHECKING
doesn't output a newline at the end. So what you see is the next check.
One would usually use the macros like that:

AC_MSG_CHECKING([for foo])
test ... ; then
        AC_MSG_RESULT([yes])
else
        AC_MSG_RESULT([no])
fi

Regards, Daniel



Thank you Daniel. I'm only sending this to the list, and not replying to you directly, as I doubt you want two copies of the same message.

That answers my query. Now I can easily re-rewrite the test, so it works better.





reply via email to

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