ext/xml/extconf.rb in libxml-ruby-0.3.8 vs ext/xml/extconf.rb in libxml-ruby-0.3.8.2
- old
+ new
@@ -34,17 +34,19 @@
crash('need libm')
end
$CFLAGS = saveflags
end
-unless have_library('z', 'inflate')
+unless have_library('z', 'inflate') or
+ have_library('zlib1', 'inflate')
crash('need zlib')
else
$defs.push('-DHAVE_ZLIB_H')
end
unless have_library('iconv','iconv_open') or
+ have_library('iconv','libiconv_open') or
have_library('c','iconv_open') or
have_library('recode','iconv_open') or
have_library('iconv')
crash(<<EOL)
need libiconv.
@@ -57,13 +59,15 @@
--with-iconv-include=/path/to/iconv/include
EOL
end
unless (have_library('xml2', 'xmlParseDoc') or
+ have_library('libxml2', 'xmlParseDoc') or
find_library('xml2', '/opt/lib', '/usr/local/lib', '/usr/lib')) and
(have_header('libxml/xmlversion.h') or
- find_header('libxml/xmlversion.h',
+ find_header('libxml/xmlversion.h',
+ "#{CONFIG['prefix']}/include",
'/opt/include/libxml2',
'/usr/local/include/libxml2',
'/usr/include/libxml2'))
crash(<<EOL)
need libxml2.
@@ -87,9 +91,9 @@
if try_compile('int main() { return 0; }','-Wall')
$CFLAGS << ' -Wall'
end
$CFLAGS << ' ' << $INCFLAGS
-$INSTALLFILES = [["../xml/libxml.rb", "$(RUBYLIBDIR)", "../xml"]]
+$INSTALLFILES = [["libxml.rb", "$(RUBYLIBDIR)", "../xml"]]
create_header()
create_makefile('xml/libxml_so')