ext/iconv/extconf.rb in iconv-0.1 vs ext/iconv/extconf.rb in iconv-1.0.0
- old
+ new
@@ -5,10 +5,11 @@
conf = File.exist?(File.join($srcdir, "config.charset"))
conf = with_config("config-charset", enable_config("config-charset", conf))
if have_func("iconv", "iconv.h") or
have_library("iconv", "iconv", "iconv.h")
+ check_signedness("size_t")
if checking_for("const of iconv() 2nd argument") do
create_tmpsrc(cpp_include("iconv.h") + "---> iconv(cd,0,0,0,0) <---")
src = xpopen(cpp_command("")) {|f|f.read}
if !(func = src[/^--->\s*(\w+).*\s*<---/, 1])
Logging::message "iconv function name not found"
@@ -21,10 +22,12 @@
/\bconst\b/ =~ second
end
end
$defs.push('-DICONV_INPTR_CONST')
end
+ have_func("iconvlist", "iconv.h")
+ have_func("__iconv_free_list", "iconv.h")
if conf
prefix = '$(srcdir)'
prefix = $nmake ? "{#{prefix}}" : "#{prefix}/"
if $extout
wrapper = "$(RUBYARCHDIR)/iconv.rb"
@@ -38,14 +41,14 @@
else
conf = "$(srcdir)/config.charset"
end
$cleanfiles << wrapper
end
- create_makefile("iconv")
+ create_makefile("iconv/iconv")
if conf
open("Makefile", "a") do |mf|
mf.print("\nall: #{wrapper}\n\n#{wrapper}: #{prefix}charset_alias.rb")
mf.print(" ", conf) unless scheme
mf.print("\n\t$(RUBY) $(srcdir)/charset_alias.rb #{conf} $@\n")
end
end
-end
\ No newline at end of file
+end