On 12/14/2015 08:02 AM, 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 <peter.mayd...@linaro.org> > --- > 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.
Can OpenBSD users do: /path/to/bash ./configure to work around it? That, and the fact that we went an entire release cycle without a report of a problem, means few developers are even attempting OpenBSD builds. So, I would argue that as a non-regression, and where there is a likely workaround of using a different shell, this can wait until 2.6. > > 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 At any rate, Reviewed-by: Eric Blake <ebl...@redhat.com> > echo "libtasn1 $tasn1" > echo "VTE support $vte" > echo "curses support $curses" > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature