From MAILER-DAEMON Mon Dec 05 17:22:04 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RXgvE-00048S-OQ
	for mharc-autoconf-commit@gnu.org; Mon, 05 Dec 2011 17:22:04 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35806)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RXgvC-00047h-5u
	for autoconf-commit@gnu.org; Mon, 05 Dec 2011 17:22:03 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RXgvB-0000kM-1O
	for autoconf-commit@gnu.org; Mon, 05 Dec 2011 17:22:02 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50411)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RXgvA-0000kI-Vc
	for autoconf-commit@gnu.org; Mon, 05 Dec 2011 17:22:00 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RXgvA-0000fD-Ho
	for autoconf-commit@gnu.org; Mon, 05 Dec 2011 22:22:00 +0000
Date: Mon, 05 Dec 2011 22:22:00 +0000
Message-Id: <E1RXgvA-0000fD-Ho@vcs.savannah.gnu.org>
From: "Paul Eggert" <eggert@cs.ucla.edu>
To: autoconf-commit@gnu.org
Subject: [SCM] GNU Autoconf source repository branch, master,
	updated. v2.68-100-ga8942db
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 7aae67fbef03c672a4880cf0a59b215a961c78d6
X-Git-Newrev: a8942db4d787ec19033e143151d79c5f2dac4046
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: autoconf-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: autoconf-patches@gnu.org
List-Id: Commits to the Autoconf git repository <autoconf-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf-commit>
List-Post: <mailto:autoconf-commit@gnu.org>
List-Help: <mailto:autoconf-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Dec 2011 22:22:03 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=a8942db4d787ec19033e143151d79c5f2dac4046

The branch, master has been updated
       via  a8942db4d787ec19033e143151d79c5f2dac4046 (commit)
      from  7aae67fbef03c672a4880cf0a59b215a961c78d6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a8942db4d787ec19033e143151d79c5f2dac4046
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Mon Dec 5 14:21:44 2011 -0800

    doc: document GNU make's \#
    
    * doc/autoconf.texi (Comments in Make Macros): Also mention \#
    in the right hand side of a macro, as an unportable usage.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    6 ++++++
 doc/autoconf.texi |    9 ++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 68dffef..f9f4b90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: document GNU make's \#
+	* doc/autoconf.texi (Comments in Make Macros): Also mention \#
+	in the right hand side of a macro, as an unportable usage.
+
 2011-11-11  Eric Blake  <eblake@redhat.com>
 
 	doc: tweak previous commit
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 0569a27..d7d2231 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -20214,9 +20214,12 @@ CPPFLAGS = "-DCOMMENT_CHAR='#'"
 
 @noindent
 as @samp{CPPFLAGS} may be expanded to @samp{"-DCOMMENT_CHAR='}.
-Luckily, most @command{make} implementations disregard this and treat
-single and double quotes specially here; @pxref{Comments in Make Rules},
-for a more portable alternative.
+
+Most @command{make} implementations disregard this and treat single and
+double quotes specially here.  Also, GNU @command{make} lets you put
+@samp{#} into a macro value by escaping it with a backslash, i.e.,
+@samp{\#}.  However, neither of these usages are portable.
+@xref{Comments in Make Rules}, for a portable alternative.
 
 Even without quoting involved, comments can have surprising effects,
 because the whitespace before them is part of the variable value:


hooks/post-receive
-- 
GNU Autoconf source repository


From MAILER-DAEMON Thu Dec 08 01:41:46 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RYXfu-0007hB-IB
	for mharc-autoconf-commit@gnu.org; Thu, 08 Dec 2011 01:41:46 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45860)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RYXfs-0007gW-7P
	for autoconf-commit@gnu.org; Thu, 08 Dec 2011 01:41:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RYXfq-0004OC-Pu
	for autoconf-commit@gnu.org; Thu, 08 Dec 2011 01:41:44 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:45747)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RYXfq-0004O6-OP
	for autoconf-commit@gnu.org; Thu, 08 Dec 2011 01:41:42 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RYXfp-00013L-2V
	for autoconf-commit@gnu.org; Thu, 08 Dec 2011 06:41:42 +0000
Date: Thu, 08 Dec 2011 06:41:41 +0000
Message-Id: <E1RYXfp-00013L-2V@vcs.savannah.gnu.org>
From: "Paul Eggert" <eggert@cs.ucla.edu>
To: autoconf-commit@gnu.org
Subject: [SCM] GNU Autoconf source repository branch, master,
	updated. v2.68-101-gb854606
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a8942db4d787ec19033e143151d79c5f2dac4046
X-Git-Newrev: b854606885ca849e0b5a1488b6dc82105d3c138d
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: autoconf-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: autoconf-patches@gnu.org
List-Id: Commits to the Autoconf git repository <autoconf-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf-commit>
List-Post: <mailto:autoconf-commit@gnu.org>
List-Help: <mailto:autoconf-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Dec 2011 06:41:45 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=b854606885ca849e0b5a1488b6dc82105d3c138d

The branch, master has been updated
       via  b854606885ca849e0b5a1488b6dc82105d3c138d (commit)
      from  a8942db4d787ec19033e143151d79c5f2dac4046 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b854606885ca849e0b5a1488b6dc82105d3c138d
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Dec 7 22:41:04 2011 -0800

    AC_LANG_BOOL_COMPILE_TRY(C): port to g++ with warnings
    
    * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use the
    array as well as setting it, to pacify g++.  Reported by
    Werner Lemberg in
    <http://lists.gnu.org/archive/html/autoconf/2011-12/msg00005.html>.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    8 ++++++++
 lib/autoconf/c.m4 |    3 ++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f9f4b90..0f67f89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+	AC_LANG_BOOL_COMPILE_TRY(C): port to g++ with warnings
+	* lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use the
+	array as well as setting it, to pacify g++.  Reported by
+	Werner Lemberg in
+	<http://lists.gnu.org/archive/html/autoconf/2011-12/msg00005.html>.
+
 2011-12-05  Paul Eggert  <eggert@cs.ucla.edu>
 
 	doc: document GNU make's \#
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 88785d1..0fdf9dd 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -190,7 +190,8 @@ choke me
 # errors with `-W error'.
 m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
 [AC_LANG_PROGRAM([$1], [static int test_array @<:@1 - 2 * !($2)@:>@;
-test_array @<:@0@:>@ = 0
+test_array @<:@0@:>@ = 0;
+return test_array @<:@0@:>@;
 ])])
 
 


hooks/post-receive
-- 
GNU Autoconf source repository


From MAILER-DAEMON Mon Dec 26 03:35:19 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rf61f-0005D2-DJ
	for mharc-autoconf-commit@gnu.org; Mon, 26 Dec 2011 03:35:19 -0500
Received: from eggs.gnu.org ([140.186.70.92]:53281)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Rf61c-0005Ch-3f
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 03:35:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Rf61a-000519-AU
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 03:35:16 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:51204)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Rf61a-000515-7c
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 03:35:14 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Rf61a-0004MT-4t
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 08:35:14 +0000
Date: Mon, 26 Dec 2011 08:35:14 +0000
Message-Id: <E1Rf61a-0004MT-4t@vcs.savannah.gnu.org>
From: "Paul Eggert" <eggert@cs.ucla.edu>
To: autoconf-commit@gnu.org
Subject: [SCM] GNU Autoconf source repository branch, master,
	updated. v2.68-102-g17ea0df
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b854606885ca849e0b5a1488b6dc82105d3c138d
X-Git-Newrev: 17ea0df46f819a9b64c21151983a5c5b8561fefb
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: autoconf-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: autoconf-patches@gnu.org
List-Id: Commits to the Autoconf git repository <autoconf-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf-commit>
List-Post: <mailto:autoconf-commit@gnu.org>
List-Help: <mailto:autoconf-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Dec 2011 08:35:17 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=17ea0df46f819a9b64c21151983a5c5b8561fefb

The branch, master has been updated
       via  17ea0df46f819a9b64c21151983a5c5b8561fefb (commit)
      from  b854606885ca849e0b5a1488b6dc82105d3c138d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 17ea0df46f819a9b64c21151983a5c5b8561fefb
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Mon Dec 26 00:34:13 2011 -0800

    AS_LN_S: fall back on 'cp -pR' (not 'cp -p') if 'ln -s' fails
    
    This works better for symlinks to directories.
    Problem reported by Eli Zaretskii via Werner Lemberg in
    <http://lists.gnu.org/archive/html/bug-autoconf/2011-12/msg00006.html>.
    * NEWS:
    * doc/autoconf.texi (Particular Programs): Document this.
    * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Implement this.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |   10 ++++++++++
 NEWS                |    3 +++
 doc/autoconf.texi   |    2 +-
 lib/m4sugar/m4sh.m4 |   10 +++++-----
 4 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0f67f89..25799b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-12-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+	AS_LN_S: fall back on 'cp -pR' (not 'cp -p') if 'ln -s' fails
+	This works better for symlinks to directories.
+	Problem reported by Eli Zaretskii via Werner Lemberg in
+	<http://lists.gnu.org/archive/html/bug-autoconf/2011-12/msg00006.html>.
+	* NEWS:
+	* doc/autoconf.texi (Particular Programs): Document this.
+	* lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Implement this.
+
 2011-12-07  Paul Eggert  <eggert@cs.ucla.edu>
 
 	AC_LANG_BOOL_COMPILE_TRY(C): port to g++ with warnings
diff --git a/NEWS b/NEWS
index 858601a..daec256 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,9 @@ GNU Autoconf NEWS - User visible changes.
 
 ** Macros
 
+- AC_PROG_LN_S and AS_LN_S now fall back on 'cp -pR' (not 'cp -p') if 'ln -s'
+  does not work.  This works better for symlinks to directories.
+
 - New macro AC_HEADER_CHECK_STDBOOL.
 
 - New and updated macros for Fortran support:
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index d7d2231..0354dfb 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -4137,7 +4137,7 @@ The result of this test can be influenced by setting the variable
 If @samp{ln -s} works on the current file system (the operating system
 and file system support symbolic links), set the output variable
 @code{LN_S} to @samp{ln -s}; otherwise, if @samp{ln} works, set
-@code{LN_S} to @samp{ln}, and otherwise set it to @samp{cp -p}.
+@code{LN_S} to @samp{ln}, and otherwise set it to @samp{cp -pR}.
 
 If you make a link in a directory other than the current directory, its
 meaning depends on whether @samp{ln} or @samp{ln -s} is used.  To safely
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 1ff1705..7195618 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1178,7 +1178,7 @@ _m4_popdef([AS_MESSAGE_LOG_FD], [AS_ERROR])])# _AS_LINENO_PREPARE
 # Don't use conftest.sym to avoid file name issues on DJGPP, where this
 # would yield conftest.sym.exe for DJGPP < 2.04.  And don't use `conftest'
 # as base name to avoid prohibiting concurrency (e.g., concurrent
-# config.statuses).  On read-only media, assume 'cp -p' and hope we
+# config.statuses).  On read-only media, assume 'cp -pR' and hope we
 # are just running --help anyway.
 m4_defun([_AS_LN_S_PREPARE],
 [rm -f conf$$ conf$$.exe conf$$.file
@@ -1194,16 +1194,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null


hooks/post-receive
-- 
GNU Autoconf source repository


From MAILER-DAEMON Mon Dec 26 05:34:14 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rf7sk-0001si-Sv
	for mharc-autoconf-commit@gnu.org; Mon, 26 Dec 2011 05:34:14 -0500
Received: from eggs.gnu.org ([140.186.70.92]:42303)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Rf7si-0001sY-Hg
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 05:34:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Rf7sh-0006Ks-Bg
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 05:34:12 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:60992)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Rf7sh-0006Ko-A1
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 05:34:11 -0500
Received: from slattarini by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Rf7sg-00080m-Lp
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 10:34:10 +0000
Date: Mon, 26 Dec 2011 10:34:10 +0000
Message-Id: <E1Rf7sg-00080m-Lp@vcs.savannah.gnu.org>
From: "Stefano Lattarini" <stefano.lattarini@gmail.com>
To: autoconf-commit@gnu.org
Subject: [SCM] GNU Autoconf source repository branch, master,
	updated. v2.68-103-gd1b31ac
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 17ea0df46f819a9b64c21151983a5c5b8561fefb
X-Git-Newrev: d1b31ac57cc069527d037f3291e643813ce0bd69
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: autoconf-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: autoconf-patches@gnu.org
List-Id: Commits to the Autoconf git repository <autoconf-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf-commit>
List-Post: <mailto:autoconf-commit@gnu.org>
List-Help: <mailto:autoconf-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Dec 2011 10:34:13 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=d1b31ac57cc069527d037f3291e643813ce0bd69

The branch, master has been updated
       via  d1b31ac57cc069527d037f3291e643813ce0bd69 (commit)
      from  17ea0df46f819a9b64c21151983a5c5b8561fefb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d1b31ac57cc069527d037f3291e643813ce0bd69
Author: Stefano Lattarini <stefano.lattarini@gmail.com>
Date:   Sat Dec 24 16:43:36 2011 +0100

    docs: issue with shell functions and here-documents on Solaris
    
    * doc/autoconf.texi (Here-Documents): Using a command substitution
    in a here-documents being fed to a shell function is unportable.
    
    Problem revealed by the automake testsuite:
    <http://lists.gnu.org/archive/html/automake-patches/2011-12/msg00149.html>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    8 ++++++++
 doc/autoconf.texi |   13 +++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 25799b2..8eaf0d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	docs: issue with shell functions and here-documents on Solaris
+	* doc/autoconf.texi (Here-Documents): Using a command substitution
+	in a here-documents being fed to a shell function is unportable.
+	Problem revealed by the automake testsuite:
+	<http://lists.gnu.org/archive/html/automake-patches/2011-12/msg00149.html>
+
 2011-12-26  Paul Eggert  <eggert@cs.ucla.edu>
 
 	AS_LN_S: fall back on 'cp -pR' (not 'cp -p') if 'ln -s' fails
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 0354dfb..4c89750 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -15239,6 +15239,19 @@ bash-2.04$ @kbd{cat <<EOF
 @end group
 @end example
 
+Using command substitutions in a here-document that is fed to a shell
+function is not portable.  For example, with Solaris 10 @command{/bin/sh}:
+
+@example
+$ @kbd{kitty () @{ cat; @}}
+$ @kbd{kitty <<EOF
+> `echo ok`
+> EOF}
+/tmp/sh199886: cannot open
+$ @kbd{echo $?}
+1
+@end example
+
 Some shells mishandle large here-documents: for example,
 Solaris 10 @command{dtksh} and the UnixWare 7.1.1 Posix shell, which are
 derived from Korn shell version M-12/28/93d, mishandle braced variable


hooks/post-receive
-- 
GNU Autoconf source repository


From MAILER-DAEMON Mon Dec 26 16:21:11 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RfHyp-0007Cw-Sc
	for mharc-autoconf-commit@gnu.org; Mon, 26 Dec 2011 16:21:11 -0500
Received: from eggs.gnu.org ([140.186.70.92]:46406)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RfHyn-0007CQ-7m
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 16:21:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RfHyk-0004fU-Tm
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 16:21:09 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50850)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RfHyk-0004fQ-Li
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 16:21:06 -0500
Received: from slattarini by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1RfHyk-0006Ws-59
	for autoconf-commit@gnu.org; Mon, 26 Dec 2011 21:21:06 +0000
Date: Mon, 26 Dec 2011 21:21:06 +0000
Message-Id: <E1RfHyk-0006Ws-59@vcs.savannah.gnu.org>
From: "Stefano Lattarini" <stefano.lattarini@gmail.com>
To: autoconf-commit@gnu.org
Subject: [SCM] GNU Autoconf source repository branch, master,
	updated. v2.68-106-gb583202
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d1b31ac57cc069527d037f3291e643813ce0bd69
X-Git-Newrev: b5832028b6d3ad087f60a72d9484b94fd6c49a2a
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: autoconf-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: autoconf-patches@gnu.org
List-Id: Commits to the Autoconf git repository <autoconf-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf-commit>
List-Post: <mailto:autoconf-commit@gnu.org>
List-Help: <mailto:autoconf-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf-commit>,
	<mailto:autoconf-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Dec 2011 21:21:11 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=b5832028b6d3ad087f60a72d9484b94fd6c49a2a

The branch, master has been updated
       via  b5832028b6d3ad087f60a72d9484b94fd6c49a2a (commit)
       via  eee6c2224d2f494682ff63f681800811a1aac3f7 (commit)
       via  8fb1aafa0d81175f3ca27ed7ed2e0532c8af9902 (commit)
      from  d1b31ac57cc069527d037f3291e643813ce0bd69 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b5832028b6d3ad087f60a72d9484b94fd6c49a2a
Author: Stefano Lattarini <stefano.lattarini@gmail.com>
Date:   Mon Dec 26 10:27:51 2011 +0100

    configure: will re-execute with $CONFIG_SHELL, if it's set
    
    * lib/m4sugar/general.m4 (_AS_DETECT_BETTER_SHELL): Define the macro
    `_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to `yes', so that the code in
    `_AS_DETECT_BETTER_SHELL' will cause autoconf-generated configure
    scripts to always re-execute themselves with $CONFIG_SHELL, if it's
    set in the environment.
    * doc/autoconf.texi (config.status Invocation): Update.
    * doc/install.texi (Defining Variables): Likewise.
    * NEWS: Likewise.
    * tests/m4sh.at: Add tests for the new semantics in ...
    (Configure re-execs self with CONFIG_SHELL): ... this new
    test group.

commit eee6c2224d2f494682ff63f681800811a1aac3f7
Author: Stefano Lattarini <stefano.lattarini@gmail.com>
Date:   Mon Dec 26 10:06:18 2011 +0100

    m4sh: allow forced re-execution with $CONFIG_SHELL, if it's set
    
    * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): If the m4sh client
    has defined the macro `_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to
    "yes", emit code to always re-execute the current script with
    $CONFIG_SHELL, if that's set.
    * tests/m4sh.at: Add tests for the new and old semantics, in ...
    (Re-exec with CONFIG_SHELL, Forced re-exec with CONFIG_SHELL): ...
    these new test groups.

commit 8fb1aafa0d81175f3ca27ed7ed2e0532c8af9902
Author: Stefano Lattarini <stefano.lattarini@gmail.com>
Date:   Mon Dec 26 10:06:18 2011 +0100

    m4sh: refactor _AS_DETECT_BETTER_SHELL, for future changes
    
    * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Move code to
    handle the re-execution of the shell ...
    (_AS_REEXEC_WITH_SHELL): ... in this new macro.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |   33 ++++++++++++++
 NEWS                    |    3 +
 doc/autoconf.texi       |   11 ++---
 doc/install.texi        |    6 +-
 lib/autoconf/general.m4 |    3 +
 lib/m4sugar/m4sh.m4     |   63 ++++++++++++++++++++------
 tests/m4sh.at           |  114 +++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 208 insertions(+), 25 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8eaf0d7..0826f00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2011-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	configure: will re-execute with $CONFIG_SHELL, if it's set
+	* lib/m4sugar/general.m4 (_AS_DETECT_BETTER_SHELL): Define the macro
+	`_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to `yes', so that the code in
+	`_AS_DETECT_BETTER_SHELL' will cause autoconf-generated configure
+	scripts to always re-execute themselves with $CONFIG_SHELL, if it's
+	set in the environment.
+	* doc/autoconf.texi (config.status Invocation): Update.
+	* doc/install.texi (Defining Variables): Likewise.
+	* NEWS: Likewise.
+	* tests/m4sh.at: Add tests for the new semantics in ...
+	(Configure re-execs self with CONFIG_SHELL): ... this new
+	test group.
+
+2011-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	m4sh: allow forced re-execution with $CONFIG_SHELL, if it's set
+	* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): If the m4sh client
+	has defined the macro `_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to
+	"yes", emit code to always re-execute the current script with
+	$CONFIG_SHELL, if that's set.
+	* tests/m4sh.at: Add tests for the new and old semantics, in ...
+	(Re-exec with CONFIG_SHELL, Forced re-exec with CONFIG_SHELL): ...
+	these new test groups.
+
+2011-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	m4sh: refactor _AS_DETECT_BETTER_SHELL, for future changes
+	* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Move code to
+	handle the re-execution of the shell ...
+	(_AS_REEXEC_WITH_SHELL): ... in this new macro.
+
 2011-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
 	docs: issue with shell functions and here-documents on Solaris
diff --git a/NEWS b/NEWS
index daec256..2de5d2f 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ GNU Autoconf NEWS - User visible changes.
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Autoconf-generated configure scripts now unconditionally re-execute
+   themselves with $CONFIG_SHELL, if that's set in the environment.
+
 ** The texinfo documentation no longer specifies "front-cover" or
    "back-cover" texts, so that it may now be included in Debian's
    "main" section.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 4c89750..0f068e5 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -22646,13 +22646,10 @@ can alter its behavior:
 @anchor{CONFIG_SHELL}
 @defvar CONFIG_SHELL
 @evindex CONFIG_SHELL
-The shell with which to run @command{configure} for the @option{--recheck}
-option.  It must be Bourne-compatible.  The default is a shell that
-supports @code{LINENO} if available, and @file{/bin/sh} otherwise.
-Invoking @command{configure} by hand bypasses this setting, so you may
-need to use a command like @samp{CONFIG_SHELL=/bin/bash /bin/bash ./configure}
-to insure that the same shell is used everywhere.  The absolute name of the
-shell should be passed.
+The shell with which to run @command{configure}.  It must be
+Bourne-compatible, and the absolute name of the shell should be passed.
+The default is a shell that supports @code{LINENO} if available, and
+@file{/bin/sh} otherwise.
 @end defvar
 
 @defvar CONFIG_STATUS
diff --git a/doc/install.texi b/doc/install.texi
index d397b8a..c6a8bdf 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -364,11 +364,11 @@ overridden in the site shell script).
 
 @noindent
 Unfortunately, this technique does not work for @env{CONFIG_SHELL} due
-to an Autoconf bug.  Until the bug is fixed you can use this
-workaround:
+to an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
 
 @example
-CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
 @end example
 
 @node configure Invocation
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index dd20e71..b2a7d94 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1386,6 +1386,9 @@ m4_pattern_forbid([^LIBOBJS$],
 		  [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
 # Actually reserved by M4sh.
 m4_pattern_allow([^AS_FLAGS$])
+# So that the autoconf-generated scripts will always re-execute
+# themselves with $CONFIG_SHELL, if that's set in the environment.
+m4_define([_AS_FORCE_REEXEC_WITH_CONFIG_SHELL], [yes])
 AS_INIT[]dnl
 AS_PREPARE[]dnl
 m4_divert_push([KILL])
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 7195618..2bffee8 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -192,6 +192,28 @@ m4_define([_AS_DETECT_SUGGESTED_PRUNE],
 #
 # This code is run outside any trap 0 context, hence we can simplify AS_EXIT.
 m4_defun([_AS_DETECT_BETTER_SHELL],
+dnl
+dnl By default, do not force re-execution of the script just because
+dnl the user has pre-set $CONFIG_SHELL; do so only if the m4sh client has
+dnl defined the internal variable `_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to
+dnl "yes".
+dnl FIXME: This interface is acceptable for the moment, as a private,
+dnl FIXME: internal one; but if we want to make the "always re-execute"
+dnl FIXME: feature public, we should find a better interface!
+[m4_if(_AS_FORCE_REEXEC_WITH_CONFIG_SHELL, [yes],
+  [# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    _AS_REEXEC_WITH_SHELL([$CONFIG_SHELL])
+  fi
+  # We don't want this to propagate to other subprocesses.
+  dnl This might be especially important in case an m4sh-generated script
+  dnl is used to later execute other m4sh-generated scripts.  This happens
+  dnl for example in autoconf's own testsuite (and happens *a lot* there,
+  dnl in fact).
+  AS_UNSET([_as_can_reexec])
+])]dnl
 dnl Remove any tests from suggested that are also required
 [m4_set_map([_AS_DETECT_SUGGESTED_BODY], [_AS_DETECT_SUGGESTED_PRUNE])]dnl
 [m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])]dnl
@@ -223,21 +245,8 @@ dnl Remove any tests from suggested that are also required
 	     [CONFIG_SHELL=$SHELL as_have_required=yes])])
 
       AS_IF([test "x$CONFIG_SHELL" != x],
-	[# We cannot yet assume a decent shell, so we have to provide a
-	# neutralization value for shells without unset; and this also
-	# works around shells that cannot unset nonexistent variables.
-	# Preserve -v and -x to the replacement shell.
-	BASH_ENV=/dev/null
-	ENV=/dev/null
-	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-	export CONFIG_SHELL
-	case $- in @%:@ ((((
-	  *v*x* | *x*v* ) as_opts=-vx ;;
-	  *v* ) as_opts=-v ;;
-	  *x* ) as_opts=-x ;;
-	  * ) as_opts= ;;
-	esac
-	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$[@]"}])
+            [export CONFIG_SHELL
+             _AS_REEXEC_WITH_SHELL([$CONFIG_SHELL])])
 
 dnl Unfortunately, $as_me isn't available here.
     AS_IF([test x$as_have_required = xno],
@@ -263,6 +272,30 @@ CLICOLOR_FORCE= GREP_OPTIONS=
 unset CLICOLOR_FORCE GREP_OPTIONS
 _m4_popdef([AS_EXIT])])# _AS_DETECT_BETTER_SHELL
 
+# _AS_REEXEC_WITH_SHELL(SHELL)
+# ----------------------------
+# Re-execute the current script with the given shell, trying to preserve
+# portable settings (e.g., the `xtrace' and `verbose' shell flag).
+m4_defun([_AS_REEXEC_WITH_SHELL], [dnl
+# We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in @%:@ ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $1 $as_opts "$as_myself" ${1+"$[@]"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+AS_ECHO(["$[]0: could not re-execute with $1"]) >&2
+AS_EXIT([255])])# _AS_REEXEC_WITH_SHELL
+
 
 # _AS_PREPARE
 # -----------
diff --git a/tests/m4sh.at b/tests/m4sh.at
index a5ef905..ba8991a 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -17,6 +17,120 @@ AT_BANNER([M4sh.])
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+## --------------------------- ##
+## Re-exec with CONFIG_SHELL.  ##
+## --------------------------- ##
+
+AT_SETUP([No extra re-exec with CONFIG_SHELL])
+AT_KEYWORDS([CONFIG_SHELL])
+AT_DATA_M4SH([script.as],
+[[
+dnl We have to muck with internal details to goad the script into
+dnl thinking that the default shell is always good enough.
+m4_define([_AS_DETECT_REQUIRED_BODY], [])dnl
+m4_define([_AS_DETECT_SUGGESTED_BODY], [])dnl
+AS_INIT
+echo foo > ok
+]])
+AT_CHECK_M4SH
+AT_CHECK([CONFIG_SHELL=/bin/false ./script], [0], [], [])
+AT_CHECK([test -f ok], [0])
+rm -f ok
+
+AT_CLEANUP
+
+AT_SETUP([Forced re-exec with CONFIG_SHELL])
+AT_KEYWORDS([CONFIG_SHELL])
+
+AT_DATA_M4SH([script.as],
+[[m4_define([_AS_FORCE_REEXEC_WITH_CONFIG_SHELL], [yes])
+AS_INIT
+echo foo > sentinel
+]])
+AT_CHECK_M4SH
+
+AT_DATA([fake-shell],
+[[#!/bin/sh
+echo 'Fake shell executed.'
+shift # fake shell
+echo "nargs = @S|@#"
+for i
+do
+  printf ' :%s:\n' "$i"
+done
+]])
+chmod a+x fake-shell
+
+AT_CHECK([CONFIG_SHELL=./fake-shell ./script 1 2 4 8], [0],
+[Fake shell executed.
+nargs = 4
+ :1:
+ :2:
+ :4:
+ :8:
+], [])
+AT_CHECK([test ! -f sentinel], [0])
+test ! -f sentinel || rm -f sentinel # Cleanup for next test.
+
+AT_CHECK(
+[CONFIG_SHELL=`pwd`/fake-shell sh script a 'b  c' '  d   	e '],
+[0],
+[Fake shell executed.
+nargs = 3
+ :a:
+ :b  c:
+ :  d   	e :
+], [])
+AT_CHECK([test ! -f sentinel], [0])
+test ! -f sentinel || rm -f sentinel # Cleanup for next test.
+
+AT_CHECK([(PATH=`pwd`:$PATH; export PATH;
+CONFIG_SHELL=fake-shell script '' '&' '!;*' '<($[]@%:@)>,' 'x
+y  z
+1 2 3')], [0],
+[Fake shell executed.
+nargs = 5
+ ::
+ :&:
+ :!;*:
+ :<($[]@%:@)>,:
+ :x
+y  z
+1 2 3:
+], [])
+AT_CHECK([test ! -f sentinel], [0])
+test ! -f sentinel || rm -f sentinel # Cleanup for next test.
+
+AT_CLEANUP
+
+AT_SETUP([Configure re-execs self with CONFIG_SHELL])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+echo foobar >> quux
+]])
+
+AT_CHECK_AUTOCONF
+
+AT_DATA([cfg-sh],
+[[#!/bin/sh
+: > cfg-sh-has-run
+exec sh "@S|@@"
+]])
+chmod a+x cfg-sh
+
+AT_CAPTURE_FILE([config.log])
+AT_CHECK([env CONFIG_SHELL=./cfg-sh ./configure], [0], [], [])
+# ./configure re-executed itself.
+AT_CHECK([test -f cfg-sh-has-run], [0])
+# And did that not to cause extra execution of later commands.
+AT_CHECK([cat quux], [0], [foobar
+], [])
+
+rm -f quux cfg-sh*
+AT_CLEANUP
+
+
 ## ------------------- ##
 ## AS_WARN, AS_ERROR.  ##
 ## ------------------- ##


hooks/post-receive
-- 
GNU Autoconf source repository


