summaryrefslogtreecommitdiff
path: root/ext/Win32API
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Win32API')
-rw-r--r--ext/Win32API/extconf.rb11
1 files changed, 6 insertions, 5 deletions
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