require 'mkmf'

dir_config 'pdflib'

# for ruby-1.7
print "checking for new allocation framework... "
STDOUT.flush
if Object.respond_to? :allocate
  print "yes\n"
  $defs << "-DHAVE_OBJECT_ALLOCATE"
else
  print "no\n"
end

if have_header("pdflib.h") &&
    have_library("z", "inflate") &&
    have_library("jpeg", "jpeg_CreateDecompress") &&
    have_library("tiff", "TIFFOpen") &&
    have_library("png", "png_init_io") &&
    have_library("pdf", "PDF_boot")
  create_makefile "pdflib"
end
