Detect Windows operating system in ./configure
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 6 Mar 2014 17:41:59 +0000 (18:41 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 6 Mar 2014 21:31:57 +0000 (14:31 -0700)
We should not rely on `uname -s` if we ever want cross-compiling to
work, so detect _WIN32.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
configure

index 7b1d79a458a7cadcde21e821e19c34f11d7f9386..63aa02ddf6a42d53121407588a97830a454ef82a 100755 (executable)
--- a/configure
+++ b/configure
@@ -184,6 +184,8 @@ elif check_define __OpenBSD__ ; then
 elif check_define __sun__ ; then
   targetos='SunOS'
   CFLAGS="$CFLAGS -D_REENTRANT"
+elif check_define _WIN32 ; then
+  targetos='CYGWIN'
 else
   targetos=`uname -s`
 fi