Sha256: a088943273e0d94eeabfac211ea499fea5110d499473c3f247bfad412fe3803f

Contents?: true

Size: 901 Bytes

Versions: 1

Compression:

Stored size: 901 Bytes

Contents

#!/usr/bin/ruby

require 'rubygems'
require 'mkrf'

def crash(str)
  printf(" extconf failure: %s\n", str)
  exit 1
end

Mkrf::Generator.new('xmlparser') do |g|
  if g.include_header('expat.h', '/opt/include','/usr/local/include','/usr/include')
    g.include_library('expat',function='XML_ParserCreate', '/opt/lib', '/usr/local/lib', '/usr/lib')
  elsif g.include_header('libxmltok', '/opt/include','/usr/local/include','/usr/include')
    g.include_library('xmltok', function='XML_ParserCreate', '/opt/lib', '/usr/local/lib', '/usr/lib')
  end
  if g.has_function?("XML_SetNotStandaloneHandler")
    #g.cflags << ' -DNEW_EXPAT'
    g.add_define('NEW_EXPAT')
  end
  if g.has_function?("XML_SetParamEntityParsing")
    #g.cflags << ' -DXML_DTD'
    g.add_define('XML_DTD')
  end

  #g.include_library("socket", function="ntohl")
  g.include_library("wsock32") if RUBY_PLATFORM =~ /mswin32|mingw/
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xmlparser-0.6.81 ext/xmlparser/mkrf_conf.rb