autoconf
[Top][All Lists]
Advanced

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

Re: Bug: explicitly setting CC made defunct


From: Morten Eriksen
Subject: Re: Bug: explicitly setting CC made defunct
Date: 17 Oct 2000 18:02:50 +0200
User-agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.3

Akim Demaille <address@hidden> writes:

> >>>>> "Morten" == Morten Eriksen <address@hidden> writes:
> 
> Morten> Hi, a bug has been introduced by one of the commits from the
> Morten> last day or so. Upon this configure.in file
> 
> Morten>   AC_INIT(configure.in) AC_PROG_CC
> 
> Thanks, I'm sure I'm responsible for this.  Most certainly my recent
> changes involving AC_CHECK_TOOLS.  I'm on it.

Ok, here's the fix:

Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.578
diff -u -r1.578 acgeneral.m4
--- acgeneral.m4        2000/10/17 12:48:51     1.578
+++ acgeneral.m4        2000/10/17 15:49:47
@@ -3197,6 +3197,7 @@
   AC_CHECK_PROG([$1], [${ac_tool_prefix}$2], [${ac_tool_prefix}$2], , [$4])
 fi
 if test -z "$ac_cv_prog_$1"; then
+  ac_ct_$1=$$1
   AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4])
   $1="$ac_ct_$1"
 fi
@@ -3220,7 +3221,9 @@
   done
 fi
 if test -z "$$1"; then
-  AC_CHECK_PROGS([$1], [$2], [$3], [$4])
+  ac_ct_$1=$$1
+  AC_CHECK_PROGS([ac_ct_$1], [$2], [$3], [$4])
+  $1="ac_ct_$1"
 fi
 ])# AC_CHECK_TOOLS
 

The bug was actually old, but was never uncovered due to the fact that
the AC_CHECK_PROG within the first if-block was always executed, even
if $ac_tool_prefix was blank. This was correctly fixed by you in your
patch, but you overlooked the bug which then got uncovered.  :^/

Note that the patch also contains the same fix for AC_CHECK_TOOLS
aswell.

Here's the changelog entry:

2000-10-17  Morten Eriksen <address@hidden>

        * acgeneral.m4 (AC_CHECK_TOOL[S]?): As AC_CHECK_PROG[S]? first
        tests the value of the VARIABLE argument when looking for
        executables in the PATH, we need to set it to the correct
        value from AC_CHECK_TOOL[S]? when not just passing on the
        incoming VARIABLE directly.

(What happened with the CC=foobar case was that AC_CHECK_TOOL(CC, gcc)
called AC_CHECK_PROG(ac_ct_CC, gcc). But ac_ct_CC didn't contain the
value of CC, of course.)

Regards,
Morten



reply via email to

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