From f96d07f4ec4193fb5293d7ac8f1324aac3c3ea07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Wed, 25 Jan 2017 15:11:23 +0200
Subject: [PATCH] configure: Add quotes around a variable which might be empty
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If we only have a target compiler but no host compiler, the $type
variable will be empty once.

(Currently we fail to do a cross build if no host compiler is available
due to using the host compiler for processing option lists though.
But despite that, this comparison in configure needs quotes.)

Signed-off-by: Martin Storsjö <martin@martin.st>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index f1867532a03..7570c0a3888 100755
--- a/configure
+++ b/configure
@@ -5033,7 +5033,7 @@ fi
 for pfx in "" host_; do
     varname=${pfx%_}cc_type
     eval "type=\$$varname"
-    if [ $type = "msvc" ]; then
+    if [ "$type" = "msvc" ]; then
         check_${pfx}cc <<EOF || add_${pfx}cflags -Dinline=__inline
 static inline int foo(int a) { return a; }
 EOF
-- 
GitLab