require 'mkmf'

def err(*s)
    $stderr.puts "#{s}"
    exit 1
end

err "Yaz does not seem to be installed" unless system("yaz-config")
err "Yaz ZOOM header not available" unless have_header("yaz/zoom.h")

$CFLAGS << " #{`yaz-config --cflags`} "
$LDFLAGS << " #{`yaz-config --libs`} "

create_makefile("zoom", "src")
