ext/extconf.rb
branchmahlon-misc
changeset 12 5fd07a9e7e7b
parent 10 b1426511fb64
equal deleted inserted replaced
11:e908d309e7ec 12:5fd07a9e7e7b
     1 #!/usr/bin/env ruby
     1 #!/usr/bin/env ruby
       
     2 # vim: set nosta noet ts=4 sw=4:
     2 
     3 
     3 require 'mkmf'
     4 require 'mkmf'
     4 require 'fileutils'
     5 require 'fileutils'
     5 
     6 
     6 ADDITIONAL_LIBRARY_DIRS = %w[
     7 ADDITIONAL_LIBRARY_DIRS = %w[
    19 def fail( *messages )
    20 def fail( *messages )
    20 	$stderr.puts( *messages )
    21 	$stderr.puts( *messages )
    21 	exit( 1 )
    22 	exit( 1 )
    22 end
    23 end
    23 
    24 
       
    25 dir_config( 'bsd/jail' )
    24 
    26 
    25 dir_config( 'bsdjail' )
    27 have_header( 'stdio.h' )	or fail "Can't find the stdio.h header."
       
    28 have_header( 'sys/param.h' )	or fail "Can't find the sys/param.h header."
       
    29 have_header( 'sys/jail.h' )	or fail "Can't find the sys/jail.h header."
       
    30 have_header( 'sys/types.h' )	or fail "Can't find the sys/types.h header."
       
    31 have_header( 'sys/sysctl.h' )	or fail "Can't find the sys/sysctl.h header."
       
    32 have_header( 'arpa/inet.h' )	or fail "Can't find the arpa/inet.h header."
       
    33 have_header( 'errno.h' )	or fail "Can't find the arpa/inet.h header."
       
    34 have_header( 'unistd.h' )	or fail "Can't find the unistd.h header."
    26 
    35 
    27 have_header( 'stdio.h' ) 		or fail "Can't find the stdio.h header."
    36 have_func( "jail" )        or fail "Can't find jail() in the stdlib."
    28 have_header( 'sys/param.h' ) 	or fail "Can't find the sys/param.h header."
    37 have_func( "jail_attach" ) or fail "Can't find jail_attach() in the stdlib."
    29 have_header( 'sys/jail.h' ) 	or fail "Can't find the sys/jail.h header."
       
    30 have_header( 'sys/types.h' ) 	or fail "Can't find the sys/types.h header."
       
    31 have_header( 'unistd.h' ) 		or fail "Can't find the unistd.h header."
       
    32 
    38 
    33 have_func( "jail_attach" )		or fail "Can't find jail_attach in the stdlib."
    39 create_makefile( 'bsd/jail' )
    34 
    40 
    35 create_makefile( 'bsdjail' )
       
    36