2005-02-04 08:35:37 -05:00
|
|
|
require 'mkmf'
|
|
|
|
|
* mkconfig.rb: generate RbConfig instead of Config.
* instruby.rb, rubytest.rb, runruby.rb, bcc32/Makefile.sub,
ext/extmk.rb, ext/dl/extconf.rb, ext/iconv/charset_alias.rb,
lib/mkmf.rb, lib/rdoc/ri/ri_paths.rb,
lib/webrick/httpservlet/cgihandler.rb,
test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb,
test/ruby/envutil.rb, test/soap/calc/test_calc_cgi.rb,
test/soap/header/test_authheader_cgi.rb, test/soap/ssl/test_ssl.rb,
win32/mkexports.rb, win32/resource.rb: Use RbConfig instead of
Config.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-20 03:34:53 -05:00
|
|
|
if( RbConfig::CONFIG['CC'] =~ /gcc/ )
|
2005-02-04 08:35:37 -05:00
|
|
|
$CFLAGS << " -fno-defer-pop -fno-omit-frame-pointer"
|
|
|
|
end
|
|
|
|
|
|
|
|
$INSTALLFILES = [
|
2007-06-09 23:06:15 -04:00
|
|
|
["dl.h", "$(HDRDIR)"],
|
2005-02-04 08:35:37 -05:00
|
|
|
]
|
2005-10-17 22:03:50 -04:00
|
|
|
$distcleanfiles << "callback.h"
|
2005-10-17 22:01:24 -04:00
|
|
|
|
2005-02-04 08:35:37 -05:00
|
|
|
|
|
|
|
check = true
|
|
|
|
if( have_header("dlfcn.h") )
|
|
|
|
have_library("dl")
|
|
|
|
check &&= have_func("dlopen")
|
|
|
|
check &&= have_func("dlclose")
|
|
|
|
check &&= have_func("dlsym")
|
|
|
|
have_func("dlerror")
|
|
|
|
elsif( have_header("windows.h") )
|
|
|
|
check &&= have_func("LoadLibrary")
|
|
|
|
check &&= have_func("FreeLibrary")
|
|
|
|
check &&= have_func("GetProcAddress")
|
|
|
|
else
|
|
|
|
check = false
|
|
|
|
end
|
|
|
|
|
2008-08-30 12:55:34 -04:00
|
|
|
$objs = %w[
|
|
|
|
cfunc.o dl.o cptr.o handle.o
|
|
|
|
callback-0.o callback-1.o callback-2.o callback-3.o
|
|
|
|
callback-4.o callback-5.o callback-6.o callback-7.o
|
|
|
|
callback-8.o
|
|
|
|
]
|
|
|
|
|
2007-08-08 06:20:08 -04:00
|
|
|
if check
|
2007-06-09 23:06:15 -04:00
|
|
|
$defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"]
|
2005-02-04 08:35:37 -05:00
|
|
|
create_makefile("dl")
|
|
|
|
end
|