From: Akim Demaille Date: Fri, 9 Jun 2000 13:48:33 +0000 (+0000) Subject: * acgeneral.m4 (AC_CHECK_TOOL): Even if VALUE-IF-NOT-FOUND is not X-Git-Tag: autoconf-2.50~814 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b3c994a374c254e271648efb0aeb66689062d3d;p=thirdparty%2Fautoconf.git * acgeneral.m4 (AC_CHECK_TOOL): Even if VALUE-IF-NOT-FOUND is not specified, we should still check whether PROG-TO-CHECK-FOR actually works before returning it when the prefixed program is not found. Also, fixed a bug where it failed to pass the PATH argument in the second call to AC_CHECK_PROG. --- diff --git a/ChangeLog b/ChangeLog index c2fa3b769..ece03f758 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-06-09 Steven G. Johnson + + * acgeneral.m4 (AC_CHECK_TOOL): Even if VALUE-IF-NOT-FOUND is not + specified, we should still check whether PROG-TO-CHECK-FOR + actually works before returning it when the prefixed program is + not found. Also, fixed a bug where it failed to pass the PATH + argument in the second call to AC_CHECK_PROG. + 2000-06-09 Akim Demaille * acgeneral.m4 (AC_CHECK_TOOLS): Rewrite. diff --git a/acgeneral.m4 b/acgeneral.m4 index 41b7b0f74..167c67e3a 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -2614,16 +2614,14 @@ fi]) # AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH]) # ------------------------------------------------------------------------ AC_DEFUN([AC_CHECK_TOOL], -[AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2, - ifelse([$3], , [$2], ), $4) -ifval([$3], [ +[AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2, , $4) if test -z "$ac_cv_prog_$1"; then if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG($1, $2, $2, $3) + AC_CHECK_PROG($1, $2, $2, $3, $4) else $1="$3" fi -fi]) +fi ]) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 41b7b0f74..167c67e3a 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2614,16 +2614,14 @@ fi]) # AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH]) # ------------------------------------------------------------------------ AC_DEFUN([AC_CHECK_TOOL], -[AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2, - ifelse([$3], , [$2], ), $4) -ifval([$3], [ +[AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2, , $4) if test -z "$ac_cv_prog_$1"; then if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG($1, $2, $2, $3) + AC_CHECK_PROG($1, $2, $2, $3, $4) else $1="$3" fi -fi]) +fi ])