bug-autoconf
[Top][All Lists]
Advanced

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

Re: Single test failure for autoconf-2.53 on Sun Solaris 2.8


From: Paul Eggert
Subject: Re: Single test failure for autoconf-2.53 on Sun Solaris 2.8
Date: Wed, 27 Mar 2002 12:40:09 -0800 (PST)

> From: "Nelson H. F. Beebe" <address@hidden>
> Date: Tue, 26 Mar 2002 07:58:24 -0700 (MST)

> There is a single test failure for autoconf-2.53 on Sun Solaris 2.8....
>        17: m4sh.at:155       FAILED near `m4sh.at:201'...
> ...
> PATH: /usr/ucb
> PATH: /usr/sbin
> PATH: /usr/bin
> ...

Wow, you put /usr/ucb before /usr/bin in your PATH?  Brave man.

That test fails because /usr/ucb/basename doesn't conform to POSIX on
Solaris 8 (or Solaris 9 beta for that matter).  I installed the
following patch.

2002-03-27  Paul Eggert  <address@hidden>

        * lib/m4sugar/m4sh.m4 (_AS_BASENAME_PREPARE): New macro.
        (AS_SHELL_SANITIZE): Invoke it.
        (AS_BASENAME): AS_REQUIRE it, and use $as_basename.

Index: m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.78
retrieving revision 1.79
diff -p -u -r1.78 -r1.79
--- m4sh.m4     26 Mar 2002 09:19:51 -0000      1.78
+++ m4sh.m4     27 Mar 2002 20:33:03 -0000      1.79
@@ -162,6 +162,7 @@ m4_foreach([_AS_var],
 ])
 
 # Name of the executable.
+_AS_BASENAME_PREPARE
 as_me=`AS_BASENAME("$[0]")`
 
 # PATH needs CR, and LINENO needs CR and PATH.
@@ -431,7 +432,8 @@ m4_defun([AS_BASENAME_SED],
          s/.*/./; q']])
 
 m4_defun([AS_BASENAME],
-[(basename $1) 2>/dev/null ||
+[AS_REQUIRE([_$0_PREPARE])dnl
+$as_basename $1 ||
 AS_BASENAME_EXPR([$1]) 2>/dev/null ||
 AS_BASENAME_SED([$1])])
 
@@ -444,6 +446,17 @@ m4_defun([AS_EXECUTABLE_P],
 $as_executable_p $1[]dnl
 ])# AS_EXECUTABLE_P
 
+
+# _AS_BASENAME_PREPARE
+# --------------------
+# Avoid Solaris 9 /usr/ucb/basename, as `basename /' outputs an empty line.
+m4_defun([_AS_BASENAME_PREPARE],
+[if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+])# _AS_BASENAME_PREPARE
 
 # _AS_EXPR_PREPARE
 # ----------------



reply via email to

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