aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--ext/Win32API/extconf.rb11
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index bf10dfab0f..2c12d6188d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@ Tue Jun 4 18:28:37 2002 WATANABE Hirofumi <eban@ruby-lang.org>
* ext/socket/extconf.rb: The IPv6 stack of Cygwin is still incomplete.
+ * ext/Win32API/extconf.rb: refactoring.
+
Tue Jun 4 00:45:50 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* ext/socket/addrinfo.h: typo.
diff --git a/ext/Win32API/extconf.rb b/ext/Win32API/extconf.rb
index 5e42f62558..b69459c275 100644
--- a/ext/Win32API/extconf.rb
+++ b/ext/Win32API/extconf.rb
@@ -1,7 +1,8 @@
-case RUBY_PLATFORM
-when /cygwin/,/mingw/
- $CFLAGS = "-fno-defer-pop -fno-omit-frame-pointer"
- create_makefile("Win32API")
-when /win32/
+require 'mkmf'
+
+if have_library("kernel32")
+ if Config::CONFIG["CC"] =~ /gcc/
+ $CFLAGS += "-fno-defer-pop -fno-omit-frame-pointer"
+ end
create_makefile("Win32API")
end