Sha256: bf1ef5ef64a05ba40f6018bf96ae589001ade908e9f8c2456de007d58135cd46

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

#!/usr/bin/ruby -w
# See the LICENSE file for copyright and distribution information

require "mkmf"

$LIBPATH.push(Config::CONFIG['libdir'])

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

#dir_config('xml2')

#unless have_library('m', 'atan')
#  crash('need libm')
#end

#unless have_library("z", "inflate")
#  crash("need zlib")
#else
#  $defs.push('-DHAVE_ZLIB_H')
#end

if dir_config( "xml2" ) != [nil, nil]
   inc, lib = dir_config( 'xml2' ) 
   $LDFLAGS << " -L#{lib} -lxml2 -lz -lpthread -liconv -lm"
   $CFLAGS << " -I#{inc}"
elsif ex = find_executable( "xml2-config" )
   $LDFLAGS << ' ' + `#{ex} --libs`.chomp
   $CFLAGS << ' ' + `#{ex} --cflags`.chomp
else
  crash(<<EOL)
need libxml2.

        Install the library or try one of the following options to extconf.rb:

        --with-xml2-lib=/path/to/libxml2/lib
        --with-xml2-include=/path/to/libxml2/include
EOL
end

puts "compile with : "
puts "  CFLAGS = #{$CFLAGS}"
puts "  LDFLAGS = #{$LDFLAGS}"
puts

$CFLAGS = '-g -Wall ' + $CFLAGS

create_header()
create_makefile("xml/xpath")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-xpath-0.4.0 ext/xpath/extconf.rb