Skip to contentSkip to conversation

configure: Fix incorrect string comparison operator

PATCH In review Peter Maydell 3 participants 4 messages Jan 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Fix incorrect string comparison operator

In commit c97d6d2cdf97ed we accidentally added code to configure that uses '==' for string equality testing. This is a bashism -- the portable way to write this is '='.

This fixes the "Unexpected operator error" complaint produced if the system /bin/sh is dash.

---
As an aside, it's annoying that this doesn't make configure fail; otherwise it wouldn't have got through my build tests.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 56f9716..6a04082 100755
@@ -5076,7 +5076,7 @@ fi
 
 #################################################
 # Check to see if we have the Hypervisor framework
-if [ "$darwin" == "yes" ] ; then
+if [ "$darwin" = "yes" ] ; then
   cat > $TMPC << EOF
 #include <Hypervisor/hv.h>
 int main() { return 0;}
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Peter Maydell

In commit c97d6d2cdf97ed we accidentally added code to configure that uses '==' for string equality testing. This is a bashism -- the portable way to write this is '='.

This fixes the "Unexpected operator error" complaint produced if the system /bin/sh is dash.

Quoted 6 lines

---
As an aside, it's annoying that this doesn't make configure fail; otherwise it wouldn't have got through my build tests.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
Reviewed-by Tested-by on v1 1/1
#2 lore raw
In reply to Peter Maydell
Quoted 6 lines · Peter Maydell

In commit c97d6d2cdf97ed we accidentally added code to configure that uses '==' for string equality testing. This is a bashism -- the portable way to write this is '='.

This fixes the "Unexpected operator error" complaint produced if the system /bin/sh is dash.

Thanks :)

Quoted 4 lines
Quoted 21 lines

---
As an aside, it's annoying that this doesn't make configure fail; otherwise it wouldn't have got through my build tests.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 56f9716..6a04082 100755
@@ -5076,7 +5076,7 @@ fi
 
 #################################################
 # Check to see if we have the Hypervisor framework
-if [ "$darwin" == "yes" ] ; then
+if [ "$darwin" = "yes" ] ; then
   cat > $TMPC << EOF
 #include <Hypervisor/hv.h>
 int main() { return 0;}
author Applied
#3 lore raw
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Peter Maydell

In commit c97d6d2cdf97ed we accidentally added code to configure that uses '==' for string equality testing. This is a bashism -- the portable way to write this is '='.

This fixes the "Unexpected operator error" complaint produced if the system /bin/sh is dash.

Thanks :)

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

Applied to master, thanks.

-- PMM