]> git.proxmox.com Git - mirror_lxc.git/blame - configure.ac
Add utility u16 get/put
[mirror_lxc.git] / configure.ac
CommitLineData
5e97c3fc 1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
8f0a524d 4AC_INIT([lxc], [0.6.4])
5e97c3fc 5
f8dafdbb 6AC_CONFIG_SRCDIR([configure.ac])
5e97c3fc 7AC_CONFIG_AUX_DIR([config])
8AM_CONFIG_HEADER([src/config.h])
9AM_INIT_AUTOMAKE([-Wno-portability])
10AC_CANONICAL_HOST
5e97c3fc 11AM_PROG_CC_C_O
12AC_GNU_SOURCE
e90b6974 13AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
5c8f9bd8
AN
14
15AC_ARG_ENABLE([doc],
16 [AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
17 [], [enable_doc=auto])
18
19if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
20 AC_CHECK_PROG(have_docbook, [docbook2man], [yes], [no])
21
22 test "x$have_docbook" = "xno" -a "x$enable_doc" = "xyes" && \
23 AC_MSG_ERROR([docbook2man required by man request, but not found])
24fi
25
26AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
27
3fb0a9bb
AN
28AC_ARG_ENABLE([examples],
29 [AC_HELP_STRING([--disable-examples], [do not install configuration examples])],
30 [], [enable_examples=yes])
31
32AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
33
b6345ba1
DL
34AS_AC_EXPAND(PREFIX, $prefix)
35AS_AC_EXPAND(LIBDIR, $libdir)
7ad641d5 36AS_AC_EXPAND(BINDIR, $bindir)
b6345ba1 37AS_AC_EXPAND(INCLUDEDIR, $includedir)
a25ba7aa 38AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
7ad641d5 39AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
3eae9733 40AS_AC_EXPAND(DATADIR, $datadir)
7ad641d5 41AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
0f71d073 42AS_AC_EXPAND(DOCDIR, $docdir)
805415fc 43
aef4ebcf
AN
44AC_ARG_WITH([config-path],
45 [AC_HELP_STRING(
46 [--with-config-path=dir],
47 [lxc configuration repository]
48 )], [], [with_config_path="${localstatedir}/lib/lxc"])
49
50AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
51AS_AC_EXPAND(LXCPATH, "${with_config_path}")
881450bb
DL
52AH_TEMPLATE([LXCPATH], [lxc configuration repository])
53AH_TEMPLATE([LXCLIBEXECDIR], [lxc executable library path])
54AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
55AC_DEFINE_UNQUOTED(LXCLIBEXECDIR, "$LIBEXECDIR")
56
90e0a869
GT
57AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
58 [],
59 AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
60 [#include <sys/socket.h>
61 ])
35f549fe 62
63AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
ddceb1f9
DL
64[#include <sys/types.h>
65#include <sys/capability.h>])
35f549fe 66
656994bb
MH
67# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
68AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
69
ff218c25 70AC_CHECK_HEADERS([sys/signalfd.h])
71
5e97c3fc 72AC_PROG_GCC_TRADITIONAL
73
74if test "x$GCC" = "xyes"; then
8642237a 75 CFLAGS="$CFLAGS -Wall"
5e97c3fc 76fi
77
78AC_CONFIG_FILES([
79 Makefile
b6345ba1 80 lxc.pc
5e97c3fc 81 lxc.spec
82 config/Makefile
d823d5b9 83
84 doc/Makefile
85 doc/lxc-create.sgml
86 doc/lxc-destroy.sgml
87 doc/lxc-execute.sgml
88 doc/lxc-start.sgml
89 doc/lxc-stop.sgml
b0a33c1e 90 doc/lxc-console.sgml
d823d5b9 91 doc/lxc-freeze.sgml
92 doc/lxc-unfreeze.sgml
93 doc/lxc-monitor.sgml
94 doc/lxc-wait.sgml
95 doc/lxc-ls.sgml
96 doc/lxc-ps.sgml
b0e505c9 97 doc/lxc-cgroup.sgml
8a67a2b2 98 doc/lxc.conf.sgml
8b8b04f8 99 doc/lxc.sgml
10fba81b 100 doc/common_options.sgml
99e4008c 101 doc/see_also.sgml
d823d5b9 102
0f71d073
DL
103 doc/examples/Makefile
104 doc/examples/lxc-macvlan.conf
105 doc/examples/lxc-no-netns.conf
106 doc/examples/lxc-empty-netns.conf
107 doc/examples/lxc-phys.conf
108 doc/examples/lxc-veth.conf
109 doc/examples/lxc-complex-config
110
c9844b87 111 scripts/Makefile
112 scripts/lxc-debian
54b1eb68 113 scripts/lxc-fedora
c9844b87 114 scripts/lxc-sshd
115
5e97c3fc 116 src/Makefile
5e97c3fc 117 src/lxc/Makefile
118 src/lxc/lxc-ps
d823d5b9 119 src/lxc/lxc-ls
9d0195cb 120 src/lxc/lxc-netstat
237315ff
DL
121 src/lxc/lxc-checkconfig
122 src/lxc/lxc-setcap
bcd952a1 123 src/lxc/lxc-version
ab2d32f8
DL
124 src/lxc/lxc-create
125 src/lxc/lxc-destroy
c9844b87 126
5e97c3fc 127])
128AC_CONFIG_COMMANDS([default],[[]],[[]])
129AC_OUTPUT
805415fc 130
131if test "x$SETCAP" = "xno"; then
f8dafdbb 132 AC_MSG_NOTICE([
805415fc 133
134Warning:
135--------
136
87476557
FG
137The setcap binary was not found. This means the tools to set the
138privilege for the lxc commands are not available, that's ok, but you
139will need to run these commands as root or install libcap-2.
805415fc 140
141])
142
143else
144
f8dafdbb 145 AC_MSG_NOTICE([
805415fc 146
147Advice:
148-------
149
87476557 150If you wish to have a non root user to use the lxc tools,
237315ff
DL
151you can add the needed capabilities to the tools by invoking
152the 'lxc-setcap' script. To remove the capabilities, use
87476557 153'lxc-setcap -d'.
805415fc 154])
155
156fi