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