1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# Process this file with autoconf to produce a configure script.
AC_INIT(jailutils, 0.5.4, nielsen@memberwebs.com)
AM_INIT_AUTOMAKE(jailutils, 0.5.4)
AC_CONFIG_SRCDIR([src/killjail.c])
AM_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
# Debug mode
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[Compile binaries in debug mode]))
if test "$enable_debug" = "yes"; then
CFLAGS="$CFLAGS -g -O0"
AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
echo "enabling debug compile mode"
fi
# Checks for libraries.
AC_CHECK_LIB([kvm], [kvm_open], ,
[ echo "ERROR: Must have FreeBSD 4.x or higher"; exit 1])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([syslog.h path.h fcntl.h limits.h sys/param.h])
# Check for jail stuff and figure out jail capabilities
AC_CHECK_LIB([c], [jail], ,
[ echo "ERROR: Must have jail capabilities (FreeBSD 4.x or higher)"; exit 1])
AC_CHECK_LIB([c], [jail_attach],
[ JAIL_ATTACH=yes; ], )
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_TYPE_OFF_T
# Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([strerror strstr memmove])
AC_FUNC_MALLOC
AC_STRUCT_TM
if test "$JAIL_ATTACH" = "yes"; then
SRC_SUB=srcx
else
SRC_SUB=src
fi
AC_SUBST([SRC_SUB])
AC_CONFIG_FILES([Makefile src/Makefile srcx/Makefile])
AC_OUTPUT
|