From xemacs-m  Sat Apr  5 17:38:26 1997
Received: from mailbox2.ucsd.edu (mailbox2.ucsd.edu [132.239.1.54])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id RAA22564
	for <xemacs-beta@xemacs.org>; Sat, 5 Apr 1997 17:38:25 -0600 (CST)
Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by mailbox2.ucsd.edu (8.8.5/8.6.9) with SMTP id PAA25825 for <xemacs-beta@xemacs.org>; Sat, 5 Apr 1997 15:38:25 -0800 (PST)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id PAA24611; Sat, 5 Apr 1997 15:40:04 -0800
Sender: dmoore@sdnp5.ucsd.edu
To: XEmacs Beta Mailing List <xemacs-beta@xemacs.org>
Subject: configure patch
X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L
Mail-Copies-To: never
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: multipart/mixed;
 boundary="Multipart_Sat_Apr__5_15:40:03_1997-1"
Content-Transfer-Encoding: 7bit
From: David Moore <dmoore@ucsd.edu>
Date: 05 Apr 1997 16:40:03 -0700
Message-ID: <rvsp15t4x8.fsf@sdnp5.ucsd.edu>
Lines: 71
X-Mailer: Gnus v5.4.40/XEmacs 20.1(beta11)

--Multipart_Sat_Apr__5_15:40:03_1997-1
Content-Type: text/plain; charset=US-ASCII


Patch to fix up how we generate $quoted_arguments, in the possibility
that the user has ' somewhere in an argument.  And also uses this form
for the Installation file.

Since autoconf is building the config.status goop, it's harder to fix
that.  So I guess I'll just wait until we go to the latest autoconf,
which might already do this right.



--Multipart_Sat_Apr__5_15:40:03_1997-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="configure.diff"
Content-Transfer-Encoding: 7bit

--- configure.in.orig	Sat Apr  5 15:37:16 1997
+++ configure.in	Sat Apr  5 15:37:53 1997
@@ -359,9 +359,12 @@
 ### Shell Magic: Quote the quoted arguments in ARGUMENTS.  At a later date,
 ### in order to get the arguments back in $@, we have to do an
 ###  `eval set x "$quoted_arguments"; shift'.
+### We use sed to turn embedded ' into '"'"'.  I truly hate sh's quoting.
+quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
 quoted_arguments=
 for i in "$@"; do
-   quoted_arguments="$quoted_arguments '$i'"
+   quoted_i="`echo $i | sed $quoted_sed_magic`"
+   quoted_arguments="$quoted_arguments '$quoted_i'"
 done
 
 ### Don't use shift -- that destroys the argument list, which autoconf needs
@@ -3217,7 +3220,7 @@
 (
 echo "uname -a: `uname -a`" 
 echo "" 
-echo "$0 $configure_args" 
+echo "$0 $quoted_arguments" 
 ) >> Installation
 # Start stdout redirection to '| tee -a Installation'
 (
--- configure.orig	Sat Apr  5 15:37:16 1997
+++ configure	Sat Apr  5 15:37:53 1997
@@ -343,9 +343,12 @@
 ### Shell Magic: Quote the quoted arguments in ARGUMENTS.  At a later date,
 ### in order to get the arguments back in $@, we have to do an
 ###  `eval set x "$quoted_arguments"; shift'.
+### We use sed to turn embedded ' into '"'"'.  I truly hate sh's quoting.
+quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
 quoted_arguments=
 for i in "$@"; do
-   quoted_arguments="$quoted_arguments '$i'"
+   quoted_i="`echo $i | sed $quoted_sed_magic`"
+   quoted_arguments="$quoted_arguments '$quoted_i'"
 done
 
 ### Don't use shift -- that destroys the argument list, which autoconf needs
@@ -7048,7 +7051,7 @@
 (
 echo "uname -a: `uname -a`" 
 echo "" 
-echo "$0 $configure_args" 
+echo "$0 $quoted_arguments" 
 ) >> Installation
 # Start stdout redirection to '| tee -a Installation'
 (

--Multipart_Sat_Apr__5_15:40:03_1997-1--

