zsh-workers
 help / color / mirror / code / Atom feed
* Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
       [not found] <200204081534.g38FYlY0058635@epicenter.eas.purdue.edu>
@ 2002-04-09  9:45 ` Akim Demaille
  2002-04-09 10:35   ` Peter Stephenson
  0 siblings, 1 reply; 17+ messages in thread
From: Akim Demaille @ 2002-04-09  9:45 UTC (permalink / raw)
  To: zsh-workers; +Cc: ab, bug-autoconf

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]


Hi!

We (Autoconf) have a big problem with Zsh 3.0.8.  You know it is
shipped on Darwin as /bin/sh.  But this version does not understand
${1+"$@"} properly.  We use this instead of "$@" to work around a bug
which still exists today in many many constructors' /bin/sh, so we
can't departure from it.

But then, I have no choice than systematically rejecting /bin/sh if it
turns out to be zsh 3.  Unless there is some magic that can make
${1+"$@"} work properly?  Thanks!


[-- Attachment #2.1: Type: text/plain, Size: 137 bytes --]

Subject: Topics

Topics:
   Re: [GNU Autoconf 2.53] testsuite.log: 126 failures
   Re: [GNU Autoconf 2.53] testsuite.log: 126 failures 


[-- Attachment #2.2: Type: text/plain, Size: 1459 bytes --]

Date: 08 Apr 2002 10:22:44 +0200
From: Akim Demaille <akim@epita.fr>
To: Allen Braunsdorf <ab@eas.purdue.edu>
Cc: bug-autoconf@gnu.org, ab@purdue.edu
Subject: Re: [GNU Autoconf 2.53] testsuite.log: 126 failures
Message-ID: <mv4lmby38h7.fsf@nostromo.lrde.epita.fr>
References: <34421.1018025952@epicenter.eas.purdue.edu>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="====-=-="

--====-=-=


| [ I've got an attachment, so I had to send this a little differently. -ab ]
| > Oh, I forgot to ask...  Please, not only should you run ./testsuite 3,
| 
| Attached testsuite.log.
| 
| > but also the same as before:
| >
| > | >         cd testsuite.dir/003
| > | >         PATH=../..:$PATH autoconf -d -v -f -t 'TRACE1:
| > | >         Hello world!'
| 
| This gives: 
| 
| |ARG: {--include}
| |ARG: {/Users/ab/Desktop/autoconf-2.53/lib}
| |ARG: {-d}
| |ARG: {-v}
| |ARG: {-f}
| |ARG: {-t}
| |ARG: {TRACE1:}
| |ARG: {Hello}
| |ARG: {world!}

It's already broken at this point!

Grrr.  What the heck is happening with your system :(

Please, try to run this shell-script:


--====-=-=
Content-Type: text/x-sh
Content-Disposition: attachment; filename=args.sh

#! /bin/sh

set dummy 'arg1' 'arg 2' 'arg
3'

echo "1."
for i in "$@"
do
  echo "{$i}"
done

echo "2."
for i in ${1+"$@"}
do
  echo "{$i}"
done

set ${1+"$@"}

echo "3."
for i in "$@"
do
  echo "{$i}"
done

--====-=-=


Just run it with your /bin/sh (which should be zsh).  Thanks!

--====-=-=--

[-- Attachment #2.3: Type: text/plain, Size: 965 bytes --]

Date: Mon, 08 Apr 2002 10:34:47 -0500
From: A Braunsdorf <ab@eas.purdue.edu>
To: Akim Demaille <akim@epita.fr>
cc: Allen Braunsdorf <ab@purdue.edu>, bug-autoconf@gnu.org
Subject: Re: [GNU Autoconf 2.53] testsuite.log: 126 failures 
Message-Id: <200204081534.g38FYlY0058635@epicenter.eas.purdue.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii


In message <mv4lmby38h7.fsf@nostromo.lrde.epita.fr>, Akim Demaille writes:
> 
> It's already broken at this point!
> 
> Grrr.  What the heck is happening with your system :(

This (z)sh is weird, I'm telling you.

> Please, try to run this shell-script:

OK, here's the result from /bin/sh (zsh 3.0.8)

	1.
	{dummy}
	{arg1}
	{arg 2}
	{arg
	3}
	2.
	{dummy}
	{arg1}
	{arg}
	{2}
	{arg}
	{3}
	3.
	{dummy}
	{arg1}
	{arg}
	{2}
	{arg}
	{3}

The newer zsh (4.0.4) and bash both give:

	1.
	{dummy}
	{arg1}
	{arg 2}
	{arg
	3}
	2.
	{dummy}
	{arg1}
	{arg 2}
	{arg
	3}
	3.
	{dummy}
	{arg1}
	{arg 2}
	{arg
	3}

ab



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09  9:45 ` Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures) Akim Demaille
@ 2002-04-09 10:35   ` Peter Stephenson
  2002-04-09 10:51     ` Akim Demaille
  2002-04-09 11:30     ` Peter Stephenson
  0 siblings, 2 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-04-09 10:35 UTC (permalink / raw)
  To: Akim Demaille; +Cc: zsh-workers, ab, bug-autoconf

Akim Demaille wrote:
> Hi!
> 
> We (Autoconf) have a big problem with Zsh 3.0.8.  You know it is
> shipped on Darwin as /bin/sh.  But this version does not understand
> ${1+"$@"} properly.  We use this instead of "$@" to work around a bug
> which still exists today in many many constructors' /bin/sh, so we
> can't departure from it.

I think the problem you are running across is that with the option
SH_WORD_SPLIT set (as it is for sh compatibility), you get this behaviour:

% set 'one two'
% for arg in ${1+"$@"}; do echo $arg; done
one
two

whereas you expect `one two' on the same line.  This problem is still in
zsh 4 --- inside another substitution, either it's splitting all words
on spaces, or it's splitting none.

This sort of mess is why zsh doesn't have SH_WORD_SPLIT on by default,
but that doesn't help you...

If you want to work around this you have two basic choices:

1. Unset shwordsplit:
  [ x$ZSH_VERSION != x ] && unsetopt shwordsplit
This will have a knock on effect on all unquoted shell parameter
substitutions, however.  If you are relying on these producing multiple
command arguments --- e.g. for building up arguments for `for' loops in
a single parameter --- you are stuck unless you can find some way of
turning shwordsplit off and on before using ${1+"$@"}.  (Writers of
configure scripts --- not autoconf itself --- often incorrectly assume
something like `test x$foo != x' will always produce the same number of
words, but that's a separate problem from the one you face.)

2. Rework the substitution.  In zsh, you would get away with
${==1+"$@"}, since the doubled `=' is a flag to turn off SH_WORD_SPLIT
for that substitution.  Obviously, getting this in for zsh and not for
other shells is a bit of a nightmare.  Indeed, rather than do that, it
would presumably be easier to use "$@" for zsh instead of ${1+"$@"}
(this handles zero arguments correctly), which is exactly what you're
trying to avoid.

Neither of these looks very promising.

"${1+"$@"}" also works in zsh, but this confuses other variants of sh
--- it works in bash, but sh on SunOS 5.8 tripped over it.

I haven't looked for any cleverer substitutions which will always work.
Given that ${1+"$@"} is already a despairing workaround, it seems
unlikely there's anything more complicated which will fool everyone at
once.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 10:35   ` Peter Stephenson
@ 2002-04-09 10:51     ` Akim Demaille
  2002-04-09 11:05       ` Peter Stephenson
                         ` (2 more replies)
  2002-04-09 11:30     ` Peter Stephenson
  1 sibling, 3 replies; 17+ messages in thread
From: Akim Demaille @ 2002-04-09 10:51 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers, ab, bug-autoconf


| Akim Demaille wrote:
| > Hi!
| > 
| > We (Autoconf) have a big problem with Zsh 3.0.8.  You know it is
| > shipped on Darwin as /bin/sh.  But this version does not understand
| > ${1+"$@"} properly.  We use this instead of "$@" to work around a bug
| > which still exists today in many many constructors' /bin/sh, so we
| > can't departure from it.
| 
| I think the problem you are running across is that with the option
| SH_WORD_SPLIT set (as it is for sh compatibility), you get this behaviour:
| 
| % set 'one two'
| % for arg in ${1+"$@"}; do echo $arg; done
| one
| two
| 
| whereas you expect `one two' on the same line.  

`you' == akim, or == the sh standard?

| This problem is still in
| zsh 4 --- inside another substitution, either it's splitting all words
| on spaces, or it's splitting none.

I'm sure I understand you here, given that Zsh 4 exhibiting the
behavior I (Akim :) was expecting.

| This sort of mess is why zsh doesn't have SH_WORD_SPLIT on by default,
| but that doesn't help you...

I can understand the logic behind the result here: only "$@" is
expected not to split, but ${1} should, hence ${1+"$@"} splits.  But
then, Zsh (emulate sh) is the only sh I know behaving this way :(

| If you want to work around this you have two basic choices:
| 
| 1. Unset shwordsplit:
|   [ x$ZSH_VERSION != x ] && unsetopt shwordsplit
| This will have a knock on effect on all unquoted shell parameter
| substitutions, however.  If you are relying on these producing multiple
| command arguments --- e.g. for building up arguments for `for' loops in
| a single parameter --- you are stuck unless you can find some way of
| turning shwordsplit off and on before using ${1+"$@"}.  (Writers of
| configure scripts --- not autoconf itself --- often incorrectly assume
| something like `test x$foo != x' will always produce the same number of
| words, but that's a separate problem from the one you face.)

We do want shwordsplit on.  It is heavily used, and we aim at sh, so
there is no choice here.

| 2. Rework the substitution.  In zsh, you would get away with
| ${==1+"$@"}, since the doubled `=' is a flag to turn off SH_WORD_SPLIT
| for that substitution.  Obviously, getting this in for zsh and not for
| other shells is a bit of a nightmare.  Indeed, rather than do that, it
| would presumably be easier to use "$@" for zsh instead of ${1+"$@"}
| (this handles zero arguments correctly), which is exactly what you're
| trying to avoid.
| 
| Neither of these looks very promising.

Nope, indeed.  Too bad.

| "${1+"$@"}" also works in zsh, but this confuses other variants of sh
| --- it works in bash, but sh on SunOS 5.8 tripped over it.

Err, I'm not even sure it does what I want: I suspect that Zsh
understands this as a single argument, while I expect to have $# of
them.  If it does return more than one argument, then I don't
understand what exception sneaked in here.

| I haven't looked for any cleverer substitutions which will always work.
| Given that ${1+"$@"} is already a despairing workaround, it seems
| unlikely there's anything more complicated which will fool everyone at
| once.

Gee :(.

Finally, one question: do you know if Apple plans to continue with Zsh
3?  Why did they stick to it?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 10:51     ` Akim Demaille
@ 2002-04-09 11:05       ` Peter Stephenson
  2002-04-09 11:18       ` Bart Schaefer
  2002-04-09 11:45       ` Oliver Kiddle
  2 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-04-09 11:05 UTC (permalink / raw)
  To: Akim Demaille; +Cc: zsh-workers, ab, bug-autoconf

Akim Demaille wrote:
> | I think the problem you are running across is that with the option
> | SH_WORD_SPLIT set (as it is for sh compatibility), you get this behaviour:
> | 
> | % set 'one two'
> | % for arg in ${1+"$@"}; do echo $arg; done
> | one
> | two
> | 
> | whereas you expect `one two' on the same line.  
> 
> `you' == akim, or == the sh standard?

Both, presumably, although I haven't explicitly followed through the
standard.  (It's kind of irrelevant, since you (akim) are explicitly
trying to work around eccentricities.)

> | This problem is still in
> | zsh 4 --- inside another substitution, either it's splitting all words
> | on spaces, or it's splitting none.
> 
> I'm sure I understand you here, given that Zsh 4 exhibiting the
> behavior I (Akim :) was expecting.

Not for me...

% zsh -f
% setopt shwordsplit
% set 'one word' 'two words'
% for arg in ${1+"$@"}; do echo $arg; done
one
word
two
words
% print $ZSH_VERSION
4.1.0-dev-4

Same in 4.0.  Possibly you tried it without shwordsplit --- remember
it's only set by default if you invoke zsh in sh-compatibility mode.

> Finally, one question: do you know if Apple plans to continue with Zsh
> 3?  Why did they stick to it?

There's a story they're going to switch to bash, but it's difficult to
get information --- we've only ever heard second hand from someone who
knows someone etc. etc...

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 10:51     ` Akim Demaille
  2002-04-09 11:05       ` Peter Stephenson
@ 2002-04-09 11:18       ` Bart Schaefer
  2002-04-09 11:45       ` Oliver Kiddle
  2 siblings, 0 replies; 17+ messages in thread
From: Bart Schaefer @ 2002-04-09 11:18 UTC (permalink / raw)
  To: zsh-workers, Akim Demaille; +Cc: ab, bug-autoconf

On Apr 9, 12:51pm, Akim Demaille wrote:
}
} | "${1+"$@"}" also works in zsh, but this confuses other variants of sh
} | --- it works in bash, but sh on SunOS 5.8 tripped over it.
} 
} Err, I'm not even sure it does what I want: I suspect that Zsh
} understands this as a single argument, while I expect to have $# of
} them.

No, zsh understands "${1+"$@"}" as $# arguments, same as bash v1.  For
that matter, bash1 and zsh[34] agree on "${1+$@}" as well.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 10:35   ` Peter Stephenson
  2002-04-09 10:51     ` Akim Demaille
@ 2002-04-09 11:30     ` Peter Stephenson
  2002-04-09 16:34       ` Bart Schaefer
  1 sibling, 1 reply; 17+ messages in thread
From: Peter Stephenson @ 2002-04-09 11:30 UTC (permalink / raw)
  To: Zsh hackers list

Peter Stephenson wrote:
> I think the problem you are running across is that with the option
> SH_WORD_SPLIT set (as it is for sh compatibility), you get this behaviour:
> 
> % set 'one two'
> % for arg in ${1+"$@"}; do echo $arg; done
> one
> two
> 
> whereas you expect `one two' on the same line.  This problem is still in
> zsh 4 --- inside another substitution, either it's splitting all words
> on spaces, or it's splitting none.

(For zsh-workers only.)

By the way, I'm sure this is horribly incomplete at best --- and
paramsubst() is too grotesque for me to understand it --- but, just so I
understand what is going on, what is the problem with (deliberately
expanded the context):

Index: Src/subst.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/subst.c,v
retrieving revision 1.30
diff --unified=10 -r1.30 subst.c
--- Src/subst.c	22 Feb 2002 17:28:06 -0000	1.30
+++ Src/subst.c	9 Apr 2002 11:27:09 -0000
@@ -1478,20 +1478,22 @@
 		val = dupstring(s);
 		/*
 		 * This is not good enough for sh emulation!  Sh would
 		 * split unquoted substrings, yet not split quoted ones
 		 * (except according to $@ rules); but this leaves the
 		 * unquoted substrings unsplit, and other code below
 		 * for spbreak splits even within the quoted substrings.
 		 */
 		multsub(&val, (aspar ? NULL : &aval), &isarr, NULL);
 		copied = 1;
+		if (spbreak == 1)
+		    spbreak = 0;
 	    }
 	    break;
 	case ':':
 	    if (*s != '=' && *s != Equals)
 		goto noclosebrace;
 	    vunset = 1;
 	    s++;
 	    /* Fall through */
 	case '=':
 	case Equals:

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 10:51     ` Akim Demaille
  2002-04-09 11:05       ` Peter Stephenson
  2002-04-09 11:18       ` Bart Schaefer
@ 2002-04-09 11:45       ` Oliver Kiddle
  2002-04-09 11:59         ` Peter Stephenson
  2 siblings, 1 reply; 17+ messages in thread
From: Oliver Kiddle @ 2002-04-09 11:45 UTC (permalink / raw)
  To: Akim Demaille; +Cc: zsh-workers, ab, bug-autoconf

On Tue, Apr 09, 2002 at 12:51:23PM +0200, Akim Demaille wrote:
> 
> | > We (Autoconf) have a big problem with Zsh 3.0.8.  You know it is
> | > shipped on Darwin as /bin/sh.  But this version does not understand
> | > ${1+"$@"} properly.  We use this instead of "$@" to work around a bug
> | > which still exists today in many many constructors' /bin/sh, so we
> | > can't departure from it.

One idea would be if you can use a global alias, e.g.:
  [ x$ZSH_VERSION != x ] && alias -g '${1:"$@"}'='$=@'

Is the ${1+"$@"} always used as a word on its own? The rhs of the alias
may have to be something different - I didn't entirely understand the
problem but you'd have the full flexibility of zsh 3.0.8 expansions so
I'd be suprised if it couldn't be made to work.

> Finally, one question: do you know if Apple plans to continue with Zsh
> 3?  Why did they stick to it?

I think they plan to switch to bash. Not that that helps you much because
Apple's running older versions of Mac OS X will continue to exist for a
while beyond that.

I don't know why they stuck with zsh 4. Perhaps all the shell functions
in zsh 4 scared them off. Solaris also continues with zsh 3 but there
it is only installed as /usr/bin/zsh.

Oliver

-- 

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 11:45       ` Oliver Kiddle
@ 2002-04-09 11:59         ` Peter Stephenson
  2002-04-10 15:52           ` Akim Demaille
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Stephenson @ 2002-04-09 11:59 UTC (permalink / raw)
  To: Akim Demaille, zsh-workers, ab, bug-autoconf

Oliver Kiddle wrote:
> One idea would be if you can use a global alias, e.g.:
>   [ x$ZSH_VERSION != x ] && alias -g '${1:"$@"}'='$=@'
> 
> Is the ${1+"$@"} always used as a word on its own? The rhs of the alias
> may have to be something different - I didn't entirely understand the
> problem but you'd have the full flexibility of zsh 3.0.8 expansions so
> I'd be suprised if it couldn't be made to work.

Crikey, it works!  I put '"$@"' on the right of the alias and it does
the trick.  This is 3.0.8.

% setopt shwordsplit
% [ x$ZSH_VERSION != x ] && alias -g '${1+"$@"}'='"$@"'
% set 'one word' 'two words'                           
% for arg in ${1+"$@"}; do echo $arg; done
one word
two words

As Oliver says, you have to make sure you use *exactly* the form
${1+"$@"} and no other set of characters.  But you have control over
that, so putting

  [ x$ZSH_VERSION != x ] && alias -g '${1+"$@"}'='"$@"'             

at the top of the script may be just what you want.  (As I said before,
"$@" will work the way you want it.)

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 11:30     ` Peter Stephenson
@ 2002-04-09 16:34       ` Bart Schaefer
  2002-04-09 16:45         ` Peter Stephenson
  0 siblings, 1 reply; 17+ messages in thread
From: Bart Schaefer @ 2002-04-09 16:34 UTC (permalink / raw)
  To: Peter Stephenson, Zsh hackers list

On Apr 9, 12:30pm, Peter Stephenson wrote:
}
} By the way, I'm sure this is horribly incomplete at best --- and
} paramsubst() is too grotesque for me to understand it --- but, just so I
} understand what is going on, what is the problem with (deliberately
} expanded the context):

Re-read the comment: "this leaves the unquoted substrings unsplit."  If
you turn off spbreak there, then ${=1+some words here} becomes broken.

} Index: Src/subst.c
} ===================================================================
}  		/*
}  		 * This is not good enough for sh emulation!  Sh would
}  		 * split unquoted substrings, yet not split quoted ones
}  		 * (except according to $@ rules); but this leaves the
}  		 * unquoted substrings unsplit, and other code below
}  		 * for spbreak splits even within the quoted substrings.
}  		 */
}  		multsub(&val, (aspar ? NULL : &aval), &isarr, NULL);
}  		copied = 1;
} +		if (spbreak == 1)
} +		    spbreak = 0;
}  	    }
}  	    break;

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 16:34       ` Bart Schaefer
@ 2002-04-09 16:45         ` Peter Stephenson
  2002-04-09 18:09           ` Bart Schaefer
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Stephenson @ 2002-04-09 16:45 UTC (permalink / raw)
  To: Zsh hackers list

"Bart Schaefer" wrote:
> On Apr 9, 12:30pm, Peter Stephenson wrote:
> }
> } By the way, I'm sure this is horribly incomplete at best --- and
> } paramsubst() is too grotesque for me to understand it --- but, just so I
> } understand what is going on, what is the problem with (deliberately
> } expanded the context):
> 
> Re-read the comment: "this leaves the unquoted substrings unsplit."  If
> you turn off spbreak there, then ${=1+some words here} becomes broken.

No, it doesn't, because that uses (spbreak = 2), hence the test.

> } +		if (spbreak == 1)
> } +		    spbreak = 0;

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 16:45         ` Peter Stephenson
@ 2002-04-09 18:09           ` Bart Schaefer
  0 siblings, 0 replies; 17+ messages in thread
From: Bart Schaefer @ 2002-04-09 18:09 UTC (permalink / raw)
  To: Peter Stephenson, Zsh hackers list

On Apr 9,  5:45pm, Peter Stephenson wrote:
}
} > Re-read the comment: "this leaves the unquoted substrings unsplit."  If
} > you turn off spbreak there, then ${=1+some words here} becomes broken.
} 
} No, it doesn't, because that uses (spbreak = 2), hence the test.

Sorry, I was writing in shorthand for:

setopt shwordsplit
for x in ${1-some words here}; do echo $x; done

It's not sufficient just to twaddle spbreak -- it's necessary to actually
parse the string and interpret quoting, but I think by the time multsub
is done the quotes have already been stripped out.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-09 11:59         ` Peter Stephenson
@ 2002-04-10 15:52           ` Akim Demaille
  2002-04-10 15:54             ` A Braunsdorf
  2002-04-10 17:09             ` Paul Eggert
  0 siblings, 2 replies; 17+ messages in thread
From: Akim Demaille @ 2002-04-10 15:52 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers, ab, bug-autoconf, APatche

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

Thanks to you all for the help!

I'm installing the following patch on Autoconf (I have left its side
effects, such as on configure, so that people can look at its impact).
Feel free to fix my words about Zsh.

Allen, I'll wrap a tarball, once the test suite finished (err... a
couple of hours I guess), will you be able to re-run the test suite on
that tarball?  I expect much less than 126 failures on 163 tests :)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: diffs.patch --]
[-- Type: text/x-patch, Size: 49563 bytes --]

Index: ChangeLog
from  Akim Demaille  <akim@epita.fr>

	* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Install the Zsh
	workaround for ${1+"$@"}.
	* doc/autoconf.texi (Shell Substitutions): Explain it.
	From Oliver Kiddle and Peter Stephenson.

	Have M4sh perform minimal shell sanitizing.

	* lib/m4sugar/m4sh.at (AS_SHELL_SANITIZE): Split the `_AS_PREPARE_*'
	part into...
	(_AS_PREPARE): this new macro.
	(AS_PREPARE): New.
	(AS_INIT): Invoke AS_SHELL_SANITIZE.
	* tests/m4sh.at (AT_DATA_LINENO): Use _AS_PREPARE.

	Adjust Autoconf and Autotest.

	* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Don't invoke
	AS_SHELL_SANITIZE, AS_INIT did it, but invoke AS_PREPARE.
	* lib/autotest/general.m4 (AT_INIT): Likewise.
	* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
	Invoke _AS_PREPARE (not AS_PREPARE) in addition to
	AS_SHELL_SANITIZE.

	Use this M4sh to generate Autoconf's shell scripts.

	* tests/wrapsh.as: New, precursor of wrapsh.in.
	* tests/Makefile.am: Include lib/freeze.mk to get the dependencies
	on Autotest and M4sh.
	($(TESTSUITE)): Use $(autotest_m4f_dependencies).
	(wrapsh.in): New target.
	* bin/autoconf.as: New, precursor of autoconf.in.
	(autoconf.in): New target.

Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.229
diff -u -u -r1.229 NEWS
--- NEWS 9 Apr 2002 20:37:10 -0000 1.229
+++ NEWS 10 Apr 2002 15:51:27 -0000
@@ -8,6 +8,16 @@
 
 - AC_PROG_CC_STDC is integrated into AC_PROG_CC.
 
+** Bug fixes
+
+- Spurious complaints from `m4_bmatch' about invalid regular
+  expressions are suppressed.
+
+** Improved Zsh portability
+  Both Autoconf the package, and the scripts it produces, should run
+  more reliably with Zsh.  Bear in mind it is the default Bourne shell
+  on Darwin.
+
 ** Documentation
 
 - Limitations of Make
Index: THANKS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/THANKS,v
retrieving revision 1.85
diff -u -u -r1.85 THANKS
--- THANKS 19 Mar 2002 15:20:58 -0000 1.85
+++ THANKS 10 Apr 2002 15:51:27 -0000
@@ -126,6 +126,7 @@
 Nishio Futoshi              fut_nis@d3.dion.ne.jp
 Noah Elliott                elliott@hera.llnl.gov
 Noah Friedman               friedman@gnu.ai.mit.edu
+Oliver Kiddle               okiddle@totalise.co.uk
 Olly Betts                  olly@survex.com
 Ossama Othman               ossama@debian.org
 Patrick Tullmann            tullmann@cs.utah.edu
@@ -137,6 +138,7 @@
 Pavel Roskin                pavel_roskin@geocities.com
 Peter Eisentraut            peter_e@gmx.net
 Peter Simons                simons@research.cys.de
+Peter Stephenson            pws@csr.com
 Philipp Thomas              kthomas@gwdg.de
 Rainer Orth                 ro@TechFak.Uni-Bielefeld.DE
 Raja R Harinath             harinath@cs.umn.edu
Index: configure
===================================================================
RCS file: /cvsroot/autoconf/autoconf/configure,v
retrieving revision 1.206
diff -u -u -r1.206 configure
--- configure 13 Mar 2002 09:58:41 -0000 1.206
+++ configure 10 Apr 2002 15:51:27 -0000
@@ -8,14 +8,6 @@
 # Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-
-
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
@@ -24,6 +16,9 @@
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
+  # Zsh performs word splitting on ${1+"$@"}, which is contrary to
+  # our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
@@ -62,8 +57,22 @@
       { LC_MESSAGES=C; export LC_MESSAGES; }
 
 
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
 # Name of the executable.
-as_me=`(basename "$0") 2>/dev/null ||
+as_me=`$as_basename "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)$' \| \
@@ -74,13 +83,6 @@
   	  /^X\/\(\/\).*/{ s//\1/; q; }
   	  s/.*/./; q'`
 
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
@@ -95,92 +97,6 @@
   rm -f conftest.sh
 fi
 
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
-	 /*)
-	   if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
-
-
 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
   *c*,-n*) ECHO_N= ECHO_C='
 ' ECHO_T='	' ;;
@@ -188,48 +104,8 @@
   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
 as_executable_p="test -f"
 
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
-
-# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
-
 
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -1159,7 +1035,7 @@
 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
-ac_config_files="$ac_config_files config/Makefile"
+          ac_config_files="$ac_config_files config/Makefile"
 
 
 am__api_version="1.6a"
@@ -1519,24 +1395,24 @@
 
 
 # Initialize the test suite and build position independent wrappers.
-ac_config_commands="$ac_config_commands tests/atconfig"
+          ac_config_commands="$ac_config_commands tests/atconfig"
 
 
-ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
+                    ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
 
-ac_config_files="$ac_config_files tests/autoconf:tests/wrapsh.in"
+          ac_config_files="$ac_config_files tests/autoconf:tests/wrapsh.in"
 
-ac_config_files="$ac_config_files tests/autoheader:tests/wrappl.in"
+          ac_config_files="$ac_config_files tests/autoheader:tests/wrappl.in"
 
-ac_config_files="$ac_config_files tests/autom4te:tests/wrappl.in"
+          ac_config_files="$ac_config_files tests/autom4te:tests/wrappl.in"
 
-ac_config_files="$ac_config_files tests/autoreconf:tests/wrappl.in"
+          ac_config_files="$ac_config_files tests/autoreconf:tests/wrappl.in"
 
-ac_config_files="$ac_config_files tests/autoscan:tests/wrappl.in"
+          ac_config_files="$ac_config_files tests/autoscan:tests/wrappl.in"
 
-ac_config_files="$ac_config_files tests/autoupdate:tests/wrappl.in"
+          ac_config_files="$ac_config_files tests/autoupdate:tests/wrappl.in"
 
-ac_config_files="$ac_config_files tests/ifnames:tests/wrappl.in"
+          ac_config_files="$ac_config_files tests/ifnames:tests/wrappl.in"
 
 # Extract the first word of "expr", so it can be a program name with args.
 set dummy expr; ac_word=$2
@@ -1649,7 +1525,7 @@
 fi
 
 # Man pages.
-ac_config_files="$ac_config_files man/Makefile"
+          ac_config_files="$ac_config_files man/Makefile"
 
 
 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
@@ -1708,7 +1584,7 @@
 }
 
 # Emacs modes.
-ac_config_files="$ac_config_files lib/emacs/Makefile"
+          ac_config_files="$ac_config_files lib/emacs/Makefile"
 
 test x"$EMACS" = xt && EMACS=
 for ac_prog in emacs xemacs
@@ -1845,7 +1721,7 @@
 
 
 
-ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile lib/m4sugar/Makefile lib/autoconf/Makefile lib/autotest/Makefile bin/Makefile"
+                                                                                          ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile lib/m4sugar/Makefile lib/autoconf/Makefile lib/autotest/Makefile bin/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -1973,7 +1849,6 @@
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
-
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
@@ -1982,6 +1857,9 @@
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
+  # Zsh performs word splitting on ${1+"$@"}, which is contrary to
+  # our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
@@ -2020,8 +1898,22 @@
       { LC_MESSAGES=C; export LC_MESSAGES; }
 
 
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
 # Name of the executable.
-as_me=`(basename "$0") 2>/dev/null ||
+as_me=`$as_basename "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)$' \| \
@@ -2032,6 +1924,7 @@
   	  /^X\/\(\/\).*/{ s//\1/; q; }
   	  s/.*/./; q'`
 
+
 # PATH needs CR, and LINENO needs CR and PATH.
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -2099,6 +1992,8 @@
   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
 	     CONFIG_SHELL=$as_dir/$as_base
 	     export CONFIG_SHELL
 	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
@@ -2172,6 +2067,12 @@
 fi
 rm -f conf$$ conf$$.exe conf$$.file
 
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  as_mkdir_p=false
+fi
+
 as_executable_p="test -f"
 
 # Sed expression to map a string onto a valid CPP name.
@@ -2544,25 +2445,30 @@
   	  /^X\(\/\/\)$/{ s//\1/; q; }
   	  /^X\(\/\).*/{ s//\1/; q; }
   	  s/.*/./; q'`
-  { case "$ac_dir" in
-  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
-  *)                      as_incr_dir=.;;
-esac
-as_dummy="$ac_dir"
-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
-  case $as_mkdir_dir in
-    # Skip DOS drivespec
-    ?:) as_incr_dir=$as_mkdir_dir ;;
-    *)
-      as_incr_dir=$as_incr_dir/$as_mkdir_dir
-      test -d "$as_incr_dir" ||
-        mkdir "$as_incr_dir" ||
-	{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }
-    ;;
-  esac
-done; }
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
 
   ac_builddir=.
 
Index: bin/Makefile.am
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/Makefile.am,v
retrieving revision 1.4
diff -u -u -r1.4 Makefile.am
--- bin/Makefile.am 23 Sep 2001 17:16:43 -0000 1.4
+++ bin/Makefile.am 10 Apr 2002 15:51:27 -0000
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in. -*-Makefile-*-
 
 ## Makefile for Autoconf.
-## Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+## Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -22,7 +22,8 @@
               autoconf autoheader autoreconf ifnames autoscan autoupdate
 
 EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \
-             autoscan.in autom4te.in
+             autoscan.in autom4te.in \
+	     autoconf.as
 
 # Files that should be removed, but which Automake does not know.
 CLEANFILES = $(bin_SCRIPTS)
@@ -46,9 +47,15 @@
 	-e 's,@VERSION\@,$(VERSION),g' \
 	-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
 
+# autoconf is written in M4sh.
+AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh
+$(srcdir)/autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
+	$(AUTOM4SH) $(srcdir)/autoconf.as -o $@
+
 ## All the files below depend on configure.ac so that they are rebuilt
 ## when the Autoconf version changes. Unfortunately, suffix rules cannot
 ## have additional dependencies, so we have to use explicit rules.
+
 
 autoconf: $(srcdir)/autoconf.in $(top_srcdir)/configure.ac
 	rm -f autoconf autoconf.tmp
Index: bin/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/Makefile.in,v
retrieving revision 1.10
diff -u -u -r1.10 Makefile.in
--- bin/Makefile.in 8 Mar 2002 12:44:46 -0000 1.10
+++ bin/Makefile.in 10 Apr 2002 15:51:27 -0000
@@ -85,7 +85,8 @@
 
 
 EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \
-             autoscan.in autom4te.in
+             autoscan.in autom4te.in \
+	     autoconf.as
 
 
 # Files that should be removed, but which Automake does not know.
@@ -106,6 +107,9 @@
 	-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
 
 
+# autoconf is written in M4sh.
+AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh
+
 TAGS_DEPENDENCIES = $(EXTRA_DIST)
 
 letters = abcdefghijklmnopqrstuvwxyz
@@ -294,6 +298,8 @@
 	maintainer-clean-generic mostlyclean mostlyclean-generic tags \
 	uninstall uninstall-am uninstall-binSCRIPTS uninstall-info-am
 
+$(srcdir)/autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
+	$(AUTOM4SH) $(srcdir)/autoconf.as -o $@
 
 autoconf: $(srcdir)/autoconf.in $(top_srcdir)/configure.ac
 	rm -f autoconf autoconf.tmp
Index: bin/autoconf.as
===================================================================
RCS file: bin/autoconf.as
diff -N bin/autoconf.as
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bin/autoconf.as 10 Apr 2002 15:51:27 -0000
@@ -0,0 +1,191 @@
+AS_INIT[]dnl                                            -*- shell-script -*-
+# autoconf -- create `configure' using m4 macros
+# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+usage=["\
+Usage: $0 [OPTION] ... [TEMPLATE-FILE]
+
+Generate a configuration script from a TEMPLATE-FILE if given, or
+\`configure.ac' if present, or else \`configure.in'.  Output is sent
+to the standard output if TEMPLATE-FILE is given, else into
+\`configure'.
+
+Operation modes:
+  -h, --help               print this help, then exit
+  -V, --version            print version number, then exit
+  -v, --verbose            verbosely report processing
+  -d, --debug              don't remove temporary files
+  -I, --include=DIR        look for input files in DIR (cumulative)
+  -f, --force              consider all files obsolete
+  -o, --output=FILE        save output in FILE (stdout is the default)
+  -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
+
+Warning categories include:
+  \`cross'         cross compilation issues
+  \`obsolete'      obsolete constructs
+  \`syntax'        dubious syntactic constructs
+  \`all'           all the warnings
+  \`no-CATEGORY'   turn off the warnings on CATEGORY
+  \`none'          turn off all the warnings
+  \`error'         warnings are error
+
+The environment variable \`WARNINGS' is honored.
+
+Tracing:
+  -t, --trace=MACRO     report the list of calls to MACRO
+  -i, --initialization  also trace Autoconf's initialization process
+
+In tracing mode, no configuration script is created.
+
+Report bugs to <bug-autoconf@gnu.org>."]
+
+version=["\
+autoconf (@PACKAGE_NAME@) @VERSION@
+Written by David J. MacKenzie and Akim Demaille.
+
+Copyright 2002 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."]
+
+me=`AS_BASENAME([$0])`
+
+help="\
+Try \`$me --help' for more information."
+
+exit_missing_arg="\
+echo \"$me: option \\\`\$1' requires an argument\" >&2
+echo \"\$help\" >&2
+exit 1"
+
+# Variables.
+: ${AUTOM4TE=@autom4te-name@}
+dir=`AS_DIRNAME([$0])`
+outfile=
+verbose=:
+
+# Parse command line.
+while test $# -gt 0 ; do
+  option=[`expr "x$1" : 'x\(--[^=]*\)' \| \
+               "x$1" : 'x\(-.\)'`]
+  optarg=[`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
+               "x$1" : 'x-.\(.*\)'`]
+  case $1 in
+    --version | -V )
+       echo "$version" ; exit 0 ;;
+    --help | -h )
+       echo "$usage"; exit 0 ;;
+
+    --verbose | -v )
+       verbose=echo
+       AUTOM4TE="$AUTOM4TE $1"; shift ;;
+
+    # Arguments passed as is to autom4te.
+    --debug      | -d   | \
+    --force      | -f   | \
+    --include=*  | -I?* | \
+    --warnings=* | -W?* )
+       AUTOM4TE="$AUTOM4TE $1"; shift ;;
+
+    # Options with separated arg passed as is to autom4te.
+    --include | -I | \
+    --warnings | -W )
+       test $# = 1 && eval "$exit_missing_arg"
+       AUTOM4TE="$AUTOM4TE $option $2"
+       shift 2 ;;
+
+    # Obsolete options.
+    --localdir=* | -l?* | --autoconf-dir=* | -A?* | --macrodir=* | -m?* )
+       echo "$me: warning: $option is obsolete, use --include" >&2
+       AUTOM4TE="$AUTOM4TE --include=$optarg"
+       shift ;;
+    --localdir | -l | --autoconf-dir | -A | --macrodir | -m )
+       echo "$me: warning: $option is obsolete, use --include" >&2
+       test $# = 1 && eval "$exit_missing_arg"
+       shift
+       AUTOM4TE="$AUTOM4TE --include=$1"
+       shift ;;
+
+    --trace=* | -t?* )
+       traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'"
+       shift ;;
+    --trace | -t )
+       test $# = 1 && eval "$exit_missing_arg"
+       shift
+       traces="$traces --trace='"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'"
+       shift ;;
+    --initialization | -i )
+       AUTOM4TE="$AUTOM4TE --melt"
+       shift;;
+
+    --output=* | -o?* )
+       outfile=$optarg
+       shift ;;
+    --output | -o )
+       test $# = 1 && eval "$exit_missing_arg"
+       shift
+       outfile=$1
+       shift ;;
+
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       exec >&2
+       echo "$me: invalid option $1"
+       echo "$help"
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+# Find the input file.
+case $# in
+  0)
+    case `ls configure.ac configure.in 2>/dev/null` in
+      *ac*in )
+        echo "$me: warning: both \`configure.ac' and \`configure.in' are present." >&2
+        echo "$me: warning: proceeding with \`configure.ac'." >&2
+        infile=configure.ac;;
+      *ac ) infile=configure.ac;;
+      *in ) infile=configure.in;;
+      * )
+        echo "$me: no input file" >&2
+        exit 1;;
+    esac
+    test -z "$traces" && test -z "$outfile" && outfile=configure;;
+  1) # autom4te doesn't like `-'.
+     test "x$1" != "x-" && infile=$1 ;;
+  *) exec >&2
+     echo "$me: invalid number of arguments."
+     echo "$help"
+     (exit 1); exit 1 ;;
+esac
+
+# Unless specified, the output is stdout.
+test -z "$outfile" && outfile=-
+
+# Running autom4te.
+run_autom4te="$AUTOM4TE --language=autoconf --output=$outfile"
+# Autom4te expansion.
+eval set dummy "$traces"
+shift
+$verbose "$me: running $run_autom4te "${1+"$@"}" $infile" >&2
+exec $run_autom4te ${1+"$@"} $infile
Index: bin/autoconf.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoconf.in,v
retrieving revision 1.144
diff -u -u -r1.144 autoconf.in
--- bin/autoconf.in 8 Mar 2002 11:46:31 -0000 1.144
+++ bin/autoconf.in 10 Apr 2002 15:51:27 -0000
@@ -1,7 +1,29 @@
-#! @SHELL@
-# -*- shell-script -*-
+#! /bin/sh
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh performs word splitting on ${1+""}, which is contrary to
+  # our usage.  Disable this feature.
+  alias -g '${1+""}'='""'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
 # autoconf -- create `configure' using m4 macros
-# Copyright 1992, 1993, 1994, 1996, 1999, 2000, 2001
+# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -19,8 +41,6 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-me=`echo "$0" | sed -e 's,.*[\\/],,'`
-
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
 
@@ -66,6 +86,17 @@
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 
+me=`$as_basename $0 ||
+$as_expr X/$0 : '.*/\([^/][^/]*\)/*$' \| \
+	 X$0 : 'X\(//\)$' \| \
+	 X$0 : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/$0 |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
 help="\
 Try \`$me --help' for more information."
 
@@ -74,15 +105,20 @@
 echo \"\$help\" >&2
 exit 1"
 
-# NLS nuisances.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-
 # Variables.
 : ${AUTOM4TE=@autom4te-name@}
-dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
+dir=`(dirname $0) 2>/dev/null ||
+$as_expr X$0 : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X$0 : 'X\(//\)[^/]' \| \
+         X$0 : 'X\(//\)$' \| \
+         X$0 : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X$0 |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
 outfile=
 verbose=:
 
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.608
diff -u -u -r1.608 autoconf.texi
--- doc/autoconf.texi 9 Apr 2002 20:37:11 -0000 1.608
+++ doc/autoconf.texi 10 Apr 2002 15:51:28 -0000
@@ -7412,6 +7412,9 @@
 @c FIXME: Eventually will become a chapter, as it is not related to
 @c programming in M4 per se.
 
+M4sh is aiming at producing portable Bourne shell scripts.  For the time
+being, it is not mature enough to be widely used.
+
 M4sh provides portable alternatives for some common shell constructs
 that unfortunately are not portable in practice.
 
@@ -8460,6 +8463,35 @@
 Unix 4.0 and 5.0, will then replace it with an empty argument.  To be
 portable, use @samp{$@{1+"$@@"@}}.
 
+But that's not the end of the story.  Zsh (3.x and 4.x), when emulating
+the Bourne shell, does perform word splitting on @samp{$@{1+"$@@"@}}...
+
+@example
+zsh $ @kbd{emulate sh}
+zsh $ @kbd{for i in "$@"; do echo $i; done}
+Hello World
+!
+zsh $ @kbd{for i in $@{1+"$@@"@}; do echo $i; done}
+Hello
+World
+!
+@end example
+
+@noindent
+It is not clear whether this is a violation of the Bourne shell
+standard, nevertheless, in this regard Zsh is different from all the
+other shells.  Of course Zsh handles @samp{"$@@"} properly, but we can't
+use it portably...
+
+Fortunately, there is a workaround which relies on Zsh's ``global
+aliases'': let it convert @samp{$@{1+"$@@"@}} into @samp{"$@@"} by
+itself:
+
+@example
+test -n "$@{ZSH_VERSION+set@}" = set && alias -g '$@{1+"$@@"@}'='"$@@"'
+@end example
+
+
 @item $@{@var{var}:-@var{value}@}
 @c Info cannot handle `:' in index entries.
 @c @cindex $@{@var{var}:-@var{value}@}
@@ -8478,6 +8510,8 @@
 otherwise some shells, such as on Digital Unix V 5.0, will die because
 of a ``bad substitution''.
 
+@sp 1
+
 Solaris' @command{/bin/sh} has a frightening bug in its interpretation
 of this.  Imagine you need set a variable to a string containing
 @samp{@}}.  This @samp{@}} character confuses Solaris' @command{/bin/sh}
@@ -9132,6 +9166,12 @@
   echo "$arg"
 done
 @end example
+
+@noindent
+But keep in mind that Zsh, even in Bourne shell emulation mode, performs
+word splitting on @samp{$@{1+"$@@"@}}, see @ref{Shell Substitutions},
+item @samp{$@@}, for more.
+
 
 @item @command{if}
 @c ---------------
Index: lib/autoconf/autoconf.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/autoconf.m4,v
retrieving revision 1.40
diff -u -u -r1.40 autoconf.m4
--- lib/autoconf/autoconf.m4 5 Feb 2002 08:12:46 -0000 1.40
+++ lib/autoconf/autoconf.m4 10 Apr 2002 15:51:28 -0000
@@ -1,6 +1,6 @@
 # This file is part of Autoconf.                -*- Autoconf -*-
 # Driver that loads the Autoconf macro files.
-# Copyright 1994, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.792
diff -u -u -r1.792 general.m4
--- lib/autoconf/general.m4 4 Mar 2002 15:09:21 -0000 1.792
+++ lib/autoconf/general.m4 10 Apr 2002 15:51:28 -0000
@@ -432,8 +432,6 @@
 m4_define([_AC_INIT_DEFAULTS],
 [m4_divert_push([DEFAULTS])dnl
 
-AS_SHELL_SANITIZE
-
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
@@ -1252,6 +1250,7 @@
 # Actually reserved by M4sh.
 m4_pattern_allow([^AS_FLAGS$])
 AS_INIT
+AS_PREPARE
 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
 _AC_INIT_DEFAULTS
 _AC_INIT_PARSE_ARGS
@@ -1754,9 +1753,9 @@
 # ------------------------------------------
 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
 # Should be dnl'ed.  Try to catch common mistakes.
-m4_define([AC_CACHE_VAL],
+m4_defun([AC_CACHE_VAL],
 [m4_bmatch([$2], [AC_DEFINE],
-          [AC_DIAGNOSE(syntax,
+           [AC_DIAGNOSE(syntax,
 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
 [where no actions should be taken])])dnl
 AS_VAR_SET_IF([$1],
@@ -1767,7 +1766,7 @@
 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
 # -------------------------------------------
 # Do not call this macro with a dnl right behind.
-m4_define([AC_CACHE_CHECK],
+m4_defun([AC_CACHE_CHECK],
 [AC_MSG_CHECKING([$1])
 AC_CACHE_VAL([$2], [$3])dnl
 AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.21
diff -u -u -r1.21 status.m4
--- lib/autoconf/status.m4 9 Apr 2002 11:15:33 -0000 1.21
+++ lib/autoconf/status.m4 10 Apr 2002 15:51:28 -0000
@@ -1261,6 +1261,10 @@
 
 cat >>$CONFIG_STATUS <<\_ACEOF
 AS_SHELL_SANITIZE
+dnl Watch out, this is directly the initializations, do not use
+dnl AS_PREPARE, otherwise you'd get it output in the initialization
+dnl of configure, not config.status.
+_AS_PREPARE
 exec AS_MESSAGE_FD>&1
 
 # Open the log real soon, to keep \$[0] and so on meaningful, and to
Index: lib/autotest/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.129
diff -u -u -r1.129 general.m4
--- lib/autotest/general.m4 19 Mar 2002 06:43:17 -0000 1.129
+++ lib/autotest/general.m4 10 Apr 2002 15:51:28 -0000
@@ -94,9 +94,10 @@
 m4_define([AT_ordinal], 0)
 m4_define([AT_banner_ordinal], 0)
 AS_INIT
+AS_PREPARE
 m4_divert_push([DEFAULT])dnl
 
-AS_SHELL_SANITIZE
+AS_PREPARE
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # How were we run?
Index: lib/m4sugar/m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.81
diff -u -u -r1.81 m4sh.m4
--- lib/m4sugar/m4sh.m4 4 Apr 2002 13:35:05 -0000 1.81
+++ lib/m4sugar/m4sh.m4 10 Apr 2002 15:51:28 -0000
@@ -137,20 +137,8 @@
 # AS_SHELL_SANITIZE
 # -----------------
 # Try to be as Bourne and/or POSIX as possible.
-#
-# This macro has a very special status.  Normal use of M4sh relies
-# heavily on AS_REQUIRE, so that needed initiatizations (such as
-# _AS_TEST_PREPARE) are performed on need, not on demand.  But
-# Autoconf is the first client of M4sh, and for two reasons: configure
-# and config.status.  Relying on AS_REQUIRE is of course fine for
-# configure, but fails for config.status (which is created by
-# configure).  So we need a means to force the inclusion of the
-# various _AS_PREPARE_* on top of config.status.  That's basically why
-# there are so many _AS_PREPARE_* below, and that's also why it is
-# important not to forget some: config.status needs them.
 m4_defun([AS_SHELL_SANITIZE],
-[
-## --------------------- ##
+[## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
@@ -158,6 +146,9 @@
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
+  [#] Zsh performs word splitting on ${1+"$[@]"}, which is contrary to
+  # our usage.  Disable this feature.
+  alias -g '${1+"$[@]"}'='"$[@]"'
 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
@@ -172,11 +163,30 @@
       { _AS_var=C; export _AS_var; }
 ])
 
-# Name of the executable.
+# Required to use basename.
+_AS_EXPR_PREPARE
 _AS_BASENAME_PREPARE
+
+# Name of the executable.
 as_me=`AS_BASENAME("$[0]")`
 
-# PATH needs CR, and LINENO needs CR and PATH.
+])
+
+
+# _AS_PREPARE
+# -----------
+# This macro has a very special status.  Normal use of M4sh relies
+# heavily on AS_REQUIRE, so that needed initiatizations (such as
+# _AS_TEST_PREPARE) are performed on need, not on demand.  But
+# Autoconf is the first client of M4sh, and for two reasons: configure
+# and config.status.  Relying on AS_REQUIRE is of course fine for
+# configure, but fails for config.status (which is created by
+# configure).  So we need a means to force the inclusion of the
+# various _AS_PREPARE_* on top of config.status.  That's basically why
+# there are so many _AS_PREPARE_* below, and that's also why it is
+# important not to forget some: config.status needs them.
+m4_defun([_AS_PREPARE],
+[# PATH needs CR, and LINENO needs CR and PATH.
 _AS_CR_PREPARE
 _AS_PATH_SEPARATOR_PREPARE
 _AS_LINENO_PREPARE
@@ -200,6 +210,14 @@
 ])
 
 
+# AS_PREPARE
+# ----------
+# Output all the M4sh possible initialization into the initialization
+# diversion.
+m4_defun([AS_PREPARE],
+[m4_divert_text([M4SH-INIT], [_AS_PREPARE])])
+
+
 ## ----------------------------- ##
 ## 2. Wrappers around builtins.  ##
 ## ----------------------------- ##
@@ -508,7 +526,8 @@
 # configure) you'd compare LINENO wrt config.status vs. _oline_ vs
 # configure.
 m4_define([_AS_LINENO_PREPARE],
-[_AS_LINENO_WORKS || {
+[AS_REQUIRE([_AS_CR_PREPARE])dnl
+_AS_LINENO_WORKS || {
   # Find who we are.  Look in the path if we contain no path at all
   # relative or not.
   case $[0] in
@@ -1017,8 +1036,9 @@
 # Forbidden tokens and exceptions.
 m4_pattern_forbid([^_?AS_])
 
-# Bangshe.
+# Bangshe and minimal initialization.
 m4_divert_text([BINSH], [@%:@! /bin/sh])
+m4_divert_text([M4SH-INIT], [AS_SHELL_SANITIZE])
 
 # Let's go!
 m4_wrap([m4_divert_pop([BODY])[]])
Index: man/autoconf.1
===================================================================
RCS file: /cvsroot/autoconf/autoconf/man/autoconf.1,v
retrieving revision 1.62
diff -u -u -r1.62 autoconf.1
--- man/autoconf.1 11 Mar 2002 14:39:00 -0000 1.62
+++ man/autoconf.1 10 Apr 2002 15:51:28 -0000
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.26.
-.TH AUTOCONF "1" "March 2002" "autoconf 2.53a" "User Commands"
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.27.
+.TH AUTOCONF "1" "April 2002" "autoconf 2.53a" "User Commands"
 .SH NAME
 autoconf \- Generate configuration scripts
 .SH SYNOPSIS
Index: man/config.guess.1
===================================================================
RCS file: /cvsroot/autoconf/autoconf/man/config.guess.1,v
retrieving revision 1.13
diff -u -u -r1.13 config.guess.1
--- man/config.guess.1 5 Mar 2002 08:43:46 -0000 1.13
+++ man/config.guess.1 10 Apr 2002 15:51:28 -0000
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.25.
-.TH CONFIG.GUESS "1" "March 2002" "config.guess (2002-03-04)" "User Commands"
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.27.
+.TH CONFIG.GUESS "1" "April 2002" "config.guess (2002-03-20)" "User Commands"
 .SH NAME
 config.guess \- guess the build system triplet
 .SH SYNOPSIS
Index: tests/Makefile.am
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/Makefile.am,v
retrieving revision 1.79
diff -u -u -r1.79 Makefile.am
--- tests/Makefile.am 5 Feb 2002 08:28:08 -0000 1.79
+++ tests/Makefile.am 10 Apr 2002 15:51:28 -0000
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in. -*-Makefile-*-
 
 ## Makefile for Autoconf testsuite.
-## Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+## Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -21,14 +21,17 @@
 # We don't actually distribute the testsuite, since one only
 # needs m4 to build it, m4 being required anyway to install Autoconf.
 EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 mktests.sh \
-             atlocal.in package.m4
+             atlocal.in package.m4 wrapsh.as
 
 # Running the uninstalled scripts.
 check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames
 
-# FIXME: Why doesn't Automake clean these?
 DISTCLEANFILES = atconfig atlocal $(TESTSUITE) $(check_SCRIPTS)
 
+# Import the dependencies on Autotest and M4sh.
+include ../lib/freeze.mk
+
+
 ## ------------ ##
 ## package.m4.  ##
 ## ------------ ##
@@ -45,6 +48,14 @@
 
 
 
+## ---------- ##
+## Wrappers.  ##
+## ---------- ##
+
+$(srcdir)/wrapsh.in: $(srcdir)/wrapsh.as $(m4sh_m4f_dependencies)
+	./autom4te --language=M4sh $(srcdir)/wrapsh.as -o $@
+
+
 ## ------------ ##
 ## Test suite.  ##
 ## ------------ ##
@@ -71,13 +82,10 @@
 # Don't use AUTOM4TE since `make alpha' makes it unavailable although
 # we are allowed to use it (since we ship it).
 AUTOTEST = ./autom4te --language=autotest
-$(TESTSUITE): $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
-	   $(top_srcdir)/lib/m4sugar/m4sh.m4 \
-           $(top_srcdir)/lib/autotest/autotest.m4 \
-           $(top_srcdir)/lib/autotest/general.m4 \
-	   $(srcdir)/package.m4 \
-	   atspecific.m4 \
-           $(TESTSUITE_AT)
+$(TESTSUITE): $(srcdir)/package.m4 \
+	      atspecific.m4 \
+              $(TESTSUITE_AT) \
+	      $(autotest_m4f_dependencies)
 	$(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
 	mv $@.tmp $@
 
Index: tests/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/Makefile.in,v
retrieving revision 1.112
diff -u -u -r1.112 Makefile.in
--- tests/Makefile.in 8 Mar 2002 12:44:47 -0000 1.112
+++ tests/Makefile.in 10 Apr 2002 15:51:28 -0000
@@ -83,15 +83,69 @@
 # We don't actually distribute the testsuite, since one only
 # needs m4 to build it, m4 being required anyway to install Autoconf.
 EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 mktests.sh \
-             atlocal.in package.m4
+             atlocal.in package.m4 wrapsh.as
 
 
 # Running the uninstalled scripts.
 check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames
 
-# FIXME: Why doesn't Automake clean these?
 DISTCLEANFILES = atconfig atlocal $(TESTSUITE) $(check_SCRIPTS)
 
+SUFFIXES = .m4 .m4f
+
+# Do not use AUTOM4TE here, since Makefile.maint (my-distcheck)
+# checks if we are independant of Autoconf by defining AUTOM4TE (and
+# others) to `false'.  But we _ship_ tests/autom4te, so it doesn't
+# apply to us.
+MY_AUTOM4TE = $(top_builddir)/tests/autom4te
+
+AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg
+
+# Factor the dependencies between all the frozen files.
+# Some day we should explain to Automake how to use autom4te to compute
+# the dependencies...
+src_libdir = $(top_srcdir)/lib
+build_libdir = $(top_builddir)/lib
+
+m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG)
+
+m4sugar_m4f_dependencies = \
+	$(m4f_dependencies)			\
+	$(src_libdir)/m4sugar/m4sugar.m4	\
+	$(build_libdir)/m4sugar/version.m4
+
+
+m4sh_m4f_dependencies = \
+	$(m4sugar_m4f_dependencies)		\
+	$(src_libdir)/m4sugar/m4sh.m4
+
+
+autotest_m4f_dependencies = \
+	$(m4sh_m4f_dependencies)		\
+	$(src_libdir)/autotest/autotest.m4	\
+	$(src_libdir)/autotest/general.m4
+
+
+autoconf_m4f_dependencies = \
+	$(m4sh_m4f_dependencies)		\
+	$(src_libdir)/autoconf/general.m4	\
+	$(src_libdir)/autoconf/autoheader.m4	\
+	$(src_libdir)/autoconf/autoupdate.m4	\
+	$(src_libdir)/autoconf/autotest.m4	\
+	$(src_libdir)/autoconf/status.m4	\
+	$(src_libdir)/autoconf/oldnames.m4	\
+	$(src_libdir)/autoconf/specific.m4	\
+	$(src_libdir)/autoconf/lang.m4		\
+	$(src_libdir)/autoconf/c.m4		\
+	$(src_libdir)/autoconf/fortran.m4	\
+	$(src_libdir)/autoconf/functions.m4	\
+	$(src_libdir)/autoconf/headers.m4	\
+	$(src_libdir)/autoconf/types.m4		\
+	$(src_libdir)/autoconf/libs.m4		\
+	$(src_libdir)/autoconf/programs.m4	\
+	$(src_libdir)/autoconf/autoconf.m4
+
+
 TESTSUITE_GENERATED_AT = \
 	aclang.at acc.at acfortran.at \
 	acgeneral.at acstatus.at \
@@ -149,7 +203,8 @@
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+.SUFFIXES: .m4 .m4f
+$(srcdir)/Makefile.in:  Makefile.am $(srcdir)/../lib/freeze.mk $(top_srcdir)/configure.ac $(ACLOCAL_M4)
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  tests/Makefile
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
@@ -278,6 +333,30 @@
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
 	uninstall uninstall-am uninstall-info-am
 
+$(MY_AUTOM4TE):
+	cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te
+$(AUTOM4TE_CFG):
+	cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg
+
+# When processing the file with diversion disabled, there must be no
+# output but comments and empty lines.
+# If freezing produces output, something went wrong: a bad `divert',
+# or an improper paren etc.
+# It may happen that the output does not end with a end of line, hence
+# force an end of line when reporting errors.
+.m4.m4f:
+	$(MY_AUTOM4TE)				\
+		--language=$*			\
+		--freeze			\
+		--include=$(srcdir)/..		\
+		--include=..			\
+		--output=$@
+
+# For parallel builds.
+$(build_libdir)/m4sugar/version.m4:
+	cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4
+
+# Import the dependencies on Autotest and M4sh.
 
 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
 	{					\
@@ -288,13 +367,13 @@
 	  echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
 	  echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
 	} >$(srcdir)/package.m4
-$(TESTSUITE): $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
-	   $(top_srcdir)/lib/m4sugar/m4sh.m4 \
-           $(top_srcdir)/lib/autotest/autotest.m4 \
-           $(top_srcdir)/lib/autotest/general.m4 \
-	   $(srcdir)/package.m4 \
-	   atspecific.m4 \
-           $(TESTSUITE_AT)
+
+$(srcdir)/wrapsh.in: $(srcdir)/wrapsh.as $(m4sh_m4f_dependencies)
+	./autom4te --language=M4sh $(srcdir)/wrapsh.as -o $@
+$(TESTSUITE): $(srcdir)/package.m4 \
+	      atspecific.m4 \
+              $(TESTSUITE_AT) \
+	      $(autotest_m4f_dependencies)
 	$(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
 	mv $@.tmp $@
 
Index: tests/m4sh.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/m4sh.at,v
retrieving revision 1.28
diff -u -u -r1.28 m4sh.at
--- tests/m4sh.at 25 Mar 2002 22:02:24 -0000 1.28
+++ tests/m4sh.at 10 Apr 2002 15:51:29 -0000
@@ -2,7 +2,7 @@
 
 AT_BANNER([M4sh.])
 
-# Copyright 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@
 if $2; then
   AS@&t@_UNSET([LINENO])
 fi
-AS@&t@_SHELL_SANITIZE
+_AS@&t@_PREPARE
 echo "Line: $3"
 grep 'Line: .*$4' $[0] >/dev/null ||
   AS@&t@_ERROR([cannot find original script])
Index: tests/wrapsh.as
===================================================================
RCS file: tests/wrapsh.as
diff -N tests/wrapsh.as
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/wrapsh.as 10 Apr 2002 15:51:29 -0000
@@ -0,0 +1,5 @@
+AS_INIT
+# Running `$0' as if it were installed.
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
+
+exec @abs_top_builddir@/bin/$me --include @abs_top_builddir@/lib ${1+"$@"}
Index: tests/wrapsh.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/wrapsh.in,v
retrieving revision 1.2
diff -u -u -r1.2 wrapsh.in
--- tests/wrapsh.in 14 Dec 2001 17:57:29 -0000 1.2
+++ tests/wrapsh.in 10 Apr 2002 15:51:29 -0000
@@ -1,6 +1,82 @@
 #! /bin/sh
-# Running `$0' as if it were installed.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh performs word splitting on ${1+"$@"}, which is contrary to
+  # our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+    { $as_unset LANG || test "${LANG+set}" != set; } ||
+      { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+    { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+      { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+    { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+      { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+    { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+      { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+    { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+      { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+    { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+      { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+    { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+      { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+    { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+      { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
-me=`echo "$0" | sed -e 's,.*[\\/],,'`
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+
+# Running `$0' as if it were installed.
+me=`echo "$0" | sed -e 's,.*\\/,,'`
 
 exec @abs_top_builddir@/bin/$me --include @abs_top_builddir@/lib ${1+"$@"}

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-10 15:52           ` Akim Demaille
@ 2002-04-10 15:54             ` A Braunsdorf
  2002-04-10 17:33               ` Akim Demaille
  2002-04-10 17:09             ` Paul Eggert
  1 sibling, 1 reply; 17+ messages in thread
From: A Braunsdorf @ 2002-04-10 15:54 UTC (permalink / raw)
  To: Akim Demaille; +Cc: Peter Stephenson, zsh-workers, ab, bug-autoconf, APatche


In message <mv4bscrtuu2.fsf@nostromo.lrde.epita.fr>, Akim Demaille writes:
> 
> Allen, I'll wrap a tarball, once the test suite finished (err... a
> couple of hours I guess), will you be able to re-run the test suite on
> that tarball?  I expect much less than 126 failures on 163 tests :)

Sure.  Might have to wait 'til I get home if things get busy here,
but should be able to do it within the day.

ab


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-10 15:52           ` Akim Demaille
  2002-04-10 15:54             ` A Braunsdorf
@ 2002-04-10 17:09             ` Paul Eggert
  2002-04-10 17:32               ` Akim Demaille
  1 sibling, 1 reply; 17+ messages in thread
From: Paul Eggert @ 2002-04-10 17:09 UTC (permalink / raw)
  To: akim; +Cc: pws, zsh-workers, ab, bug-autoconf, autoconf-patches

> From: Akim Demaille <akim@epita.fr>
> Date: 10 Apr 2002 17:52:05 +0200
> 
> diff -u -u -r1.144 autoconf.in
> --- bin/autoconf.in 8 Mar 2002 11:46:31 -0000 1.144
> +++ bin/autoconf.in 10 Apr 2002 15:51:27 -0000
> ...
> +  alias -g '${1+""}'='""'
> ...

This line seems incorrect to me.  Shouldn't it be:

> +  alias -g '${1+"$@"}'='"$@"'

?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-10 17:09             ` Paul Eggert
@ 2002-04-10 17:32               ` Akim Demaille
  0 siblings, 0 replies; 17+ messages in thread
From: Akim Demaille @ 2002-04-10 17:32 UTC (permalink / raw)
  To: Paul Eggert; +Cc: pws, zsh-workers, ab, bug-autoconf, autoconf-patches

>>>>> "Paul" == Paul Eggert <eggert@twinsun.com> writes:

Paul> This line seems incorrect to me.  Shouldn't it be:

>> + alias -g '${1+"$@"}'='"$@"'

Paul> ?

Yep, thanks!  Well, rm it, make, and cvs diff below.  Was not
regenerated at some point :(

Index: bin/autoconf.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoconf.in,v
retrieving revision 1.145
diff -u -u -r1.145 autoconf.in
--- bin/autoconf.in 10 Apr 2002 15:58:19 -0000 1.145
+++ bin/autoconf.in 10 Apr 2002 17:31:42 -0000
@@ -1,26 +1,79 @@
 #! /bin/sh
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh performs word splitting on ${1+"$@"}, which is contrary to
+  # our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
 else
-  as_basename=false
+  as_unset=false
 fi
 
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+    { $as_unset LANG || test "${LANG+set}" != set; } ||
+      { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+    { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+      { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+    { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+      { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+    { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+      { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+    { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+      { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+    { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+      { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+    { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+      { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+    { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+      { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh performs word splitting on ${1+""}, which is contrary to
-  # our usage.  Disable this feature.
-  alias -g '${1+""}'='""'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
 fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
 
 # autoconf -- create `configure' using m4 macros
 # Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-10 15:54             ` A Braunsdorf
@ 2002-04-10 17:33               ` Akim Demaille
  2002-04-10 20:41                 ` A Braunsdorf
  0 siblings, 1 reply; 17+ messages in thread
From: Akim Demaille @ 2002-04-10 17:33 UTC (permalink / raw)
  To: ab; +Cc: Peter Stephenson, zsh-workers, bug-autoconf, APatche

>>>>> "A" == A Braunsdorf <A> writes:

A> Sure.  Might have to wait 'til I get home if things get busy here,
A> but should be able to do it within the day.

Great!  Thanks!

        http://www.lrde.epita.fr/~akim/download/autoconf-2.53a.tar.bz2
        http://www.lrde.epita.fr/~akim/download/autoconf-2.53a.tar.gz


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
  2002-04-10 17:33               ` Akim Demaille
@ 2002-04-10 20:41                 ` A Braunsdorf
  0 siblings, 0 replies; 17+ messages in thread
From: A Braunsdorf @ 2002-04-10 20:41 UTC (permalink / raw)
  To: Akim Demaille; +Cc: ab, Peter Stephenson, zsh-workers, bug-autoconf, APatche


In message <mv4k7rfsbkh.fsf@nostromo.lrde.epita.fr>, Akim Demaille writes:
> 
>         http://www.lrde.epita.fr/~akim/download/autoconf-2.53a.tar.gz

It's running very slowly again, and has failed on test 3:

  3: tools.at:122      FAILED near `tools.at:167'

That's the first one it failed on before, right? :-(

ab


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2002-04-10 20:41 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200204081534.g38FYlY0058635@epicenter.eas.purdue.edu>
2002-04-09  9:45 ` Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures) Akim Demaille
2002-04-09 10:35   ` Peter Stephenson
2002-04-09 10:51     ` Akim Demaille
2002-04-09 11:05       ` Peter Stephenson
2002-04-09 11:18       ` Bart Schaefer
2002-04-09 11:45       ` Oliver Kiddle
2002-04-09 11:59         ` Peter Stephenson
2002-04-10 15:52           ` Akim Demaille
2002-04-10 15:54             ` A Braunsdorf
2002-04-10 17:33               ` Akim Demaille
2002-04-10 20:41                 ` A Braunsdorf
2002-04-10 17:09             ` Paul Eggert
2002-04-10 17:32               ` Akim Demaille
2002-04-09 11:30     ` Peter Stephenson
2002-04-09 16:34       ` Bart Schaefer
2002-04-09 16:45         ` Peter Stephenson
2002-04-09 18:09           ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).