ext/extconf.rb
changeset 3 7f6da371e2ce
child 5 41a1542b3b10
equal deleted inserted replaced
2:0c24586f579a 3:7f6da371e2ce
       
     1 #!/usr/bin/env ruby
       
     2 
       
     3 require 'mkmf'
       
     4 require 'fileutils'
       
     5 
       
     6 ADDITIONAL_LIBRARY_DIRS = %w[
       
     7 	/usr/local/lib
       
     8 	/opt/lib
       
     9 	/opt/local/lib
       
    10 ]
       
    11 ADDITIONAL_INCLUDE_DIRS = %w[
       
    12 	/usr/local/include
       
    13 	/opt/include
       
    14 	/opt/local/include
       
    15 ]
       
    16 
       
    17 $CFLAGS << ' -Wall' << ' -ggdb' << ' -DDEBUG'
       
    18 
       
    19 def fail( *messages )
       
    20 	$stderr.puts( *messages )
       
    21 	exit( 1 )
       
    22 end
       
    23 
       
    24 
       
    25 dir_config( 'bsdjail' )
       
    26 
       
    27 have_header( "sys/param.h" ) or fail "Can't find the sys/param.h header."
       
    28 have_header( "sys/jail.h" )  or fail "Can't find the sys/jail.h header."
       
    29 
       
    30 have_func( "jail_attach" )   or fail "Can't find jail_attach in the stdlib."
       
    31 
       
    32 create_makefile( 'bsdjail' )
       
    33