diff -r 4c51ebe6e9b6 -r b1426511fb64 ext/extconf.rb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ext/extconf.rb Thu Dec 25 07:33:20 2008 +0000 @@ -0,0 +1,36 @@ +#!/usr/bin/env ruby + +require 'mkmf' +require 'fileutils' + +ADDITIONAL_LIBRARY_DIRS = %w[ + /usr/local/lib + /opt/lib + /opt/local/lib +] +ADDITIONAL_INCLUDE_DIRS = %w[ + /usr/local/include + /opt/include + /opt/local/include +] + +$CFLAGS << ' -Wall' << ' -ggdb' << ' -DDEBUG' + +def fail( *messages ) + $stderr.puts( *messages ) + exit( 1 ) +end + + +dir_config( 'bsdjail' ) + +have_header( 'stdio.h' ) or fail "Can't find the stdio.h header." +have_header( 'sys/param.h' ) or fail "Can't find the sys/param.h header." +have_header( 'sys/jail.h' ) or fail "Can't find the sys/jail.h header." +have_header( 'sys/types.h' ) or fail "Can't find the sys/types.h header." +have_header( 'unistd.h' ) or fail "Can't find the unistd.h header." + +have_func( "jail_attach" ) or fail "Can't find jail_attach in the stdlib." + +create_makefile( 'bsdjail' ) +