From: Akim Demaille Date: Thu, 7 Feb 2002 12:07:20 +0000 (+0000) Subject: Fix Autoconf PR/207: X-Git-Tag: AUTOCONF-2.52h~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=704a0d0ce2e825df0043aba360af9c73252afd66;p=thirdparty%2Fautoconf.git Fix Autoconf PR/207: AC_PREFIX_PROGRAM fails with dashed program names * lib/autoconf/general.m4 (AC_PREFIX_PROGRAM): Just use a fresh variable when looking for the prefix program. Now it also works for shell variables. --- diff --git a/ChangeLog b/ChangeLog index 550e62815..09ddf43ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-02-07 Akim Demaille + + Fix Autoconf PR/207: + AC_PREFIX_PROGRAM fails with dashed program names + + * lib/autoconf/general.m4 (AC_PREFIX_PROGRAM): Just use a fresh + variable when looking for the prefix program. + Now it also works for shell variables. + 2002-02-07 Akim Demaille * doc/autoconf.texi (Limitations of Builtins): More about diff --git a/NEWS b/NEWS index ddf8d37e2..ff3987aa0 100644 --- a/NEWS +++ b/NEWS @@ -93,6 +93,9 @@ - AC_CONFIG_COMMANDS, HEADERS, FILES, LINKS and AC_OUTPUT. Are much less expensive when using long lists of files. +- AC_PREFIX_PROGRAM + Works with shell variables, and non alphanumeric names. + ** Library macros - AC_FUNC_STRERROR_R now sets STRERROR_R_CHAR_P, not HAVE_WORKING_STRERROR_R, diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 233d201ea..49327a7b4 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -489,18 +489,15 @@ AC_DEFUN([AC_PREFIX_DEFAULT], # and it might use a cached value for the path. # No big loss, I think, since most configures don't use this macro anyway. AC_DEFUN([AC_PREFIX_PROGRAM], -[dnl Get an upper case version of $[1]. -m4_pushdef([AC_Prog], m4_toupper([$1]))dnl -if test "x$prefix" = xNONE; then +[if test "x$prefix" = xNONE; then dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle. - _AS_ECHO_N([checking for prefix by]) - AC_PATH_PROG(AC_Prog, [$1]) - if test -n "$ac_cv_path_[]AC_Prog"; then - prefix=`AS_DIRNAME(["$ac_cv_path_[]AC_Prog"])` + _AS_ECHO_N([checking for prefix by ]) + AC_PATH_PROG(ac_prefix_program, [$1]) + if test -n $ac_prefix_program; then + prefix=`AS_DIRNAME(["$ac_prefix_program"])` prefix=`AS_DIRNAME(["$prefix"])` fi fi -m4_popdef([AC_Prog])dnl ])# AC_PREFIX_PROGRAM