bug-automake
[Top][All Lists]
Advanced

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

Re: AM_PATH_PYTHON bug


From: Stepan Kasal
Subject: Re: AM_PATH_PYTHON bug
Date: Fri, 5 Nov 2004 10:39:13 +0100
User-agent: Mutt/1.4.1i

Hello Alexandre,

On Thu, Nov 04, 2004 at 11:03:38PM +0100, Alexandre Duret-Lutz wrote:
>  Stepan> I looked at aclocal-1.9/m4/python.m4 and saw a bug.  
> 
> I believe you are confusing AC_PATH_PROGS with AC_PATH_PROG.
> Otherwise please do explain what the bug is.

We both know that AC_PATH_PROG does nothing if the var is already set.
But AC_PATH_PROGS is the same in this respect, if the var was already
set, do nothing.  Let me cite the code:

# AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
#                [PATH])
# ------------------------------------------------------------------
AC_DEFUN([AC_CHECK_PROGS],
[for ac_prog in $2
do
  AC_CHECK_PROG([$1], [$ac_prog], [$ac_prog], , [$4])
  test -n "$$1" && break
done
m4_ifvaln([$3], [test -n "$$1" || $1="$3"])])

I did a quick check and it seems this behaviour hasn't changed for more
then 3 years, since the beginning of savannah CVS.

What _is_ confusing, is the autoconf info node describing these macros.
It says:

 - Macro: AC_CHECK_PROGS [...] if VALUE-IF-NOT-FOUND is not specified,
        the value of VARIABLE is not changed.

Well, it should say "the VARIABLE is left empty."

I submitted a documentation patch a week ago, see
http://lists.gnu.org/archive/html/autoconf-patches/2004-10/msg00019.html
which refers to
http://lists.gnu.org/archive/html/bug-autoconf/2004-10/msg00030.html

I have asked Paul for clarification earlier this morning, I guess my
post could appear as
http://lists.gnu.org/archive/html/bug-autoconf/2004-11/msg00005.html

> Cannot be OK since `:' is tested for later on.

You are right, of course, that patch was incomplete; I'm attaching an
improved version to this mail.
It's not as big as it looks; most if it is the cosmetic indentation fix.

I'm also attaching a ``diff -ub'' to show the real differences.

With kind regards,
        Stepan

Attachment: automake-20041105-python.patch
Description: Text document

Attachment: automake-20041105-pyth.diff-ub
Description: Text document


reply via email to

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