]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix Autoconf PR/207:
authorAkim Demaille <akim@epita.fr>
Thu, 7 Feb 2002 12:07:20 +0000 (12:07 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 7 Feb 2002 12:07:20 +0000 (12:07 +0000)
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.

ChangeLog
NEWS
lib/autoconf/general.m4

index 550e628155fb468f496c058f308152c9c0718555..09ddf43ca00a3ad0578c03ce262cb2fa29f966a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-02-07  Akim Demaille  <akim@epita.fr>
+
+       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  <akim@epita.fr>
 
        * doc/autoconf.texi (Limitations of Builtins): More about
diff --git a/NEWS b/NEWS
index ddf8d37e24b8267152e96033f64f5fe74bccb2a9..ff3987aa0507341e1e12f5ddbbbb37b8c5b5bae0 100644 (file)
--- 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,
index 233d201ea8a376cd6ebb17cb93a323a7651afbe7..49327a7b47fb1581d5fd3b57ced6c4b769a28bd4 100644 (file)
@@ -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