autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Shell function reporting


From: Paul Eggert
Subject: Re: [PATCH] Shell function reporting
Date: 06 Jan 2004 12:34:42 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Eric Sunshine <address@hidden> writes:

> In the case when $SHELL does not support functions,
> AS_SHELL_SANITIZE() reports that it could not find an appropriate
> shell even if it actually locates such a shell (which it assigns to
> CONFIG_SHELL).

Hmm, how could it assign to CONFIG_SHELL and then report that it
couldn't find a shell?  The code does this:

           CONFIG_SHELL=$as_dir/$as_base
           export CONFIG_SHELL
           exec "$CONFIG_SHELL" "$as_myself" ${1+"address@hidden"}

so if it assigns to CONFIG_SHELL, it execs $CONFIG_SHELL, which means
it shouldn't report that it can't find a shell.

Under the proposed patch, 'configure' would sometimes ignore
CONFIG_SHELL and substitute its own CONFIG_SHELL.  This doesn't seem
right to me, as the user shouldn't be second-guessed.

> Furthermore, when it actually does fail to find a suitable shell, it
> neglects to complain at all.  The logic is backward.

Yes, this looks like a problem to me too.  How about this patch instead?
(I don't know what the "In the future" comment means, so I removed it.  :-)

2004-01-06  Paul Eggert  <address@hidden>

        * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fixed bogus error
        reporting logic.  Reported by Eric Sunshine.

--- m4sh.m4.~1.111.~    Sun Jan  4 23:31:44 2004
+++ m4sh.m4     Tue Jan  6 12:30:13 2004
@@ -248,7 +248,6 @@ if test ! -f "$as_myself"; then
   AS_ERROR([cannot find myself; rerun with an absolute path])
 fi
 
-dnl In the future, the `else' branch will be that in AS_INIT_WITH_SHELL_FN.
 AS_IF([_AS_SHELL_FN_WORK([$SHELL])], [], [
   case $CONFIG_SHELL in
   '')
@@ -265,9 +264,8 @@ AS_IF([_AS_SHELL_FN_WORK([$SHELL])], [],
           ]);;
         esac
        done]);;
-  *)
-    $1;;
   esac
+  $1
 ])
 
 # Work around bugs in pre-3.0 UWIN ksh.




reply via email to

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