#!/usr/bin/env ruby

require "mkmf"

if !find_library( "ltdl", "lt_dlinit", "/usr/lib", "/usr/local/lib" )

  puts
  puts( "Oops, the Libltdl library from the libtool package, which is used by mcrypt," )
  puts( "seems not to be installed on this machine!" )
  puts( "You can get the library from http://www.gnu.org/software/libtool/libtool.html" )
  puts

  exit( 1 )

end

if have_header( "mcrypt.h" ) and
  find_library( "mcrypt", "mcrypt_module_open", "/usr/lib", "/usr/local/lib" )

  create_makefile( "MCrypt" )

else

  puts
  puts( "Oops, the mcrypt library seems not to be installed on this machine!" )
  puts( "You can get the library from http://mcrypt.hellug.gr/" )
  puts

end

#
# EOF
#
