From 08b08e081b3fcf4b68ddcd5396caf6eac4d2e9f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Thu, 24 Nov 2011 12:22:40 +0100
Subject: [PATCH] (EMULATOR): Set for cross compilation only.

Rev: nettle/ChangeLog:1.234
Rev: nettle/configure.ac:1.50
---
 ChangeLog    |  2 +-
 configure.ac | 19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6ec1af26..3fd0d507 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,7 +9,7 @@
 	environment of run-tests.
 
 	* configure.ac (EMULATOR): New substituted variable. Set to wine
-	or wine64 when compiling for windows, otherwise empty.
+	or wine64 when cross compiling for windows, otherwise empty.
 
 	* config.make.in (EMULATOR): Set from autoconf value.
 
diff --git a/configure.ac b/configure.ac
index 6b6ddf36..3849947c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -273,15 +273,16 @@ case "$host_os" in
         LIBHOGWEED_FORLINK='cyghogweed-$(LIBHOGWEED_MAJOR)-$(LIBHOGWEED_MINOR).dll'
         ;;
     esac
-    # FIXME: Support native compilation using mingw on windows.
-    case "$ABI" in
-    64)
-        EMULATOR=wine64
-        ;;
-    *)
-        EMULATOR=wine
-        ;;
-    esac
+    if test "x$cross_compiling" = xyes ; then
+	case "$ABI" in
+	    64)
+		EMULATOR=wine64
+		;;
+	    *)
+		EMULATOR=wine
+		;;
+	esac
+    fi
     LIBNETTLE_SONAME=''
     LIBNETTLE_FILE='libnettle.dll.a'
     LIBNETTLE_FILE_SRC='$(LIBNETTLE_FILE)'
-- 
GitLab