]> git.ipfire.org Git - thirdparty/qemu.git/commit
configure: Fix shell syntax to placate OpenBSD's pdksh
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 14 Dec 2015 15:02:36 +0000 (15:02 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 15 Mar 2016 17:19:47 +0000 (12:19 -0500)
commit52a7b27947a909286bf7ea13335e8400f8adb4b3
tree25dcb64bbadd85db5ea1aed29f788b7ab75bba92
parentd4aed70099429161b2842135217553e822f86988
configure: Fix shell syntax to placate OpenBSD's pdksh

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
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1450105357-8516-1-git-send-email-peter.maydell@linaro.org
(cherry picked from commit 18f49881cf8359e89396aac12f5d3cf3f8a632ba)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
configure