base: use --host as target, not uname
authorSergei Trofimovich <slyfox@gentoo.org>
Wed, 13 Feb 2013 20:25:24 +0000 (23:25 +0300)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 14 Feb 2013 10:50:11 +0000 (10:50 +0000)
Fixed bootstrap failure on linux for --target=mingw32

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
libraries/base/configure.ac

index b679520..7553a7a 100644 (file)
@@ -5,17 +5,23 @@ AC_CONFIG_SRCDIR([include/HsBase.h])
 
 AC_CONFIG_HEADERS([include/HsBaseConfig.h include/EventConfig.h])
 
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
 AC_ARG_WITH([cc],
             [C compiler],
             [CC=$withval])
 AC_PROG_CC()
 
-case `uname -s` in
-    MINGW*|CYGWIN*)
+AC_MSG_CHECKING(for WINDOWS platform)
+case $host in
+    *mingw32*|*cygwin*)
         WINDOWS=YES;;
     *)
         WINDOWS=NO;;
 esac
+AC_MSG_RESULT($WINDOWS)
 
 # do we have long longs?
 AC_CHECK_TYPES([long long])