35
35
AS_AC_EXPAND(LIBDIR, $libdir)
36
36
AS_AC_EXPAND(BINDIR, $bindir)
37
37
AS_AC_EXPAND(INCLUDEDIR, $includedir)
38
AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
39
38
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
40
39
AS_AC_EXPAND(DATADIR, $datadir)
41
40
AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
47
46
[lxc configuration repository path]
48
47
)], [], [with_config_path="${localstatedir}/lib/lxc"])
49
AC_ARG_WITH([rootfs-path],
51
[--with-rootfs-path=dir],
52
[lxc rootfs mount point]
53
)], [], [with_rootfs_path="${libdir}/lxc/rootfs"])
50
55
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
51
57
AS_AC_EXPAND(LXCPATH, "${with_config_path}")
58
AS_AC_EXPAND(LXCROOTFSMOUNT, "${with_rootfs_path}")
59
AS_AC_EXPAND(LXCINITDIR, $libdir/lxc)
60
AS_AC_EXPAND(LXCTEMPLATEDIR, $libdir/lxc/templates)
52
61
AH_TEMPLATE([LXCPATH], [lxc configuration repository])
53
AH_TEMPLATE([LXCLIBEXECDIR], [lxc executable library path])
62
AH_TEMPLATE([LXCINITDIR], [lxc-init directory location])
63
AH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point])
54
64
AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
55
AC_DEFINE_UNQUOTED(LXCLIBEXECDIR, "$LIBEXECDIR")
65
AC_DEFINE_UNQUOTED(LXCINITDIR, "$LXCINITDIR")
66
AC_DEFINE_UNQUOTED(LXCROOTFSMOUNT, "$LXCROOTFSMOUNT")
57
68
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
59
AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
60
[#include <sys/socket.h>
70
AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
71
[#include <sys/socket.h>
63
74
AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
64
75
[#include <sys/types.h>
65
76
#include <sys/capability.h>])
77
AC_CHECK_LIB(cap,cap_set_proc,caplib=yes,caplib=no)
78
AC_MSG_CHECKING([linux capabilities])
79
if test "x$caplib" = "xyes" ; then
81
AC_MSG_RESULT([$CAP_LIBS])
83
AC_MSG_ERROR([not found])
67
87
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
68
88
AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])