equal
deleted
inserted
replaced
|
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( '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( 'unistd.h' ) or fail "Can't find the unistd.h header." |
|
32 |
|
33 have_func( "jail_attach" ) or fail "Can't find jail_attach in the stdlib." |
|
34 |
|
35 create_makefile( 'bsdjail' ) |
|
36 |