From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8595 invoked from network); 23 Oct 2006 10:03:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Oct 2006 10:03:43 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 9046 invoked from network); 23 Oct 2006 10:03:36 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Oct 2006 10:03:36 -0000 Received: (qmail 25998 invoked by alias); 23 Oct 2006 10:03:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22897 Received: (qmail 25988 invoked from network); 23 Oct 2006 10:03:32 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Oct 2006 10:03:32 -0000 Received: (qmail 8743 invoked from network); 23 Oct 2006 10:03:32 -0000 Received: from fw.sigpipe.cz (HELO isis.sigpipe.cz) (62.245.70.224) by a.mx.sunsite.dk with SMTP; 23 Oct 2006 10:03:30 -0000 Received: from dagan.sigpipe.cz (dagan.sigpipe.cz [10.9.8.90]) by isis.sigpipe.cz (Postfix) with ESMTP id 2EB9B1F87BF0; Mon, 23 Oct 2006 12:03:29 +0200 (CEST) Received: by dagan.sigpipe.cz (Postfix, from userid 1001) id 476162C912C; Mon, 23 Oct 2006 12:04:25 +0000 (UTC) Date: Mon, 23 Oct 2006 12:04:25 +0000 From: Roman Neuhauser To: Helmut Jarausch Cc: zsh-workers@sunsite.dk Subject: Re: expert help sought [offtopic] Message-ID: <20061023120425.GA49995@dagan.sigpipe.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) # jarausch@igpm.rwth-aachen.de / 2006-10-23 08:55:47 +0200: > I am desparately in need for help on the following piece of > code within a 'configure' file. > It's run under '/bin/sh' which is a symlink to '/bin/bash' > but I known that real experts are reading this mailing list. > > The following code fails in the 2nd line with > syntax error near unexpected token `(' > ../htmlwidget2/configure: line 4957: ` case `(ac_space=' '; set | grep ac_space) 2>&1` in' My experience from porting FreeBSD's periodic(8) to RedHat suggests that bash can't parse quite a bit of valid POSIX sh syntax, it loves to get lost in parentheses and subshells. Try moving the subshell into a separate statement. > here are the lines 4956 ff > > (set) 2>&1 | > case `(ac_space=' '; set | grep ac_space) 2>&1` in > *ac_space=\ *) > # `set' does not quote correctly, so add quotes (double-quote substitution > # turns \\\\ into \\, and sed turns \\ into \). > sed -n \ > -e "s/'/'\\\\''/g" \ > -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" > ;; > *) > # `set' quotes correctly as required by POSIX, so do not add quotes. > sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' > ;; > esac >> confcache > > I admit I don't really understand what's going on and even what's meant > to be going on. The code is meant to write config.cache. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991