Re: Tru64/OSF: BIN_SH revisited

2006-03-16 Thread Paul Eggert
Ralf Wildenhues <[EMAIL PROTECTED]> writes:

> 0a) Revert the change to set BIN_SH in Autoconf, in order to be
> consistent.
>
> 0b) Additionally, prepend /usr/bin/posix/ to the path walk of
> _AS_DETECT_BETTER_SHELL, to choose the right shell right away, inside
> Autoconf.

This sounds good to me.

> The first patch below does (0b), the second (3).  I'm tending toward
> (0b), unsure whether to add (0a) for good measure.  What do you think?

(0b) is good.  I see your point about (0a) but let's go ahead and
try it, for Autoconf.  Thanks.




Re: Tru64/OSF: BIN_SH revisited

2006-03-17 Thread Stepan Kasal
Hello,

> 0a) Revert the change to set BIN_SH in Autoconf, [...]

IMHO this is a very good idea.

First, BIN_SH is set in macro AS_BOURNE_COMPATIBLE, but it doesn't belong
there: this macro contains things like "set -o posix", which
 i) have an immediate effect inside the current instance
 ii) are not inhereted in subsequent calls to the shell

(Because of (ii), AS_BOURNE_COMPATIBLE is called from _AS_RUN.)

Second, if this change

> 0b) Additionally, prepend /usr/bin/posix/ to the path walk of
> _AS_DETECT_BETTER_SHELL, [...]

make things work on OSF, then the BIN_SH assignment becomes redundant
cruft, right?

We shall remove it now, before is is conserved by a release.

(If the problem re-appears when 2.60 will be widely used, we can then
add BIN_SH to the right place (the "detect better shell" stuff), and
with a comment explaining the situation where it was necessary.)

Does this sound convincing?

Moreover, I think that the line
DUALCASE=1; export DUALCASE
doesn't belong to AS_BOURNE_COMPATIBLE either, the reason is the same
as above; I think it shall go to AS_SHELL_SANITIZE.

These two changes would make the following patch; OK to commit?

Have a nice day,
Stepan
2006-03-17  Stepan Kasal  <[EMAIL PROTECTED]>

* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Removed BIN_SH=xpg4,
  moved DUALCASE=1 ...
(AS_SHELL_SANITIZE): ... here.

Index: lib/m4sugar/m4sh.m4
===
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.162
diff -u -r1.162 m4sh.m4
--- lib/m4sugar/m4sh.m4 16 Mar 2006 13:33:18 -  1.162
+++ lib/m4sugar/m4sh.m4 17 Mar 2006 15:20:12 -
@@ -172,8 +172,6 @@
 else
   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
 ])
 
 
@@ -320,6 +318,7 @@
 ## - ##
 
 AS_BOURNE_COMPATIBLE
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # PATH needs CR
 _AS_CR_PREPARE


Re: Tru64/OSF: BIN_SH revisited

2006-03-17 Thread Ralf Wildenhues
Hi Paul, Stepan,

* Paul Eggert wrote on Fri, Mar 17, 2006 at 08:55:14AM CET:
> Ralf Wildenhues <[EMAIL PROTECTED]> writes:
> 
> > 0a) Revert the change to set BIN_SH in Autoconf, in order to be
> > consistent.
> >
> > 0b) Additionally, prepend /usr/bin/posix/ to the path walk of
> > _AS_DETECT_BETTER_SHELL, to choose the right shell right away, inside
> > Autoconf.
> 
> This sounds good to me.
> 
> > The first patch below does (0b), the second (3).  I'm tending toward
> > (0b), unsure whether to add (0a) for good measure.  What do you think?
> 
> (0b) is good.  I see your point about (0a) but let's go ahead and
> try it, for Autoconf.  Thanks.

OK.  I've applied (0b) only for now, and dropped the Libtool patch.
Thanks for the review!


* Stepan Kasal wrote on Fri, Mar 17, 2006 at 04:27:09PM CET:
> 
> Second, if this change
> 
> > 0b) Additionally, prepend /usr/bin/posix/ to the path walk of
> > _AS_DETECT_BETTER_SHELL, [...]
> 
> make things work on OSF, then the BIN_SH assignment becomes redundant
> cruft, right?

That depends on whether anything below (spawned by) configure ever calls
`sh' unadorned.

> We shall remove it now, before is is conserved by a release.

Without deciding over this change: iff you apply it, please also adjust
autoconf.texi which currently states that BIN_SH is set.

> Moreover, I think that the line
>   DUALCASE=1; export DUALCASE
> doesn't belong to AS_BOURNE_COMPATIBLE either, the reason is the same
> as above; I think it shall go to AS_SHELL_SANITIZE.

FWIW, I'm don't know about this one either.

Cheers,
Ralf




Re: Tru64/OSF: BIN_SH revisited

2006-03-17 Thread Stepan Kasal
Hello,

On Fri, Mar 17, 2006 at 06:10:10PM +0100, Ralf Wildenhues wrote:
> * Stepan Kasal wrote on Fri, Mar 17, 2006 at 04:27:09PM CET:
> > 
> > Second, if this change
> > 
> > > 0b) Additionally, prepend /usr/bin/posix/ to the path walk of
> > > _AS_DETECT_BETTER_SHELL, [...]
> > 
> > make things work on OSF, then the BIN_SH assignment becomes redundant
> > cruft, right?
> 
> That depends on whether anything below (spawned by) configure ever calls
> `sh' unadorned.

Well, if it does, it should not make any assumptions about it.
Thusly, it should be reasonably safe to remove BIN_SH.

Stepan




Re: Tru64/OSF: BIN_SH revisited

2006-03-17 Thread Stepan Kasal
Hello,

On Fri, Mar 17, 2006 at 11:20:49AM -0800, Paul Eggert wrote:
> Yes, except you need to modify the Autoconf documentation accordingly.

I checked in the version attached to this mail.

Stepan
2006-03-17  Stepan Kasal  <[EMAIL PROTECTED]>

* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Removed BIN_SH=xpg4,
  moved DUALCASE=1 ...
(AS_SHELL_SANITIZE): ... here.
* doc/autoconf.texi (Special Shell Variables) : Do not say
  that it is set.

Index: lib/m4sugar/m4sh.m4
===
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.162
diff -u -r1.162 m4sh.m4
--- lib/m4sugar/m4sh.m4 16 Mar 2006 13:33:18 -  1.162
+++ lib/m4sugar/m4sh.m4 17 Mar 2006 15:20:12 -
@@ -172,8 +172,6 @@
 else
   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
 ])
 
 
@@ -320,6 +318,7 @@
 ## - ##
 
 AS_BOURNE_COMPATIBLE
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # PATH needs CR
 _AS_CR_PREPARE
Index: doc//autoconf.texi
===
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.967
diff -u -r1.967 autoconf.texi
--- doc/autoconf.texi   17 Mar 2006 03:59:05 -  1.967
+++ doc/autoconf.texi   17 Mar 2006 17:19:17 -
@@ -11091,7 +11091,6 @@
 @evindex BIN_SH
 In Tru64, if @env{BIN_SH} is set to @code{xpg4}, subsidiary invocations of
 the standard shell conform to Posix.
-Autoconf-generated scripts export this variable when they start up.
 
 @item CDPATH
 @evindex CDPATH


Re: Tru64/OSF: BIN_SH revisited

2006-03-20 Thread Paul Eggert
Stepan Kasal <[EMAIL PROTECTED]> writes:

> These two changes would make the following patch; OK to commit?

Yes, except you need to modify the Autoconf documentation accordingly.