[Top][All Lists]

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

Re: nesting of AC_CHECK_PROG ?

From: Stepan Kasal
Subject: Re: nesting of AC_CHECK_PROG ?
Date: Thu, 21 Oct 2004 08:39:50 +0200
User-agent: Mutt/1.4.1i


On Wed, Oct 20, 2004 at 01:15:12PM -0400, Yasunari Tosa wrote:
> I wish that there is a corresponding version for AC_CHECK_PROG_EX or
> something.
> AC_ should have consistent interface to user :-(.....

I was thinking about that too.  It's not that easy:

AC_CHECK_PROG has to know the variable name: if the variably is already
set, perhaps by the user running configure, the test is skipped.
configure supposes that the variable points to the tool.
(That's why the variable has to be declared as precious.)

Thus this macro cannot be easily converted to the for with shell code

OTOH, AC_CHECK_LIB, with the ``action'' parameters, is very flexible and
it wouldn't be wise to convert it to the ``variable'' form.

Thusly, we cannot make these two consistent.

On Wed, Oct 20, 2004 at 05:04:06PM -0400, Yasunari Tosa wrote:
> I did exactly the same thing you wrote as the only usable solution.

_Exactly_ the same?  Including the double [[ and ]] ?
And the fact that the parameter AC_MSG_ERROR is not enclosed in double
quotes but in [[ and ]] ?
(The reason for these subtle changes is the m4 processing; the explanation
is in the autoconf manual.  If any question remain, I'll try to answer them.)

> Stepan Kasal wrote:
> > AC_ARG_VAR([[TIXWISH]], [[The tixwish program.]])
> > AC_CHECK_PROG([[TIXWISH]], [[tixwish]], [[tixwish]])
> > if test "x$TIXWISH" = x; then
> >     AC_CHECK_PROG([[TIXWISH]], [[tixwish8.1.8.3]], [[tixwish8.1.8.3]])
> >     if test "x$TIXWISH" = x; then
> >             AC_MSG_ERROR([[tixwish cannot be found]])
> >     fi
> > fi
> > 

        Stepan Kasal

reply via email to

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