summaryrefslogtreecommitdiff
path: root/configure.ac
blob: b6d320970920ed21268b68f114b807715d2876c6 (plain)
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
# Process this file with autoconf to produce a configure script.
AC_INIT(jailer, 1.2, nielsen@memberwebs.com)
AM_INIT_AUTOMAKE(jailer, 1.2)

AC_CONFIG_SRCDIR([src/jailer.c])
AM_CONFIG_HEADER([config.h])

case `uname -r` in
5.*)
	echo "FreeBSD 5.x detected"
	AC_DEFINE(NO_CONSOLE, 1, [Virtual jail console support disabled])
	;;
esac

# Checks for programs.
AC_PROG_CC

# Checks for libraries.
AC_CHECK_LIB([kvm], [kvm_open], ,
		["ERROR: This software is applicable to FreeBSD only."] )
AC_CHECK_LIB([c], [jail], ,
		["ERROR: This software requires the jail functionality of FreeBSD."] )

# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h syslog.h unistd.h limits.h sys/file.h sys/param.h paths.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM

# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([dup2 gethostname strerror atexit setproctitle select])

AC_CONFIG_FILES([Makefile src/Makefile scripts/Makefile])
AC_OUTPUT