Allow specifying host independently of cross-prefix

This is useful when crosscompiling QEMU using Clang.

Change-Id: I170b1017a1068a789a477b0ec2f797eccfd9ec00
diff --git a/configure b/configure
index 7c40ce2..d320367 100755
--- a/configure
+++ b/configure
@@ -280,6 +280,7 @@
 interp_prefix="/usr/gnemul/qemu-%M"
 static="no"
 cross_prefix=""
+host=""
 audio_drv_list=""
 block_drv_rw_whitelist=""
 block_drv_ro_whitelist=""
@@ -517,6 +518,8 @@
   ;;
   --source-path=*) source_path="$optarg"
   ;;
+  --host=*) host="$optarg"
+  ;;
   --cpu=*) cpu="$optarg"
   ;;
   --extra-cflags=*) QEMU_CFLAGS="$QEMU_CFLAGS $optarg"
@@ -945,6 +948,8 @@
   ;;
   --cross-prefix=*)
   ;;
+  --host=*)
+  ;;
   --cc=*)
   ;;
   --host-cc=*) host_cc="$optarg"
@@ -2773,8 +2778,8 @@
 
     if test -n "$cross_prefix"
     then
-	host=$(libgcrypt-config --host)
-	if test "$host-" != $cross_prefix
+	libgcrypt_host=$(libgcrypt-config --host)
+	if test "$libgcrypt_host-" != $cross_prefix
 	then
 	    return 1
 	fi
@@ -6983,6 +6988,8 @@
 fi
 if test "$cross_prefix" != ""; then
   echo "AUTOCONF_HOST := --host=${cross_prefix%-}"     >> $config_host_mak
+elif test "$host" != ""; then
+  echo "AUTOCONF_HOST := --host=${host%-}"             >> $config_host_mak
 else
   echo "AUTOCONF_HOST := "                             >> $config_host_mak
 fi