]>
Commit | Line | Data |
---|---|---|
f756a350 | 1 | AC_PREREQ([2.69]) |
5e97c3fc | 2 | |
c40aa8c8 | 3 | m4_define([lxc_devel], 1) |
a8565bb4 SG |
4 | m4_define([lxc_version_major], 4) |
5 | m4_define([lxc_version_minor], 0) | |
6 | m4_define([lxc_version_micro], 0) | |
5b66b6ee | 7 | m4_define([lxc_version_beta], []) |
26419a7a SG |
8 | |
9 | m4_define([lxc_abi_major], 1) | |
a8565bb4 | 10 | m4_define([lxc_abi_minor], 7) |
26419a7a SG |
11 | m4_define([lxc_abi_micro], 0) |
12 | m4_define([lxc_abi], [lxc_abi_major.lxc_abi_minor.lxc_abi_micro]) | |
9588a6ce SH |
13 | |
14 | m4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro]) | |
15 | m4_define([lxc_version], | |
8465a7f4 | 16 | [ifelse(lxc_devel, 1, |
5f98011c SG |
17 | ifelse(lxc_version_beta, [], [lxc_version_base], [lxc_version_base.lxc_version_beta])-devel, |
18 | ifelse(lxc_version_beta, [], [lxc_version_base], [lxc_version_base.lxc_version_beta]))]) | |
9588a6ce | 19 | |
d12860c0 | 20 | AC_INIT([lxc],[lxc_version]) |
ddb93593 SG |
21 | |
22 | # We need pkg-config | |
23 | PKG_PROG_PKG_CONFIG | |
24 | ||
9588a6ce SH |
25 | AC_SUBST(LXC_VERSION_BASE, lxc_version_base) |
26 | AC_SUBST(LXC_VERSION_BETA, lxc_version_beta) | |
5e97c3fc | 27 | |
a22185dd ÇO |
28 | AC_SUBST([LXC_VERSION_MAJOR], [lxc_version_major]) |
29 | AC_SUBST([LXC_VERSION_MINOR], [lxc_version_minor]) | |
30 | AC_SUBST([LXC_VERSION_MICRO], [lxc_version_micro]) | |
31 | AC_SUBST([LXC_VERSION], [lxc_version]) | |
d2d6b991 | 32 | AC_SUBST([LXC_DEVEL], [lxc_devel]) |
a22185dd | 33 | |
26419a7a SG |
34 | AC_SUBST([LXC_ABI_MAJOR], [lxc_abi_major]) |
35 | AC_SUBST([LXC_ABI_MINOR], [lxc_abi_minor]) | |
36 | AC_SUBST([LXC_ABI_MICRO], [lxc_abi_micro]) | |
37 | AC_SUBST([LXC_ABI], [lxc_abi]) | |
38 | ||
f8dafdbb | 39 | AC_CONFIG_SRCDIR([configure.ac]) |
5e97c3fc | 40 | AC_CONFIG_AUX_DIR([config]) |
067cfaeb | 41 | AC_CONFIG_HEADERS([src/config.h]) |
d007f8ab | 42 | AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects]) |
5e97c3fc | 43 | AC_CANONICAL_HOST |
5e97c3fc | 44 | AM_PROG_CC_C_O |
d12860c0 | 45 | AC_USE_SYSTEM_EXTENSIONS |
1aaf81c3 | 46 | AC_SYS_LARGEFILE |
5c8f9bd8 | 47 | |
9b5724cd CB |
48 | # Test if we have a new enough compiler. |
49 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
50 | #define GCC_VERSION \ | |
51 | (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) | |
52 | ||
53 | #define CLANG_VERSION \ | |
54 | (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) | |
55 | ||
218e8144 | 56 | #if GCC_VERSION < 40700 && CLANG_VERSION < 10000 |
9b5724cd CB |
57 | #error Sorry, your compiler is too old - please upgrade it |
58 | #endif | |
59 | ]])], [valid_compiler=yes], [valid_compiler=no]) | |
60 | if test "x$valid_compiler" = "xno"; then | |
61 | AC_MSG_ERROR([Sorry, your compiler is too old - please upgrade it]) | |
62 | fi | |
63 | ||
6d6bfd4f | 64 | AC_PROG_GCC_TRADITIONAL |
38718ccc | 65 | AC_PROG_CXX |
6d6bfd4f CB |
66 | AC_ENABLE_SHARED |
67 | AC_ENABLE_STATIC | |
68 | # Check binaries | |
69 | AC_PROG_SED | |
70 | case $CC in clang*) | |
71 | AC_CHECK_TOOL([AR], llvm-ar) | |
72 | AC_CHECK_TOOL([NM], llvm-nm) | |
73 | AC_CHECK_TOOL([OBJCOPY], llvm-objcopy) | |
74 | AC_CHECK_TOOL([RANLIB], llvm-ranlib) | |
75 | esac | |
76 | ||
26419a7a SG |
77 | # libtool |
78 | LT_INIT | |
79 | AC_SUBST([LIBTOOL_DEPS]) | |
80 | ||
8aa4885c SG |
81 | # Detect the distribution. This is used for the default configuration and |
82 | # for some distro-specific build options. | |
6f75ba0b | 83 | AC_MSG_CHECKING([host distribution]) |
b195038d | 84 | AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, redhatenterpriseserver, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, plamo, paldo, openmandriva, pardus, sparclinux, altlinux.])) |
5a15791e | 85 | if type lsb_release >/dev/null 2>&1 && test "z$with_distro" = "z"; then |
6f75ba0b | 86 | with_distro=`lsb_release -is` |
be2e4e54 | 87 | fi |
6f75ba0b DE |
88 | if test "z$with_distro" = "z"; then |
89 | AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat") | |
90 | AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle") | |
beabd0a2 | 91 | AC_CHECK_FILE(/etc/sparclinux-release,with_distro="sparclinux") |
164105f6 | 92 | AC_CHECK_FILE(/etc/centos-release,with_distro="centos") |
6f75ba0b DE |
93 | AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora") |
94 | AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse") | |
95 | AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo") | |
96 | AC_CHECK_FILE(/etc/debian_version,with_distro="debian") | |
97 | AC_CHECK_FILE(/etc/arch-release,with_distro="arch") | |
98 | AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware") | |
af2d9fad | 99 | AC_CHECK_FILE(/etc/plamo-version,with_distro="plamo") |
6f75ba0b | 100 | AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware") |
6e7e54d9 AK |
101 | AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="openmandriva") |
102 | AC_CHECK_FILE(/etc/mandriva-release,with_distro="openmandriva") | |
6f75ba0b | 103 | AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus") |
5c60f990 | 104 | AC_CHECK_FILE(/etc/altlinux-release,with_distro="altlinux") |
487ea5f6 | 105 | AC_CHECK_FILE(/etc/pld-release,with_distro="pld") |
6f75ba0b DE |
106 | fi |
107 | with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'` | |
108 | ||
beabd0a2 WC |
109 | if test "z$with_distro" = "zforsparc"; then |
110 | with_distro="sparclinux" | |
111 | fi | |
112 | ||
6f75ba0b DE |
113 | if test "z$with_distro" = "z"; then |
114 | with_distro="unknown" | |
115 | fi | |
116 | case $with_distro in | |
1c1bb85a | 117 | ubuntu|raspbian) |
0af99319 MW |
118 | distroconf=default.conf.lxcbr |
119 | distrosysconf="$sysconfdir/default" | |
6f75ba0b | 120 | ;; |
b195038d | 121 | redhat|redhatenterpriseserver|centos|fedora|oracle|oracleserver|sparclinux|altlinux|suse|opensuse*|plamo|pld) |
0af99319 MW |
122 | distroconf=default.conf.lxcbr |
123 | distrosysconf="$sysconfdir/sysconfig" | |
6f75ba0b DE |
124 | ;; |
125 | *) | |
3a647d58 | 126 | distroconf=default.conf.unknown |
0af99319 | 127 | distrosysconf="$sysconfdir/default" |
6f75ba0b DE |
128 | ;; |
129 | esac | |
130 | AC_MSG_RESULT([$with_distro]) | |
1c1bb85a | 131 | AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu" -o x"$with_distro" = "xraspbian"]) |
025f59ab | 132 | AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"]) |
be2e4e54 | 133 | |
d79067a7 DM |
134 | AC_CONFIG_LINKS([config/etc/default.conf:config/etc/${distroconf}]) |
135 | ||
420dfb59 DE |
136 | # Check for init system type |
137 | AC_MSG_CHECKING([for init system type]) | |
138 | AC_ARG_WITH([init-script], | |
f756a350 | 139 | [AS_HELP_STRING([--with-init-script@<:@=TYPE@<:@,TYPE,...@:>@@:>@], |
dc068290 | 140 | [Type(s) of init script to install: sysvinit, systemd, upstart, |
89f79f6b | 141 | distro @<:@default=distro@:>@])],[],[with_init_script=distro]) |
420dfb59 | 142 | case "$with_init_script" in |
420dfb59 DE |
143 | distro) |
144 | case $with_distro in | |
5c60f990 | 145 | fedora|altlinux|opensuse*) |
420dfb59 DE |
146 | init_script=systemd |
147 | ;; | |
b195038d | 148 | redhat|redhatenterpriseserver|oracle|oracleserver|sparclinux|plamo) |
dc068290 | 149 | init_script=sysvinit |
420dfb59 | 150 | ;; |
234f9815 | 151 | centos) |
152 | init_script=sysvinit,systemd | |
153 | ;; | |
82b47911 | 154 | debian|raspbian|ubuntu) |
882ab607 | 155 | init_script=upstart,systemd |
420dfb59 | 156 | ;; |
487ea5f6 ER |
157 | pld) |
158 | init_script=sysvinit,upstart,systemd | |
159 | ;; | |
420dfb59 | 160 | *) |
dc068290 SG |
161 | echo -n "Linux distribution init system unknown." |
162 | init_script= | |
420dfb59 DE |
163 | ;; |
164 | esac | |
165 | ;; | |
166 | *) | |
89f79f6b | 167 | init_script=$with_init_script |
420dfb59 DE |
168 | ;; |
169 | esac | |
89f79f6b DE |
170 | |
171 | # Check valid init systems were given, run in subshell so we don't mess up IFS | |
172 | (IFS="," ; for init_sys in $init_script; | |
173 | do | |
174 | case "$init_sys" in | |
dc068290 | 175 | none|sysvinit|systemd|upstart) |
89f79f6b DE |
176 | ;; |
177 | *) | |
178 | exit 1 | |
179 | ;; | |
180 | esac | |
181 | done) || AC_MSG_ERROR([Unknown init system type in $init_script]) | |
182 | ||
dc068290 | 183 | AM_CONDITIONAL([INIT_SCRIPT_SYSV], [echo "$init_script" |grep -q "sysvinit"]) |
89f79f6b DE |
184 | AM_CONDITIONAL([INIT_SCRIPT_SYSTEMD], [echo "$init_script" |grep -q "systemd"]) |
185 | AM_CONDITIONAL([INIT_SCRIPT_UPSTART], [echo "$init_script" |grep -q "upstart"]) | |
420dfb59 DE |
186 | AC_MSG_RESULT($init_script) |
187 | ||
213b0fe0 MP |
188 | # systemd unit dir |
189 | AC_ARG_WITH([systemdsystemunitdir], | |
b2963bf9 CS |
190 | AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), |
191 | [with_systemdsystemunitdir=$withval], | |
192 | [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) | |
213b0fe0 MP |
193 | if test -z "$with_systemdsystemunitdir"; then |
194 | with_systemdsystemunitdir=/lib/systemd/system | |
195 | fi | |
196 | if test "x$with_systemdsystemunitdir" != "xno"; then | |
197 | AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir]) | |
198 | fi | |
199 | ||
e9f34eb4 | 200 | AC_ARG_ENABLE([werror], |
b2963bf9 CS |
201 | [AS_HELP_STRING([--disable-werror], [do not treat warnings as errors])], |
202 | [enable_werror=$enableval], [enable_werror=yes]) | |
e9f34eb4 | 203 | |
792a48b1 EV |
204 | AC_ARG_ENABLE([no_undefined], |
205 | [AS_HELP_STRING([--disable-no-undefined], [do not pass -Wl,--no-undefined])], | |
206 | [enable_no_undefined=$enableval], [enable_no_undefined=yes]) | |
207 | AM_CONDITIONAL([ENABLE_NO_UNDEFINED], [test "x$enable_no_undefined" = "xyes"]) | |
208 | ||
38718ccc EV |
209 | AC_ARG_ENABLE([fuzzers], |
210 | [AS_HELP_STRING([--enable-fuzzers], [compile with fuzzers])], | |
211 | [enable_fuzzers=$enableval], [enable_fuzzers=no]) | |
212 | AM_CONDITIONAL([ENABLE_FUZZERS], [test "x$enable_fuzzers" = "xyes"]) | |
213 | ||
214 | AM_CONDITIONAL([OSS_FUZZ], [test "x$LIB_FUZZING_ENGINE" != x]) | |
215 | ||
8aa4885c | 216 | # Allow disabling rpath |
1c41ddcb | 217 | AC_ARG_ENABLE([rpath], |
f756a350 | 218 | [AS_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])], |
b2963bf9 | 219 | [enable_rpath=$enableval], [enable_rpath=no]) |
1c41ddcb GK |
220 | AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"]) |
221 | ||
8aa4885c | 222 | # Documentation (manpages) |
5c8f9bd8 | 223 | AC_ARG_ENABLE([doc], |
f756a350 | 224 | [AS_HELP_STRING([--enable-doc], [make man pages [default=auto]])], |
b2963bf9 | 225 | [enable_doc=$enableval], [enable_doc=auto]) |
5c8f9bd8 AN |
226 | |
227 | if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then | |
7822022c | 228 | db2xman="" |
487ea5f6 | 229 | dbparsers="docbook2X2man docbook2x-man db2x_docbook2man docbook2man docbook-to-man" |
69fe23ff | 230 | |
7822022c | 231 | AC_MSG_CHECKING(for docbook2x-man) |
69fe23ff | 232 | for name in ${dbparsers}; do |
7822022c SG |
233 | if "$name" --help >/dev/null 2>&1; then |
234 | db2xman="$name" | |
235 | break; | |
236 | fi | |
237 | done | |
238 | ||
239 | if test -n "${db2xman}"; then | |
8aa4885c | 240 | AC_MSG_RESULT([${db2xman}]) |
f91d5e4e | 241 | enable_doc="yes" |
7822022c | 242 | else |
8aa4885c | 243 | AC_MSG_RESULT([no]) |
7822022c | 244 | if test "x$enable_doc" = "xyes"; then |
f91d5e4e | 245 | AC_MSG_ERROR([docbook2x-man is required, but could not be found]) |
7822022c | 246 | fi |
f91d5e4e | 247 | enable_doc="no" |
7822022c SG |
248 | fi |
249 | ||
250 | AC_SUBST(db2xman) | |
5c8f9bd8 | 251 | fi |
8aa4885c | 252 | AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$db2xman" != "x"]) |
7cb14f34 | 253 | AM_CONDITIONAL([USE_DOCBOOK2X], [test "x$db2xman" != "xdocbook2man"]) |
5c8f9bd8 | 254 | |
7f951458 DE |
255 | if test "x$db2xman" = "xdocbook2man"; then |
256 | docdtd="\"-//Davenport//DTD DocBook V3.0//EN\"" | |
257 | else | |
258 | docdtd="\"-//OASIS//DTD DocBook XML\" \"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\"" | |
259 | fi | |
260 | AC_SUBST(docdtd) | |
261 | ||
953e611c JH |
262 | # Documentation (API) |
263 | AC_ARG_ENABLE([api-docs], | |
b2963bf9 CS |
264 | [AS_HELP_STRING([--enable-api-docs], [make API documentation [default=auto]])], |
265 | [enable_api_docs=$enableval], [enable_api_docs=auto]) | |
953e611c JH |
266 | |
267 | if test "x$enable_api_docs" = "xyes" -o "x$enable_api_docs" = "xauto"; then | |
f91d5e4e SG |
268 | AC_CHECK_PROGS([HAVE_DOXYGEN],[doxygen]) |
269 | AC_SUBST([HAVE_DOXYGEN]) | |
270 | ||
271 | if test "x$HAVE_DOXYGEN" != "x"; then | |
272 | enable_api_docs="yes" | |
273 | else | |
274 | if test "x$enable_api_docs" = "xyes"; then | |
275 | AC_MSG_ERROR([doxygen is required, but could not be found]) | |
276 | fi | |
277 | enable_api_docs="no" | |
278 | fi | |
953e611c JH |
279 | fi |
280 | ||
f91d5e4e | 281 | AM_CONDITIONAL([ENABLE_API_DOCS], [test "x$HAVE_DOXYGEN" != "x"]) |
953e611c | 282 | |
fa2bb6ba SH |
283 | AC_CONFIG_MACRO_DIRS([config]) |
284 | ||
8aa4885c | 285 | # Apparmor |
e767dd55 | 286 | AC_ARG_ENABLE([apparmor], |
f756a350 | 287 | [AS_HELP_STRING([--enable-apparmor], [enable apparmor support [default=auto]])], |
b2963bf9 | 288 | [enable_apparmor=$enableval], [enable_apparmor=auto]) |
e767dd55 | 289 | |
f91d5e4e | 290 | if test "$enable_apparmor" = "auto" ; then |
e767dd55 SH |
291 | AC_CHECK_LIB([apparmor],[aa_change_profile],[enable_apparmor=yes], [enable_apparmor=no]) |
292 | fi | |
e767dd55 SH |
293 | AM_CONDITIONAL([ENABLE_APPARMOR], [test "x$enable_apparmor" = "xyes"]) |
294 | ||
fa2bb6ba SH |
295 | # OpenSSL |
296 | # libssl-dev | |
297 | AC_ARG_ENABLE([openssl], | |
f756a350 | 298 | [AS_HELP_STRING([--enable-openssl], [enable OpenSSL support [default=auto]])], |
b2963bf9 | 299 | [enable_openssl=$enableval], [enable_openssl=auto]) |
fa2bb6ba SH |
300 | |
301 | if test "$enable_openssl" = "auto" ; then | |
302 | AC_CHECK_LIB([ssl], [OPENSSL_init_ssl], [enable_openssl=yes], [enable_openssl=no]) | |
c8601571 | 303 | |
c8601571 | 304 | fi |
fa2bb6ba | 305 | AM_CONDITIONAL([ENABLE_OPENSSL], [test "x$enable_openssl" = "xyes"]) |
c8601571 | 306 | |
014a65ef CB |
307 | AC_ARG_ENABLE([static-binaries], |
308 | [AS_HELP_STRING([--enable-static-binaries], [build all binaries statically [default=no]])], | |
309 | [enable_static_binaries=$enableval], [enable_static_binaries=no]) | |
310 | AM_CONDITIONAL([ENABLE_STATIC_BINARIES], [test "x$enable_static_binaries" = "xyes"]) | |
311 | ||
fa2bb6ba SH |
312 | AM_COND_IF([ENABLE_OPENSSL], |
313 | [AC_CHECK_HEADER([openssl/engine.h],[],[AC_MSG_ERROR([You must install the OpenSSL development package in order to compile lxc])]) | |
014a65ef | 314 | AM_COND_IF([ENABLE_STATIC_BINARIES], [AC_SUBST([OPENSSL_LIBS], '-lssl -lcrypto -ldl')], [AC_SUBST([OPENSSL_LIBS], '-lssl -lcrypto')])]) |
c8601571 | 315 | |
fe4de9a6 DE |
316 | # SELinux |
317 | AC_ARG_ENABLE([selinux], | |
f756a350 | 318 | [AS_HELP_STRING([--enable-selinux], [enable SELinux support [default=auto]])], |
b2963bf9 | 319 | [enable_selinux=$enableval], [enable_selinux=auto]) |
fe4de9a6 | 320 | |
f91d5e4e | 321 | if test "x$enable_selinux" = xauto; then |
fe4de9a6 DE |
322 | AC_CHECK_LIB([selinux],[setexeccon_raw],[enable_selinux=yes],[enable_selinux=no]) |
323 | fi | |
324 | AM_CONDITIONAL([ENABLE_SELINUX], [test "x$enable_selinux" = "xyes"]) | |
325 | AM_COND_IF([ENABLE_SELINUX], | |
326 | [AC_CHECK_HEADER([selinux/selinux.h],[],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])]) | |
e9aeeade DE |
327 | AC_CHECK_LIB([selinux], [setexeccon_raw],[true],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])]) |
328 | AC_SUBST([SELINUX_LIBS], [-lselinux])]) | |
fe4de9a6 | 329 | |
8aa4885c | 330 | # Seccomp syscall filter |
e767dd55 | 331 | AC_ARG_ENABLE([seccomp], |
f756a350 | 332 | [AS_HELP_STRING([--enable-seccomp], [enable seccomp support [default=auto]])], |
b2963bf9 | 333 | [enable_seccomp=$enableval], [enable_seccomp=auto]) |
e767dd55 | 334 | |
f91d5e4e | 335 | if test "x$enable_seccomp" = "xauto" ; then |
e767dd55 SH |
336 | AC_CHECK_LIB([seccomp],[seccomp_init],[enable_seccomp=yes],[enable_seccomp=no]) |
337 | fi | |
e767dd55 SH |
338 | AM_CONDITIONAL([ENABLE_SECCOMP], [test "x$enable_seccomp" = "xyes"]) |
339 | ||
8f2c3a70 | 340 | AM_COND_IF([ENABLE_SECCOMP], |
12dcc892 JS |
341 | [PKG_CHECK_MODULES([SECCOMP],[libseccomp],[],[ |
342 | AC_CHECK_HEADER([seccomp.h],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])]) | |
343 | AC_CHECK_LIB([seccomp], [seccomp_init],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])]) | |
344 | AC_SUBST([SECCOMP_LIBS], [-lseccomp]) | |
345 | ]) | |
67cd8bde EQ |
346 | # HAVE_SCMP_FILTER_CTX=1 will tell us we have libseccomp api >= 1.0.0 |
347 | OLD_CFLAGS="$CFLAGS" | |
348 | CFLAGS="$CFLAGS $SECCOMP_CFLAGS" | |
349 | AC_CHECK_TYPES([scmp_filter_ctx], [], [], [[#include <seccomp.h>]]) | |
350 | AC_CHECK_DECLS([seccomp_notify_fd], [], [], [[#include <seccomp.h>]]) | |
351 | AC_CHECK_TYPES([struct seccomp_notif_sizes], [], [], [[#include <seccomp.h>]]) | |
352 | AC_CHECK_DECLS([seccomp_syscall_resolve_name_arch], [], [], [[#include <seccomp.h>]]) | |
353 | CFLAGS="$OLD_CFLAGS" | |
12dcc892 | 354 | ]) |
8f2c3a70 | 355 | |
c06ed219 | 356 | AC_MSG_CHECKING(for static libcap) |
e78884c9 DE |
357 | # Check for static libcap, make sure the function checked for differs from the |
358 | # the one checked below so the cache doesn't give a wrong answer | |
359 | OLD_CFLAGS="$CFLAGS" | |
c06ed219 SH |
360 | OLD_CPPFLAGS="$CPPFLAGS" |
361 | OLD_LDFLAGS="$LDFLAGS" | |
362 | OLD_LIBS="$LIBS" | |
363 | CFLAGS="" | |
364 | CPPFLAGS="" | |
365 | LDFLAGS="-static" | |
366 | LIBS="-lcap" | |
367 | AC_LINK_IFELSE([ | |
368 | AC_LANG_SOURCE( | |
369 | [[int main() { return 0; }]] | |
370 | )],[have_static_libcap=yes],[have_static_libcap=no]) | |
e78884c9 DE |
371 | AM_CONDITIONAL([HAVE_STATIC_LIBCAP], [test "x$have_static_libcap" = "xyes"]) |
372 | if test "x$have_static_libcap" = "xyes"; then | |
373 | AC_DEFINE([HAVE_STATIC_LIBCAP], 1, [Have static libcap]) | |
c06ed219 SH |
374 | AC_MSG_RESULT([yes]) |
375 | else | |
376 | AC_MSG_RESULT([no]) | |
e78884c9 | 377 | fi |
c06ed219 | 378 | CPPFLAGS="$OLD_CPPFLAGS" |
e78884c9 | 379 | CFLAGS="$OLD_CFLAGS" |
c06ed219 SH |
380 | LDFLAGS="$OLD_LDFLAGS" |
381 | LIBS="$OLD_LIBS" | |
e78884c9 DE |
382 | |
383 | ||
f91d5e4e SG |
384 | # Linux capabilities |
385 | AC_ARG_ENABLE([capabilities], | |
f756a350 | 386 | [AS_HELP_STRING([--enable-capabilities], [enable kernel capabilities support [default=auto]])], |
b2963bf9 | 387 | [enable_capabilities=$enableval], [enable_capabilities=auto]) |
f91d5e4e SG |
388 | |
389 | if test "x$enable_capabilities" = "xauto"; then | |
390 | AC_CHECK_LIB([cap],[cap_set_proc],[enable_capabilities=yes],[enable_capabilities=no]) | |
391 | fi | |
392 | AM_CONDITIONAL([ENABLE_CAP], [test "x$enable_capabilities" = "xyes"]) | |
393 | ||
394 | AM_COND_IF([ENABLE_CAP], | |
e37dda71 FF |
395 | [AC_CHECK_HEADER([sys/capability.h],[],[AC_MSG_ERROR([You must install the libcap development package in order to compile lxc])]) |
396 | AC_CHECK_LIB(cap,cap_set_proc,[],[AC_MSG_ERROR([You must install the libcap development package in order to compile lxc])]) | |
69924fff CB |
397 | # Test whether we support getting file capabilities via cap_get_file(). |
398 | AC_CHECK_LIB(cap,cap_get_file, AC_DEFINE(LIBCAP_SUPPORTS_FILE_CAPABILITIES,1,[Have cap_get_file]),[],[]) | |
399 | AC_SUBST([CAP_LIBS], [-lcap])]) | |
f91d5e4e | 400 | |
8aa4885c | 401 | # Configuration examples |
3fb0a9bb | 402 | AC_ARG_ENABLE([examples], |
f756a350 | 403 | [AS_HELP_STRING([--enable-examples], [install examples [default=yes]])], |
b2963bf9 | 404 | [enable_examples=$enableval], [enable_examples=yes]) |
3fb0a9bb AN |
405 | AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"]) |
406 | ||
052616eb ÇO |
407 | # Enable dumping stack traces |
408 | AC_ARG_ENABLE([mutex-debugging], | |
f756a350 | 409 | [AS_HELP_STRING([--enable-mutex-debugging], [Makes mutexes to report error and provide stack trace [default=no]])], |
b2963bf9 | 410 | [enable_mutex_debugging=$enableval], [enable_mutex_debugging=no]) |
052616eb ÇO |
411 | AM_CONDITIONAL([MUTEX_DEBUGGING], [test "x$enable_mutex_debugging" = "xyes"]) |
412 | ||
413 | AM_COND_IF([MUTEX_DEBUGGING], | |
414 | AC_DEFINE_UNQUOTED([MUTEX_DEBUGGING], 1, [Enabling mutex debugging])) | |
415 | ||
3a1675bf DE |
416 | # Not in older autoconf versions |
417 | # AS_VAR_COPY(DEST, SOURCE) | |
418 | # ------------------------- | |
419 | # Set the polymorphic shell variable DEST to the contents of the polymorphic | |
420 | # shell variable SOURCE. | |
421 | m4_ifdef([AS_VAR_COPY], [], | |
422 | [AC_DEFUN([AS_VAR_COPY], | |
423 | [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) | |
424 | ]) | |
425 | ||
12e93188 NC |
426 | dnl PKG_CHECK_VAR was introduced with pkg-config 0.28 |
427 | m4_ifdef([PKG_CHECK_VAR], [], | |
428 | [AC_DEFUN([PKG_CHECK_VAR], | |
429 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
430 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl | |
431 | _PKG_CONFIG([$1], [variable="][$3]["], [$2]) | |
432 | AS_VAR_COPY([$1], [pkg_cv_][$1]) | |
433 | AS_VAR_IF([$1], [""], [$5], [$4])dnl | |
434 | ])# PKG_CHECK_VAR | |
435 | ]) | |
f080ffd7 | 436 | |
0306de4f SG |
437 | # Optional bash integration |
438 | AC_ARG_ENABLE([bash], | |
f756a350 | 439 | [AS_HELP_STRING([--enable-bash], [build bash integration [default=yes]])], |
b2963bf9 | 440 | [enable_bash=$enableval], [enable_bash=yes]) |
0306de4f SG |
441 | AM_CONDITIONAL([ENABLE_BASH], [test "x$enable_bash" = "xyes"]) |
442 | ||
23f4c8a0 EG |
443 | AM_COND_IF([ENABLE_BASH], |
444 | [AC_MSG_CHECKING([bash completion directory]) | |
445 | PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , | |
446 | bashcompdir="${sysconfdir}/bash_completion.d") | |
447 | AC_MSG_RESULT([$bashcompdir]) | |
448 | AC_SUBST(bashcompdir) | |
449 | ]) | |
450 | ||
8d060937 CB |
451 | # Build the command line tools |
452 | AC_ARG_ENABLE([tools], | |
f756a350 | 453 | [AS_HELP_STRING([--enable-tools], [build the command line tools [default=yes]])], |
b2963bf9 | 454 | [enable_tools=$enableval], [enable_tools=yes]) |
8d060937 CB |
455 | AM_CONDITIONAL([ENABLE_TOOLS], [test "x$enable_tools" = "xyes"]) |
456 | ||
457 | # Build the liblxc commands | |
458 | AC_ARG_ENABLE([commands], | |
f756a350 | 459 | [AS_HELP_STRING([--enable-commands], [build the liblxc commands [default=yes]])], |
b2963bf9 | 460 | [enable_commands=$enableval], [enable_commands=yes]) |
8d060937 CB |
461 | AM_CONDITIONAL([ENABLE_COMMANDS], [test "x$enable_commands" = "xyes"]) |
462 | ||
014a65ef CB |
463 | AC_ARG_ENABLE([static-binaries], |
464 | [AS_HELP_STRING([--enable-static-binaries], [build all binaries statically [default=no]])], | |
465 | [enable_static_binaries=$enableval], [enable_static_binaries=no]) | |
466 | AM_CONDITIONAL([ENABLE_STATIC_BINARIES], [test "x$enable_static_binaries" = "xyes"]) | |
467 | ||
5f404236 CB |
468 | AC_ARG_ENABLE([sanitizers], |
469 | [AS_HELP_STRING([--enable-sanitizers], [build with sanitizers enabled [default=no]])], | |
470 | [enable_sanitizers=$enableval], [enable_sanitizers=no]) | |
471 | AM_CONDITIONAL([ENABLE_SANITIZERS], [test "x$enable_sanitizers" = "xyes"]) | |
472 | if test "x$enable_sanitizers" = "xyes"; then | |
473 | AC_DEFINE([ENABLE_SANITIZERS], 1, [build with sanitizers enabled]) | |
474 | ||
475 | CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \ | |
476 | -fsanitize=address \ | |
477 | -fsanitize=undefined \ | |
cdfa8f13 | 478 | -fno-optimize-sibling-calls \ |
5f404236 CB |
479 | -fno-omit-frame-pointer]) |
480 | AC_SUBST(AM_CFLAGS) | |
481 | ||
482 | AC_MSG_RESULT([yes]) | |
483 | else | |
484 | AC_MSG_RESULT([no]) | |
485 | fi | |
384db5d7 | 486 | |
a10327e7 EV |
487 | if test "x$enable_fuzzers" = "xyes"; then |
488 | if test "x$LIB_FUZZING_ENGINE" = x; then | |
489 | CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \ | |
490 | -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION \ | |
a390325f | 491 | -DRUN_ON_OSS_FUZZ=0 \ |
a10327e7 | 492 | -fsanitize=fuzzer-no-link]) |
a390325f EV |
493 | else |
494 | CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \ | |
495 | -DRUN_ON_OSS_FUZZ=1]) | |
a10327e7 EV |
496 | fi |
497 | else | |
498 | CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[-flto=thin]) | |
38718ccc | 499 | fi |
a10327e7 | 500 | AC_SUBST(AM_CFLAGS) |
38718ccc | 501 | |
8aa4885c | 502 | # Optional test binaries |
525421c9 | 503 | AC_ARG_ENABLE([tests], |
f756a350 | 504 | [AS_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])], |
b2963bf9 | 505 | [enable_tests=$enableval], [enable_tests=no]) |
525421c9 SG |
506 | AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"]) |
507 | ||
061ba5d0 SG |
508 | # Allow overriding the default runtime dir (/run) |
509 | AC_ARG_WITH([runtime-path], | |
b2963bf9 CS |
510 | [AS_HELP_STRING([--with-runtime-path=dir], [runtime directory (default: /run)])], |
511 | [with_runtime_path=$withval], [with_runtime_path=['/run']]) | |
061ba5d0 | 512 | |
8aa4885c | 513 | # LXC container path, where the containers are actually stored |
fbf5de31 | 514 | # This is overridden by an entry in the file called LXCCONF |
2a59a681 | 515 | # (i.e. /etc/lxc/lxc.conf) |
aef4ebcf | 516 | AC_ARG_WITH([config-path], |
b2963bf9 CS |
517 | [AS_HELP_STRING([--with-config-path=dir], [lxc configuration repository path])], |
518 | [with_config_path=$withval], [with_config_path=['${localstatedir}/lib/lxc']]) | |
aef4ebcf | 519 | |
2a59a681 SH |
520 | # The path of the global lxc configuration file. |
521 | AC_ARG_WITH([global-conf], | |
b2963bf9 CS |
522 | [AS_HELP_STRING([--with-global-conf=dir], [global lxc configuration file])], |
523 | [with_global_conf=$withval], [with_global_conf=['${sysconfdir}/lxc/lxc.conf']]) | |
2a59a681 | 524 | |
c75c30ec | 525 | # The path of the userns network configuration file |
070a4b8e | 526 | AC_ARG_WITH([usernic-conf], |
b2963bf9 CS |
527 | [AS_HELP_STRING([--with-usernic-conf], [user network interface configuration file])], |
528 | [with_usernic_conf=$withval], [with_usernic_conf=['${sysconfdir}/lxc/lxc-usernet']]) | |
070a4b8e | 529 | |
c75c30ec | 530 | # The path of the runtime usernic database |
070a4b8e | 531 | AC_ARG_WITH([usernic-db], |
b2963bf9 CS |
532 | [AS_HELP_STRING([--with-usernic-db], [lxc user nic database])], |
533 | [with_usernic_db=$withval], [with_usernic_db=['${with_runtime_path}/lxc/nics']]) | |
070a4b8e | 534 | |
8aa4885c | 535 | # Rootfs path, where the container mount structure is assembled |
196db713 | 536 | AC_ARG_WITH([rootfs-path], |
b2963bf9 CS |
537 | [AS_HELP_STRING([--with-rootfs-path=dir], [lxc rootfs mount point])], |
538 | [with_rootfs_path=$withval], [with_rootfs_path=['${libdir}/lxc/rootfs']]) | |
c75c30ec | 539 | |
6e16552d CS |
540 | # cgroup pattern specification |
541 | AC_ARG_WITH([cgroup-pattern], | |
b2963bf9 | 542 | [AS_HELP_STRING([--with-cgroup-pattern=pattern], [pattern for container cgroups])], |
b3ed2061 | 543 | [with_cgroup_pattern=$withval], [with_cgroup_pattern=['']]) |
196db713 | 544 | |
1800f924 WB |
545 | # The path for the apparmor_parser's cache for generated apparmor profiles |
546 | AC_ARG_WITH([apparmor-cache-dir], | |
b2963bf9 CS |
547 | [AS_HELP_STRING([--with-apparmor-cache-dir=dir],[path for apparmor_parser cache])], |
548 | [with_apparmor_cache_dir=$withval], [with_apparmor_cache_dir=['${localstatedir}/cache/lxc/apparmor']]) | |
1800f924 | 549 | |
5e1e7aaf SH |
550 | # Container log path. By default, use $lxcpath. |
551 | AC_MSG_CHECKING([Whether to place logfiles in container config path]) | |
552 | AC_ARG_ENABLE([configpath-log], | |
f756a350 | 553 | [AS_HELP_STRING([--enable-configpath-log], [use logfiles in config path [default=no]])], |
b2963bf9 | 554 | [enable_configpath_log=$enableval], [enable_configpath_log=no]) |
f91d5e4e SG |
555 | AC_MSG_RESULT([$enable_configpath_log]) |
556 | AM_CONDITIONAL([USE_CONFIGPATH_LOGS], [test "$enable_configpath_log" = "yes"]) | |
5e1e7aaf | 557 | |
f91d5e4e | 558 | if test "$enable_configpath_log" = "yes"; then |
5e1e7aaf SH |
559 | default_log_path="${with_config_path}" |
560 | else | |
89d556d8 | 561 | default_log_path="${localstatedir}/log/lxc" |
5e1e7aaf SH |
562 | fi |
563 | ||
564 | AC_ARG_WITH([log-path], | |
b2963bf9 CS |
565 | [AS_HELP_STRING([--with-log-path=dir],[per container log path])], |
566 | [with_log_path=$withval], [with_log_path=['${default_log_path}']]) | |
5e1e7aaf | 567 | |
8aa4885c SG |
568 | # Expand some useful variables |
569 | AS_AC_EXPAND(PREFIX, "$prefix") | |
570 | AS_AC_EXPAND(LIBDIR, "$libdir") | |
571 | AS_AC_EXPAND(BINDIR, "$bindir") | |
718e4f48 | 572 | AS_AC_EXPAND(SBINDIR, "$sbindir") |
8aa4885c SG |
573 | AS_AC_EXPAND(LIBEXECDIR, "$libexecdir") |
574 | AS_AC_EXPAND(INCLUDEDIR, "$includedir") | |
575 | AS_AC_EXPAND(SYSCONFDIR, "$sysconfdir") | |
0a18b545 | 576 | AS_AC_EXPAND(LXC_DEFAULT_CONFIG, "$sysconfdir/lxc/default.conf") |
8aa4885c SG |
577 | AS_AC_EXPAND(DATADIR, "$datadir") |
578 | AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir") | |
579 | AS_AC_EXPAND(DOCDIR, "$docdir") | |
8d256e4d | 580 | AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)} '+%Y-%m-%d')") |
8aa4885c | 581 | AS_AC_EXPAND(LXCPATH, "$with_config_path") |
2a59a681 | 582 | AS_AC_EXPAND(LXC_GLOBAL_CONF, "$with_global_conf") |
070a4b8e SH |
583 | AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf") |
584 | AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db") | |
0af99319 | 585 | AS_AC_EXPAND(LXC_DISTRO_SYSCONF, "$distrosysconf") |
8aa4885c SG |
586 | AS_AC_EXPAND(LXCROOTFSMOUNT, "$with_rootfs_path") |
587 | AS_AC_EXPAND(LXCTEMPLATEDIR, "$datadir/lxc/templates") | |
f2a95ee1 | 588 | AS_AC_EXPAND(LXCTEMPLATECONFIG, "$datadir/lxc/config") |
906f8c4d | 589 | AS_AC_EXPAND(LXCHOOKDIR, "$datadir/lxc/hooks") |
16d08ae7 | 590 | AS_AC_EXPAND(LXCBINHOOKDIR, "$libexecdir/lxc/hooks") |
8aa4885c | 591 | AS_AC_EXPAND(LXCINITDIR, "$libexecdir") |
5e1e7aaf | 592 | AS_AC_EXPAND(LOGPATH, "$with_log_path") |
061ba5d0 | 593 | AS_AC_EXPAND(RUNTIME_PATH, "$with_runtime_path") |
1800f924 | 594 | AS_AC_EXPAND(APPARMOR_CACHE_DIR, "$with_apparmor_cache_dir") |
6e16552d | 595 | AC_SUBST(DEFAULT_CGROUP_PATTERN, ["$with_cgroup_pattern"]) |
881450bb | 596 | |
0080bebf TA |
597 | # We need the install path so criu knows where to reference the hook scripts. |
598 | AC_DEFINE_UNQUOTED([DATADIR], "$DATADIR", ["Prefix for shared files."]) | |
599 | ||
8aa4885c | 600 | # Check for some standard kernel headers |
910bb4fa | 601 | AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h], |
8aa4885c SG |
602 | [], |
603 | AC_MSG_ERROR([Please install the Linux kernel headers.]), | |
604 | [#include <sys/socket.h>]) | |
35f549fe | 605 | |
a6168a17 SG |
606 | # Check for alternate C libraries |
607 | AC_MSG_CHECKING(for bionic libc) | |
608 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | |
8aa4885c | 609 | [[#ifndef __ANDROID__ |
a6168a17 SG |
610 | error: Not bionic! |
611 | #endif]])], | |
8aa4885c SG |
612 | [is_bionic=yes], |
613 | [is_bionic=no]) | |
a6168a17 | 614 | if test "x$is_bionic" = "xyes"; then |
8aa4885c SG |
615 | AC_DEFINE([IS_BIONIC], 1, [bionic libc]) |
616 | AC_MSG_RESULT([yes]) | |
a6168a17 | 617 | else |
8aa4885c | 618 | AC_MSG_RESULT([no]) |
a6168a17 SG |
619 | fi |
620 | AM_CONDITIONAL([IS_BIONIC], [test "x$is_bionic" = "xyes"]) | |
621 | ||
f7a8609f CB |
622 | # Configuration examples |
623 | AC_ARG_ENABLE([pam], | |
f756a350 | 624 | [AS_HELP_STRING([--enable-pam], [enable pam module [default=no]])], |
b2963bf9 | 625 | [enable_pam=$enableval], [enable_pam=no]) |
f7a8609f CB |
626 | AM_CONDITIONAL([ENABLE_PAM], [test "x$enable_pam" = "xyes"]) |
627 | ||
628 | AM_COND_IF([ENABLE_PAM], | |
629 | [AC_ARG_WITH( | |
630 | [pamdir], | |
631 | [AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored, | |
632 | or "none" if PAM modules are not to be built])], | |
b2963bf9 | 633 | [pamdir=$withval], |
f7a8609f CB |
634 | [ |
635 | if test "${prefix}" = "/usr"; then | |
636 | pamdir="/lib${libdir##*/lib}/security" | |
637 | else | |
638 | pamdir="\$(libdir)/security" | |
639 | fi | |
640 | ] | |
641 | )]) | |
7ac43d3d CB |
642 | |
643 | AM_CONDITIONAL([HAVE_PAM], [test x"$pamdir" != "xnone"]) | |
f7a8609f CB |
644 | AM_COND_IF([ENABLE_PAM], |
645 | [if test "z$pamdir" != "znone"; then | |
646 | AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam]) | |
647 | AC_ARG_VAR([PAM_LIBS], [linker flags for pam]) | |
648 | AC_CHECK_LIB( | |
649 | [pam], | |
650 | [pam_authenticate], | |
651 | [PAM_LIBS="-lpam"], | |
652 | [AC_MSG_ERROR([*** libpam not found.]) | |
653 | ]) | |
654 | ||
655 | AC_SUBST(PAM_LIBS) | |
656 | AC_SUBST([pamdir]) | |
657 | fi]) | |
7ac43d3d | 658 | |
656994bb MH |
659 | # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP |
660 | AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>]) | |
661 | ||
955e2a02 CB |
662 | # Some systems lack PR_{G,S}ET_NO_NEW_PRIVS definition => HAVE_DECL_PR_{G,S}ET_NO_NEW_PRIVS |
663 | AC_CHECK_DECLS([PR_SET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>]) | |
664 | AC_CHECK_DECLS([PR_GET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>]) | |
665 | ||
e827ff7e | 666 | # Check for some headers |
44843972 | 667 | AC_CHECK_HEADERS([pty.h sys/memfd.h sys/personality.h sys/resource.h sys/signalfd.h sys/timerfd.h utmpx.h]) |
d029e1de CB |
668 | |
669 | AC_CHECK_HEADER([ifaddrs.h], | |
670 | AM_CONDITIONAL(HAVE_IFADDRS_H, true) | |
671 | AC_DEFINE(HAVE_IFADDRS_H, 1, [Have ifaddrs.h]), | |
672 | AM_CONDITIONAL(HAVE_IFADDRS_H, false)) | |
ff218c25 | 673 | |
af6824fc ST |
674 | # lookup major()/minor()/makedev() |
675 | AC_HEADER_MAJOR | |
676 | ||
2d76d1d7 | 677 | # Check for some syscalls functions |
305b3b9c | 678 | AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create move_mount open_tree execveat clone3 fsopen fspick fsconfig fsmount openat2 close_range statvfs mount_setattr]) |
b1abf15d | 679 | AC_CHECK_TYPES([__aligned_u64], [], [], [[#include <linux/types.h>]]) |
031e0285 | 680 | AC_CHECK_TYPES([struct mount_attr], [], [], [[#include <linux/mount.h>]]) |
2b0c8106 | 681 | AC_CHECK_TYPES([struct open_how], [], [], [[#include <linux/openat2.h>]]) |
96086a6b CB |
682 | AC_CHECK_TYPES([struct clone_args], [], [], [[#include <linux/sched.h>]]) |
683 | AC_CHECK_MEMBERS([struct clone_args.set_tid],[],[],[[#include <linux/sched.h>]]) | |
684 | AC_CHECK_MEMBERS([struct clone_args.cgroup],[],[],[[#include <linux/sched.h>]]) | |
2d76d1d7 | 685 | |
607e3fca CB |
686 | # Check for strerror_r() support. Defines: |
687 | # - HAVE_STRERROR_R if available | |
688 | # - HAVE_DECL_STRERROR_R if defined | |
689 | # - STRERROR_R_CHAR_P if it returns char * | |
690 | AC_FUNC_STRERROR_R | |
691 | ||
720bbb31 RK |
692 | # Check if "%m" is supported by printf and Co |
693 | AC_MSG_CHECKING([%m format]) | |
d12860c0 | 694 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
720bbb31 RK |
695 | #include <stdio.h> |
696 | int main(void) | |
697 | { | |
698 | char msg[256]; | |
699 | int rc; | |
700 | ||
701 | rc = snprintf(msg, sizeof(msg), "%m\n"); | |
702 | if ((rc > 1) && (msg[0] != '%')) | |
703 | { | |
704 | return 0; | |
705 | } | |
706 | else | |
707 | { | |
708 | return 1; | |
709 | } | |
d12860c0 | 710 | }]])],[fmt_m=yes],[fmt_m=no],[fmt_m=no]) |
720bbb31 RK |
711 | if test "x$fmt_m" = "xyes"; then |
712 | AC_DEFINE([HAVE_M_FORMAT], 1, [Have %m format]) | |
713 | AC_MSG_RESULT([yes]) | |
714 | else | |
715 | AC_MSG_RESULT([no]) | |
716 | fi | |
717 | ||
e827ff7e | 718 | # Check for some functions |
babbea4b | 719 | AC_CHECK_LIB(pthread, main) |
740ee8c7 | 720 | AC_CHECK_LIB(util, openpty) |
35eb5cdc | 721 | AC_CHECK_FUNCS([hasmntopt setmntent endmntent utmpxname]) |
477e62b6 CB |
722 | AC_CHECK_FUNCS([getgrgid_r], |
723 | AM_CONDITIONAL(HAVE_GETGRGID_R, true) | |
724 | AC_DEFINE(HAVE_GETGRGID_R,1,[Have getgrgid_r]), | |
725 | AM_CONDITIONAL(HAVE_GETGRGID_R, false)) | |
1ba0013f SG |
726 | AC_CHECK_FUNCS([getline], |
727 | AM_CONDITIONAL(HAVE_GETLINE, true) | |
728 | AC_DEFINE(HAVE_GETLINE,1,[Have getline]), | |
729 | AM_CONDITIONAL(HAVE_GETLINE, false)) | |
9dbcd668 SG |
730 | AC_CHECK_FUNCS([getsubopt], |
731 | AM_CONDITIONAL(HAVE_GETSUBOPT, true) | |
732 | AC_DEFINE(HAVE_GETSUBOPT,1,[Have getsubopt]), | |
733 | AM_CONDITIONAL(HAVE_GETSUBOPT, false)) | |
1ba0013f SG |
734 | AC_CHECK_FUNCS([fgetln], |
735 | AM_CONDITIONAL(HAVE_FGETLN, true) | |
736 | AC_DEFINE(HAVE_FGETLN,1,[Have fgetln]), | |
737 | AM_CONDITIONAL(HAVE_FGETLN, false)) | |
b25291da CB |
738 | AC_CHECK_FUNCS([keyctl], |
739 | AM_CONDITIONAL(HAVE_KEYCTL, true) | |
740 | AC_DEFINE(HAVE_KEYCTL,1,[Have keyctl]), | |
741 | AM_CONDITIONAL(HAVE_KEYCTL, false)) | |
35eb5cdc CB |
742 | AC_CHECK_FUNCS([openpty], |
743 | AM_CONDITIONAL(HAVE_OPENPTY, true) | |
744 | AC_DEFINE(HAVE_OPENPTY,1,[Have openpty]), | |
745 | AM_CONDITIONAL(HAVE_OPENPTY, false)) | |
a04f5407 CB |
746 | AC_CHECK_FUNCS([prlimit], |
747 | AM_CONDITIONAL(HAVE_PRLIMIT, true) | |
748 | AC_DEFINE(HAVE_PRLIMIT,1,[Have prlimit]), | |
749 | AM_CONDITIONAL(HAVE_PRLIMIT, false)) | |
f48b5fd8 FF |
750 | AC_CHECK_FUNCS([prlimit64], |
751 | AM_CONDITIONAL(HAVE_PRLIMIT64, true) | |
752 | AC_DEFINE(HAVE_PRLIMIT64,1,[Have prlimit64]), | |
753 | AM_CONDITIONAL(HAVE_PRLIMIT64, false)) | |
477e62b6 CB |
754 | AC_CHECK_FUNCS([pthread_setcancelstate], |
755 | AM_CONDITIONAL(HAVE_PTHREAD_SETCANCELSTATE, true) | |
756 | AC_DEFINE(HAVE_PTHREAD_SETCANCELSTATE,1,[Have pthread_setcancelstate]), | |
757 | AM_CONDITIONAL(HAVE_PTHREAD_SETCANCELSTATE, false)) | |
91c272a5 CB |
758 | AC_CHECK_FUNCS([strlcpy], |
759 | AM_CONDITIONAL(HAVE_STRLCPY, true) | |
760 | AC_DEFINE(HAVE_STRLCPY,1,[Have strlcpy]), | |
761 | AM_CONDITIONAL(HAVE_STRLCPY, false)) | |
9a5e7ac4 CB |
762 | AC_CHECK_FUNCS([strlcat], |
763 | AM_CONDITIONAL(HAVE_STRLCAT, true) | |
764 | AC_DEFINE(HAVE_STRLCAT,1,[Have strlcat]), | |
765 | AM_CONDITIONAL(HAVE_STRLCAT, false)) | |
7e4ea7bf CB |
766 | AC_CHECK_FUNCS([strchrnul], |
767 | AM_CONDITIONAL(HAVE_STRCHRNUL, true) | |
768 | AC_DEFINE(HAVE_STRCHRNUL,1,[Have strchnul]), | |
769 | AM_CONDITIONAL(HAVE_STRCHRNUL, false)) | |
7fa90630 CB |
770 | AC_CHECK_FUNCS([fmemopen], |
771 | AM_CONDITIONAL(HAVE_FMEMOPEN, true) | |
772 | AC_DEFINE(HAVE_FMEMOPEN,1,[Have fmemopen]), | |
773 | AM_CONDITIONAL(HAVE_FMEMOPEN, false)) | |
1ba0013f | 774 | |
da5efb6f CB |
775 | # HAVE_STRUCT_RTNL_LINK_STATS64={0,1} |
776 | AC_CHECK_TYPES([struct rtnl_link_stats64], [], [], [[#include <linux/if_link.h>]]) | |
777 | ||
c9a84173 | 778 | # Check for some libraries |
a81c46e9 | 779 | AX_PTHREAD |
336d5469 | 780 | AC_SEARCH_LIBS(clock_gettime, [rt]) |
c9a84173 | 781 | |
babbea4b ÇO |
782 | # See if we support thread-local storage. |
783 | LXC_CHECK_TLS | |
784 | ||
fb3b3ef4 | 785 | # Hardening flags |
b59bc011 CB |
786 | CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \ |
787 | -fPIE \ | |
788 | -Wvla \ | |
789 | -std=gnu11 \ | |
790 | -fms-extensions \ | |
791 | -fdiagnostics-color \ | |
792 | -Wimplicit-fallthrough=5 \ | |
793 | -Wcast-align \ | |
794 | -Wstrict-prototypes \ | |
795 | -fno-strict-aliasing \ | |
796 | -fstack-clash-protection \ | |
797 | -fstack-protector-strong \ | |
798 | --param=ssp-buffer-size=4 \ | |
799 | -g \ | |
800 | --mcet -fcf-protection \ | |
801 | -Werror=implicit-function-declaration \ | |
802 | -Wlogical-op \ | |
803 | -Wmissing-include-dirs \ | |
804 | -Wold-style-definition \ | |
805 | -Winit-self \ | |
806 | -Wunused-but-set-variable \ | |
807 | -Wfloat-equal \ | |
808 | -Wsuggest-attribute=noreturn \ | |
809 | -Werror=return-type \ | |
810 | -Werror=incompatible-pointer-types \ | |
811 | -Wformat=2 \ | |
812 | -Wshadow \ | |
813 | -Wendif-labels \ | |
814 | -Werror=overflow \ | |
815 | -fdiagnostics-show-option \ | |
816 | -Werror=shift-count-overflow \ | |
817 | -Werror=shift-overflow=2 \ | |
818 | -Wdate-time \ | |
819 | -Wnested-externs \ | |
820 | -fasynchronous-unwind-tables \ | |
821 | -pipe \ | |
822 | -fexceptions \ | |
823 | -Warray-bounds \ | |
824 | -Wrestrict \ | |
825 | -Wreturn-local-addr \ | |
b59bc011 CB |
826 | -fsanitize=cfi \ |
827 | -Wstringop-overflow]) | |
828 | AC_SUBST(AM_CFLAGS) | |
829 | ||
830 | CC_CHECK_FLAGS_APPEND([AM_LDFLAGS],[LDFLAGS],[ \ | |
831 | -Wl,--as-needed \ | |
b59bc011 CB |
832 | -Wl,--gc-sections \ |
833 | -Wl,-z,relro \ | |
834 | -Wl,-z,now \ | |
835 | -pie \ | |
836 | -Wl,-fuse-ld=gold]) | |
792a48b1 EV |
837 | |
838 | AM_COND_IF([ENABLE_NO_UNDEFINED], | |
839 | [CC_CHECK_FLAGS_APPEND([AM_LDFLAGS],[LDFLAGS],[-Wl,--no-undefined])]) | |
840 | ||
b59bc011 | 841 | AC_SUBST(AM_LDFLAGS) |
e6fe24e1 | 842 | |
96086a6b | 843 | CFLAGS="$CFLAGS -Wvla -std=gnu11 -fms-extensions" |
81a56e80 | 844 | if test "x$enable_werror" = "xyes"; then |
218e8144 | 845 | CFLAGS="$CFLAGS -Werror" |
5e97c3fc | 846 | fi |
847 | ||
81c76cff | 848 | AC_ARG_ENABLE([thread-safety], |
f756a350 | 849 | [AS_HELP_STRING([--enable-thread-safety], [enforce thread-safety otherwise fail the build [default=yes]])], |
b2963bf9 | 850 | [enable_thread_safety=$enableval], [enable_thread_safety=yes]) |
81c76cff | 851 | AM_CONDITIONAL([ENFORCE_THREAD_SAFETY], [test "x$enable_thread_safety" = "xyes"]) |
538337ee CB |
852 | if test "x$enable_thread_safety" = "xyes"; then |
853 | AC_DEFINE([ENFORCE_THREAD_SAFETY], 1, [enforce thread-safety otherwise fail the build]) | |
854 | AC_MSG_RESULT([yes]) | |
855 | else | |
856 | AC_MSG_RESULT([no]) | |
857 | fi | |
81c76cff | 858 | |
64a2547c | 859 | AC_ARG_ENABLE([coverity-build], |
538337ee CB |
860 | [AS_HELP_STRING([--enable-coverity-build], [build for use with Coverity [default=no]])], |
861 | [enable_coverity_build=$enableval], [enable_coverity_build=no]) | |
64a2547c | 862 | AM_CONDITIONAL([ENABLE_COVERITY_BUILD], [test "x$enable_coverity_build" = "xyes"]) |
538337ee CB |
863 | if test "x$enable_coverity_build" = "xyes"; then |
864 | AC_DEFINE([ENABLE_COVERITY_BUILD], 1, [build for use with Coverity]) | |
865 | AC_MSG_RESULT([yes]) | |
866 | else | |
867 | AC_MSG_RESULT([no]) | |
868 | fi | |
64a2547c | 869 | |
5c7bfc02 | 870 | AC_ARG_ENABLE([dlog], |
f756a350 | 871 | [AS_HELP_STRING([--enable-dlog], [enable dlog support [default=no]])], |
b2963bf9 | 872 | [enable_dlog=$enableval], [enable_dlog=no]) |
5c7bfc02 | 873 | AM_CONDITIONAL([ENABLE_DLOG], [test "x$enable_dlog" = "xyes"]) |
874 | ||
875 | AM_COND_IF([ENABLE_DLOG], | |
876 | [PKG_CHECK_MODULES([DLOG],[dlog],[],[ | |
877 | AC_CHECK_HEADER([dlog.h],[],[AC_MSG_ERROR([You must install the dlog development package in order to compile lxc])]) | |
878 | AC_CHECK_LIB([dlog], [dlog_print],[],[AC_MSG_ERROR([You must install the dlog development package in order to compile lxc])]) | |
879 | AC_SUBST([DLOG_LIBS], [-ldlog]) | |
880 | ]) | |
881 | ]) | |
882 | ||
6400238d | 883 | AC_ARG_ENABLE([memfd-rexec], |
f756a350 | 884 | [AS_HELP_STRING([--enable-memfd-rexec], [enforce liblxc as a memfd to protect against certain symlink attacks [default=yes]])], |
b2963bf9 | 885 | [enable_memfd_rexec=$enableval], [enable_memfd_rexec=yes]) |
6400238d CB |
886 | AM_CONDITIONAL([ENFORCE_MEMFD_REXEC], [test "x$enable_memfd_rexec" = "xyes"]) |
887 | if test "x$enable_memfd_rexec" = "xyes"; then | |
888 | AC_DEFINE([ENFORCE_MEMFD_REXEC], 1, [Rexec liblxc as memfd]) | |
889 | AC_MSG_RESULT([yes]) | |
890 | else | |
891 | AC_MSG_RESULT([no]) | |
892 | fi | |
893 | ||
8aa4885c | 894 | # Files requiring some variable expansion |
5e97c3fc | 895 | AC_CONFIG_FILES([ |
288063bd | 896 | Makefile |
b6345ba1 | 897 | lxc.pc |
5e97c3fc | 898 | lxc.spec |
f2a95ee1 | 899 | |
fef909cf CB |
900 | coccinelle/Makefile |
901 | ||
288063bd | 902 | config/Makefile |
8da250da | 903 | config/apparmor/Makefile |
b19c5d12 | 904 | config/apparmor/abstractions/start-container |
719fae07 | 905 | config/selinux/Makefile |
0306de4f SG |
906 | config/bash/Makefile |
907 | config/bash/lxc | |
dc068290 | 908 | config/init/Makefile |
0af99319 MW |
909 | config/init/common/Makefile |
910 | config/init/common/lxc-containers | |
911 | config/init/common/lxc-net | |
dc068290 | 912 | config/init/systemd/Makefile |
015f0dd7 | 913 | config/init/systemd/lxc.service |
de2b7e65 | 914 | config/init/systemd/lxc@.service |
65b27d84 | 915 | config/init/systemd/lxc-net.service |
b6278254 | 916 | config/init/systemd/lxc-monitord.service |
0af99319 MW |
917 | config/init/sysvinit/Makefile |
918 | config/init/sysvinit/lxc-containers | |
919 | config/init/sysvinit/lxc-net | |
a8c71063 | 920 | config/init/upstart/lxc.conf |
0af99319 | 921 | config/init/upstart/lxc-net.conf |
dc068290 | 922 | config/init/upstart/Makefile |
f2a95ee1 SG |
923 | config/etc/Makefile |
924 | config/templates/Makefile | |
5b99af00 | 925 | config/templates/common.conf |
4662c6de | 926 | config/templates/common.conf.d/Makefile |
108b88ce | 927 | config/templates/nesting.conf |
1689c7cf | 928 | config/templates/oci.common.conf |
5b99af00 | 929 | config/templates/userns.conf |
7ceebfd1 | 930 | config/yum/Makefile |
0af99319 MW |
931 | config/sysconfig/Makefile |
932 | config/sysconfig/lxc | |
d823d5b9 | 933 | |
288063bd | 934 | doc/Makefile |
953e611c | 935 | doc/api/Makefile |
4019712d | 936 | doc/lxc-attach.sgml |
a6adab20 | 937 | doc/lxc-autostart.sgml |
4019712d SG |
938 | doc/lxc-cgroup.sgml |
939 | doc/lxc-checkconfig.sgml | |
735f2c6e | 940 | doc/lxc-checkpoint.sgml |
ff5e2751 | 941 | doc/lxc-config.sgml |
4019712d | 942 | doc/lxc-console.sgml |
2b47bac3 | 943 | doc/lxc-copy.sgml |
d823d5b9 | 944 | doc/lxc-create.sgml |
945 | doc/lxc-destroy.sgml | |
4019712d | 946 | doc/lxc-device.sgml |
d823d5b9 | 947 | doc/lxc-execute.sgml |
d823d5b9 | 948 | doc/lxc-freeze.sgml |
4019712d | 949 | doc/lxc-info.sgml |
d823d5b9 | 950 | doc/lxc-ls.sgml |
4019712d | 951 | doc/lxc-monitor.sgml |
813a4837 | 952 | doc/lxc-snapshot.sgml |
4019712d SG |
953 | doc/lxc-start.sgml |
954 | doc/lxc-stop.sgml | |
f080ffd7 | 955 | doc/lxc-top.sgml |
4019712d SG |
956 | doc/lxc-unfreeze.sgml |
957 | doc/lxc-unshare.sgml | |
0a29a3ef | 958 | doc/lxc-update-config.sgml |
df3415e0 | 959 | doc/lxc-user-nic.sgml |
adade80c | 960 | doc/lxc-usernsexec.sgml |
4019712d SG |
961 | doc/lxc-wait.sgml |
962 | ||
a98ad25d VHRA |
963 | doc/pam_cgfs.sgml |
964 | ||
8a67a2b2 | 965 | doc/lxc.conf.sgml |
55fc19a1 SG |
966 | doc/lxc.container.conf.sgml |
967 | doc/lxc.system.conf.sgml | |
df3415e0 | 968 | doc/lxc-usernet.sgml |
8b8b04f8 | 969 | doc/lxc.sgml |
10fba81b | 970 | doc/common_options.sgml |
99e4008c | 971 | doc/see_also.sgml |
d823d5b9 | 972 | |
baf6671f DL |
973 | doc/rootfs/Makefile |
974 | ||
0f71d073 DL |
975 | doc/examples/Makefile |
976 | doc/examples/lxc-macvlan.conf | |
26c39028 | 977 | doc/examples/lxc-vlan.conf |
0f71d073 DL |
978 | doc/examples/lxc-no-netns.conf |
979 | doc/examples/lxc-empty-netns.conf | |
980 | doc/examples/lxc-phys.conf | |
981 | doc/examples/lxc-veth.conf | |
c553a9c2 | 982 | doc/examples/lxc-complex.conf |
0f71d073 | 983 | |
57da8c32 | 984 | doc/ja/Makefile |
57da8c32 | 985 | doc/ja/lxc-attach.sgml |
28f2ab26 | 986 | doc/ja/lxc-autostart.sgml |
57da8c32 KY |
987 | doc/ja/lxc-cgroup.sgml |
988 | doc/ja/lxc-checkconfig.sgml | |
b0e26ca7 | 989 | doc/ja/lxc-checkpoint.sgml |
3220eceb | 990 | doc/ja/lxc-config.sgml |
57da8c32 | 991 | doc/ja/lxc-console.sgml |
842948e4 | 992 | doc/ja/lxc-copy.sgml |
57da8c32 KY |
993 | doc/ja/lxc-create.sgml |
994 | doc/ja/lxc-destroy.sgml | |
995 | doc/ja/lxc-device.sgml | |
996 | doc/ja/lxc-execute.sgml | |
997 | doc/ja/lxc-freeze.sgml | |
998 | doc/ja/lxc-info.sgml | |
57da8c32 KY |
999 | doc/ja/lxc-ls.sgml |
1000 | doc/ja/lxc-monitor.sgml | |
ebe0aeb1 | 1001 | doc/ja/lxc-snapshot.sgml |
57da8c32 KY |
1002 | doc/ja/lxc-start.sgml |
1003 | doc/ja/lxc-stop.sgml | |
1004 | doc/ja/lxc-top.sgml | |
1005 | doc/ja/lxc-unfreeze.sgml | |
1006 | doc/ja/lxc-unshare.sgml | |
607a8de5 | 1007 | doc/ja/lxc-update-config.sgml |
07ece600 | 1008 | doc/ja/lxc-user-nic.sgml |
755d8d03 | 1009 | doc/ja/lxc-usernsexec.sgml |
57da8c32 KY |
1010 | doc/ja/lxc-wait.sgml |
1011 | ||
6da6d73e KY |
1012 | doc/ja/pam_cgfs.sgml |
1013 | ||
57da8c32 | 1014 | doc/ja/lxc.conf.sgml |
fb261f53 KY |
1015 | doc/ja/lxc.container.conf.sgml |
1016 | doc/ja/lxc.system.conf.sgml | |
07ece600 | 1017 | doc/ja/lxc-usernet.sgml |
57da8c32 KY |
1018 | doc/ja/lxc.sgml |
1019 | doc/ja/common_options.sgml | |
1020 | doc/ja/see_also.sgml | |
1021 | ||
2b371b26 | 1022 | doc/ko/Makefile |
2b371b26 SY |
1023 | doc/ko/lxc-attach.sgml |
1024 | doc/ko/lxc-autostart.sgml | |
1025 | doc/ko/lxc-cgroup.sgml | |
1026 | doc/ko/lxc-checkconfig.sgml | |
1027 | doc/ko/lxc-checkpoint.sgml | |
2b371b26 SY |
1028 | doc/ko/lxc-config.sgml |
1029 | doc/ko/lxc-console.sgml | |
b035f792 | 1030 | doc/ko/lxc-copy.sgml |
2b371b26 SY |
1031 | doc/ko/lxc-create.sgml |
1032 | doc/ko/lxc-destroy.sgml | |
1033 | doc/ko/lxc-device.sgml | |
1034 | doc/ko/lxc-execute.sgml | |
1035 | doc/ko/lxc-freeze.sgml | |
1036 | doc/ko/lxc-info.sgml | |
1037 | doc/ko/lxc-ls.sgml | |
1038 | doc/ko/lxc-monitor.sgml | |
1039 | doc/ko/lxc-snapshot.sgml | |
2b371b26 SY |
1040 | doc/ko/lxc-start.sgml |
1041 | doc/ko/lxc-stop.sgml | |
1042 | doc/ko/lxc-top.sgml | |
1043 | doc/ko/lxc-unfreeze.sgml | |
1044 | doc/ko/lxc-unshare.sgml | |
1045 | doc/ko/lxc-user-nic.sgml | |
1046 | doc/ko/lxc-usernsexec.sgml | |
1047 | doc/ko/lxc-wait.sgml | |
1048 | ||
1049 | doc/ko/lxc.conf.sgml | |
1050 | doc/ko/lxc.container.conf.sgml | |
1051 | doc/ko/lxc.system.conf.sgml | |
1052 | doc/ko/lxc-usernet.sgml | |
1053 | doc/ko/lxc.sgml | |
1054 | doc/ko/common_options.sgml | |
1055 | doc/ko/see_also.sgml | |
1056 | ||
906f8c4d | 1057 | hooks/Makefile |
84bf5645 | 1058 | hooks/dhclient |
906f8c4d | 1059 | |
c01d62f2 | 1060 | templates/Makefile |
f8d0243a | 1061 | templates/lxc-busybox |
71d3a659 | 1062 | templates/lxc-download |
35444f38 | 1063 | templates/lxc-local |
0ef43a5c | 1064 | templates/lxc-oci |
c9844b87 | 1065 | |
288063bd | 1066 | src/Makefile |
5e97c3fc | 1067 | src/lxc/Makefile |
2a59a681 | 1068 | src/lxc/lxc.functions |
48b1dc4c | 1069 | src/lxc/cmd/lxc-checkconfig |
6a342cab | 1070 | src/lxc/cmd/lxc-update-config |
a22185dd | 1071 | src/lxc/version.h |
be2e4e54 | 1072 | |
72d0e1cb | 1073 | src/tests/Makefile |
8cb8e496 | 1074 | src/tests/lxc-test-usernic |
5e97c3fc | 1075 | ]) |
1076 | AC_CONFIG_COMMANDS([default],[[]],[[]]) | |
1077 | AC_OUTPUT | |
f91d5e4e SG |
1078 | |
1079 | # Configuration overview | |
1080 | cat << EOF | |
1081 | ||
1082 | ---------------------------- | |
8d060937 CB |
1083 | Binaries |
1084 | - Command Line Tools: | |
1085 | - lxc-attach: $enable_tools | |
1086 | - lxc-autostart: $enable_tools | |
1087 | - lxc-cgroup: $enable_tools | |
1088 | - lxc-checkpoint: $enable_tools | |
1089 | - lxc-config: $enable_tools | |
1090 | - lxc-console: $enable_tools | |
1091 | - lxc-copy: $enable_tools | |
1092 | - lxc-create: $enable_tools | |
1093 | - lxc-destroy: $enable_tools | |
1094 | - lxc-device: $enable_tools | |
1095 | - lxc-execute: $enable_tools | |
1096 | - lxc-freeze: $enable_tools | |
1097 | - lxc-info: $enable_tools | |
1098 | - lxc-ls: $enable_tools | |
1099 | - lxc-monitor: $enable_tools | |
1100 | - lxc-snapshot: $enable_tools | |
1101 | - lxc-start: $enable_tools | |
1102 | - lxc-stop: $enable_tools | |
1103 | - lxc-top: $enable_tools | |
1104 | - lxc-unfreeze: $enable_tools | |
1105 | - lxc-unshare: $enable_tools | |
1106 | - lxc-wait: $enable_tools | |
1107 | ||
1108 | - liblxc Commands: | |
1109 | - lxc-checkconfig: $enable_commands | |
1110 | - lxc-update-config: $enable_commands | |
1111 | - lxc-init: $enable_commands | |
1112 | - lxc-monitord: $enable_commands | |
1113 | - lxc-user-nic: $enable_commands | |
1114 | - lxc-usernsexec: $enable_commands | |
1115 | ||
014a65ef CB |
1116 | - static binaries: $enable_static_binaries |
1117 | ||
f91d5e4e SG |
1118 | Environment: |
1119 | - compiler: $CC | |
b59bc011 CB |
1120 | - cflags: ${AM_CFLAGS} ${PTHREAD_CFLAGS} |
1121 | - ldflags: ${AM_LDFLAGS} ${PTHREAD_LIBS} | |
f91d5e4e | 1122 | - distribution: $with_distro |
89f79f6b | 1123 | - init script type(s): $init_script |
f91d5e4e | 1124 | - rpath: $enable_rpath |
fa2bb6ba | 1125 | - OpenSSL: $enable_openssl |
0306de4f | 1126 | - Bash integration: $enable_bash |
f91d5e4e SG |
1127 | |
1128 | Security features: | |
1129 | - Apparmor: $enable_apparmor | |
1130 | - Linux capabilities: $enable_capabilities | |
1131 | - seccomp: $enable_seccomp | |
1132 | - SELinux: $enable_selinux | |
6400238d | 1133 | - memfd rexec: $enable_memfd_rexec |
f91d5e4e | 1134 | |
7ac43d3d | 1135 | PAM: |
f7a8609f | 1136 | - PAM module: $enable_pam |
7ac43d3d CB |
1137 | - cgroup PAM module: $pamdir |
1138 | ||
f91d5e4e SG |
1139 | Documentation: |
1140 | - examples: $enable_examples | |
1141 | - API documentation: $enable_api_docs | |
1142 | - user documentation: $enable_doc | |
1143 | ||
1144 | Debugging: | |
5f404236 | 1145 | - Sanitizers: $enable_sanitizers |
538337ee | 1146 | - Coverity: $enable_coverity_build |
f91d5e4e | 1147 | - mutex debugging: $enable_mutex_debugging |
538337ee | 1148 | - tests: $enable_tests |
38718ccc | 1149 | - fuzzers: $enable_fuzzers |
f91d5e4e SG |
1150 | |
1151 | Paths: | |
1152 | - Logs in configpath: $enable_configpath_log | |
81c76cff CB |
1153 | |
1154 | Thread-safety: | |
1155 | - enforce: $enable_thread_safety | |
5c7bfc02 | 1156 | |
1157 | Dlog: | |
1158 | - enable: $enable_dlog | |
f91d5e4e | 1159 | EOF |