1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/iconv/extconf.rb
nobu 3b1e7ac785 * ext/iconv/charset_alias.rb, ext/iconv/extconf.rb: make wrapper
script which maps charset names.  [ruby-dev:20625]

* ext/iconv/iconv.c (charset_map): charset name map.

* ext/iconv/iconv.c (iconv_dfree): no exception while
  finalization.

* ext/iconv/iconv.c (iconv_s_conv): new method Iconv.conv.
  [ruby-dev:20588]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-18 19:51:42 +00:00

29 lines
785 B
Ruby

require 'mkmf'
dir_config("iconv")
conf = File.exist?(File.join($srcdir, "config.charset"))
conf = with_config("config-charset", enable_config("config-charset", conf))
if have_header("iconv.h")
have_library("iconv")
if conf
prefix = '$(srcdir)'
prefix = $nmake ? "{#{prefix}}" : "#{prefix}/"
$INSTALLFILES = [["./iconv.rb", "$(RUBYLIBDIR)"]]
if String === conf
require 'uri'
scheme = URI.parse(conf).scheme
else
conf = prefix + "config.charset"
end
end
create_makefile("iconv")
if conf
open("Makefile", "a") do |mf|
mf.print("\nall: iconv.rb\n\niconv.rb: ", prefix, "charset_alias.rb")
mf.print(" ", conf) unless scheme
mf.print("\n\t$(RUBY) ", prefix, "charset_alias.rb ", conf, " $@\n")
end
end
end