From 160a9f79ef3f106786a3a97552e23a0fd840899f Mon Sep 17 00:00:00 2001 From: eban Date: Tue, 4 Jun 2002 09:52:28 +0000 Subject: * ext/Win32API/extconf.rb: refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/Win32API/extconf.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ext/Win32API/extconf.rb') 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 -- cgit v1.2.3