#!/usr/local/bin/ruby -w # $Id: extconf.rb,v 1.1.1.1 2006/03/09 01:36:20 roscopeco Exp $ # # See the LICENSE file for copyright and distribution information require "mkmf" $preload = nil $LIBPATH.push(Config::CONFIG['libdir']) def crash(str) print(" extconf failure: %s\n", str) exit 1 end dir_config('xml2') dir_config('xslt') #dir_config('libxml-ruby', '../../../libxml', '../../../libxml/ext/xml') unless have_library('m', 'atan') # try again for gcc 4.0 saveflags = $CFLAGS $CFLAGS += ' -fno-builtin' unless have_library('m', 'atan') crash('need libm') end $CFLAGS = saveflags end unless have_library("z", "inflate") crash("need zlib") else $defs.push('-DHAVE_ZLIB_H') end unless (have_library('xml2', 'xmlXPtrNewRange') or find_library('xml2', '/opt/lib', '/usr/local/lib', '/usr/lib')) and (have_header('libxml/xmlversion.h') or find_header('libxml/xmlversion.h', '/opt/include/libxml2', '/usr/local/include/libxml2', '/usr/include/libxml2')) crash(<