From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Vc4-0004kV-Qt for qemu-devel@nongnu.org; Mon, 14 Dec 2015 11:04:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8Vbz-0005jc-6J for qemu-devel@nongnu.org; Mon, 14 Dec 2015 11:04:36 -0500 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:33347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Vbz-0005jQ-0O for qemu-devel@nongnu.org; Mon, 14 Dec 2015 11:04:31 -0500 Received: by mail-wm0-x22d.google.com with SMTP id n186so53053251wmn.0 for ; Mon, 14 Dec 2015 08:04:30 -0800 (PST) Sender: Paolo Bonzini References: <1450105357-8516-1-git-send-email-peter.maydell@linaro.org> From: Paolo Bonzini Message-ID: <566EE881.4070906@redhat.com> Date: Mon, 14 Dec 2015 17:04:17 +0100 MIME-Version: 1.0 In-Reply-To: <1450105357-8516-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.5??] configure: Fix shell syntax to placate OpenBSD's pdksh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: patches@linaro.org On 14/12/2015 16:02, Peter Maydell wrote: > Unfortunately the OpenBSD pdksh does not like brackets inside > the right part of a ${variable+word} parameter expansion: > > $ echo "${a+($b)}" > ksh: ${a+($b)}": bad substitution > > though both bash and dash accept them. In any case this line > was causing odd output in the case where nettle is not present: > nettle no () > > (because if nettle is not present then $nettle will be "no", > not a null string or unset). > > Rewrite it to just use an if. > > This bug was originally introduced in becaeb726 and was present > in the 2.4.0 release. > > Fixes: https://bugs.launchpad.net/qemu/+bug/1525682 > Reported-by: Dmitrij D. Czarkoff > Signed-off-by: Peter Maydell > --- > This fixes a problem where configure just falls over on OpenBSD, > but on the other hand it is not a regression since 2.4.0... > Opinions on whether we should put it in 2.5 as a last minute > thing welcome. Harmless enough that it shouldn't warrant an extra rc. Paolo > configure | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index b9552fd..6ca6c64 100755 > --- a/configure > +++ b/configure > @@ -4758,7 +4758,11 @@ echo "GTK GL support $gtk_gl" > echo "GNUTLS support $gnutls" > echo "GNUTLS hash $gnutls_hash" > echo "libgcrypt $gcrypt" > -echo "nettle $nettle ${nettle+($nettle_version)}" > +if test "$nettle" = "yes"; then > + echo "nettle $nettle ($nettle_version)" > +else > + echo "nettle $nettle" > +fi > echo "libtasn1 $tasn1" > echo "VTE support $vte" > echo "curses support $curses" >