]>
Commit | Line | Data |
---|---|---|
5e97c3fc | 1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | ||
8b54fb4d | 4 | AC_INIT([lxc], [1.0.0.alpha2]) |
5e97c3fc | 5 | |
f8dafdbb | 6 | AC_CONFIG_SRCDIR([configure.ac]) |
5e97c3fc | 7 | AC_CONFIG_AUX_DIR([config]) |
067cfaeb | 8 | AC_CONFIG_HEADERS([src/config.h]) |
d007f8ab | 9 | AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects]) |
5e97c3fc | 10 | AC_CANONICAL_HOST |
5e97c3fc | 11 | AM_PROG_CC_C_O |
12 | AC_GNU_SOURCE | |
5c8f9bd8 | 13 | |
8aa4885c SG |
14 | # Detect the distribution. This is used for the default configuration and |
15 | # for some distro-specific build options. | |
6f75ba0b | 16 | AC_MSG_CHECKING([host distribution]) |
6e7e54d9 | 17 | AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, fedora, suse, gentoo, debian, arch, slackware, paldo, openmandriva or pardus.])) |
6f75ba0b DE |
18 | if test "z$with_distro" = "z"; then |
19 | with_distro=`lsb_release -is` | |
be2e4e54 | 20 | fi |
6f75ba0b DE |
21 | if test "z$with_distro" = "z"; then |
22 | AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat") | |
23 | AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle") | |
24 | AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora") | |
25 | AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse") | |
26 | AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo") | |
27 | AC_CHECK_FILE(/etc/debian_version,with_distro="debian") | |
28 | AC_CHECK_FILE(/etc/arch-release,with_distro="arch") | |
29 | AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware") | |
30 | AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware") | |
6e7e54d9 AK |
31 | AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="openmandriva") |
32 | AC_CHECK_FILE(/etc/mandriva-release,with_distro="openmandriva") | |
6f75ba0b DE |
33 | AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus") |
34 | fi | |
35 | with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'` | |
36 | ||
37 | if test "z$with_distro" = "z"; then | |
38 | with_distro="unknown" | |
39 | fi | |
40 | case $with_distro in | |
41 | ubuntu) | |
3a647d58 | 42 | distroconf=default.conf.ubuntu |
6f75ba0b DE |
43 | ;; |
44 | redhat|fedora|oracle|oracleserver) | |
3a647d58 | 45 | distroconf=default.conf.libvirt |
6f75ba0b DE |
46 | ;; |
47 | *) | |
48 | echo -n "Linux distribution network config unknown, defaulting to lxc.network.type = empty" | |
3a647d58 | 49 | distroconf=default.conf.unknown |
6f75ba0b DE |
50 | ;; |
51 | esac | |
52 | AC_MSG_RESULT([$with_distro]) | |
6f75ba0b | 53 | AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu"]) |
025f59ab | 54 | AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"]) |
be2e4e54 | 55 | |
c75c30ec | 56 | # Detect the newuidmap tool (required for userns) |
d155b47d SH |
57 | AC_CHECK_PROG([NEWUIDMAP], [newuidmap], [newuidmap]) |
58 | AM_CONDITIONAL([HAVE_NEWUIDMAP], [test -n "$NEWUIDMAP"]) | |
59 | ||
8aa4885c | 60 | # Allow disabling rpath |
1c41ddcb GK |
61 | AC_ARG_ENABLE([rpath], |
62 | [AC_HELP_STRING([--disable-rpath], [do not set rpath in executables])], | |
63 | [], [enable_rpath=yes]) | |
1c41ddcb GK |
64 | AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"]) |
65 | ||
8aa4885c | 66 | # Documentation (manpages) |
5c8f9bd8 | 67 | AC_ARG_ENABLE([doc], |
7f951458 | 68 | [AC_HELP_STRING([--enable-doc], [make mans (requires docbook2man or docbook2x-man to be installed) [default=auto]])], |
5c8f9bd8 AN |
69 | [], [enable_doc=auto]) |
70 | ||
71 | if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then | |
7822022c | 72 | db2xman="" |
7f951458 | 73 | dbparsers="docbook2x-man db2x_docbook2man docbook2man" |
69fe23ff | 74 | |
7822022c | 75 | AC_MSG_CHECKING(for docbook2x-man) |
69fe23ff | 76 | for name in ${dbparsers}; do |
7822022c SG |
77 | if "$name" --help >/dev/null 2>&1; then |
78 | db2xman="$name" | |
79 | break; | |
80 | fi | |
81 | done | |
82 | ||
83 | if test -n "${db2xman}"; then | |
8aa4885c | 84 | AC_MSG_RESULT([${db2xman}]) |
7822022c | 85 | else |
8aa4885c | 86 | AC_MSG_RESULT([no]) |
7822022c SG |
87 | if test "x$enable_doc" = "xyes"; then |
88 | AC_MSG_ERROR([docbook2x-man required by man request, but not found]) | |
89 | fi | |
90 | fi | |
91 | ||
92 | AC_SUBST(db2xman) | |
5c8f9bd8 | 93 | fi |
8aa4885c | 94 | AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$db2xman" != "x"]) |
7cb14f34 | 95 | AM_CONDITIONAL([USE_DOCBOOK2X], [test "x$db2xman" != "xdocbook2man"]) |
5c8f9bd8 | 96 | |
7f951458 DE |
97 | if test "x$db2xman" = "xdocbook2man"; then |
98 | docdtd="\"-//Davenport//DTD DocBook V3.0//EN\"" | |
99 | else | |
100 | docdtd="\"-//OASIS//DTD DocBook XML\" \"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\"" | |
101 | fi | |
102 | AC_SUBST(docdtd) | |
103 | ||
8aa4885c | 104 | # Apparmor |
e767dd55 SH |
105 | AC_ARG_ENABLE([apparmor], |
106 | [AC_HELP_STRING([--enable-apparmor], [enable apparmor])], | |
107 | [], [enable_apparmor=check]) | |
108 | ||
109 | if test "$enable_apparmor" = "check" ; then | |
110 | AC_CHECK_LIB([apparmor],[aa_change_profile],[enable_apparmor=yes], [enable_apparmor=no]) | |
111 | fi | |
e767dd55 SH |
112 | AM_CONDITIONAL([ENABLE_APPARMOR], [test "x$enable_apparmor" = "xyes"]) |
113 | ||
3ce74686 SH |
114 | AC_CHECK_LIB([gnutls], [gnutls_hash_fast]) |
115 | ||
e075f5d9 | 116 | AM_COND_IF([ENABLE_APPARMOR], |
8aa4885c SG |
117 | [AC_CHECK_HEADER([sys/apparmor.h],[],[AC_MSG_ERROR([You must install the AppArmor development package in order to compile lxc])]) |
118 | AC_CHECK_LIB([apparmor], [aa_change_profile],[],[AC_MSG_ERROR([You must install the AppArmor development package in order to compile lxc])]) | |
119 | AC_SUBST([APPARMOR_LIBS], [-lapparmor])]) | |
e075f5d9 | 120 | |
fe4de9a6 DE |
121 | # SELinux |
122 | AC_ARG_ENABLE([selinux], | |
123 | [AC_HELP_STRING([--enable-selinux], [enable SELinux support])], | |
124 | [], [enable_selinux=check]) | |
125 | ||
126 | if test "x$enable_selinux" = xcheck; then | |
127 | AC_CHECK_LIB([selinux],[setexeccon_raw],[enable_selinux=yes],[enable_selinux=no]) | |
128 | fi | |
129 | AM_CONDITIONAL([ENABLE_SELINUX], [test "x$enable_selinux" = "xyes"]) | |
130 | AM_COND_IF([ENABLE_SELINUX], | |
131 | [AC_CHECK_HEADER([selinux/selinux.h],[],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])]) | |
132 | AC_CHECK_LIB([selinux], [setexeccon_raw],[],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])]) | |
133 | AC_SUBST([SELINUX_LIBS])]) | |
134 | ||
8aa4885c | 135 | # Seccomp syscall filter |
e767dd55 SH |
136 | AC_ARG_ENABLE([seccomp], |
137 | [AC_HELP_STRING([--enable-seccomp], [enable seccomp])], | |
138 | [], [enable_seccomp=check]) | |
139 | ||
140 | if test "$enable_seccomp" = "check" ; then | |
141 | AC_CHECK_LIB([seccomp],[seccomp_init],[enable_seccomp=yes],[enable_seccomp=no]) | |
142 | fi | |
e767dd55 SH |
143 | AM_CONDITIONAL([ENABLE_SECCOMP], [test "x$enable_seccomp" = "xyes"]) |
144 | ||
8f2c3a70 | 145 | AM_COND_IF([ENABLE_SECCOMP], |
8aa4885c SG |
146 | [AC_CHECK_HEADER([seccomp.h],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])]) |
147 | AC_CHECK_LIB([seccomp], [seccomp_init],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])]) | |
148 | AC_SUBST([SECCOMP_LIBS], [-lseccomp])]) | |
8f2c3a70 | 149 | |
769872f9 SH |
150 | # HAVE_SCMP_FILTER_CTX=1 will tell us we have libseccomp api >= 1.0.0 |
151 | AC_CHECK_TYPES([scmp_filter_ctx], [], [], [#include <seccomp.h>]) | |
152 | ||
8aa4885c | 153 | # Configuration examples |
3fb0a9bb AN |
154 | AC_ARG_ENABLE([examples], |
155 | [AC_HELP_STRING([--disable-examples], [do not install configuration examples])], | |
156 | [], [enable_examples=yes]) | |
3fb0a9bb AN |
157 | AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"]) |
158 | ||
8aa4885c | 159 | # Python3 module and scripts |
be2e4e54 SG |
160 | AC_ARG_ENABLE([python], |
161 | [AC_HELP_STRING([--enable-python], [enable python binding])], | |
162 | [enable_python=yes], [enable_python=no]) | |
be2e4e54 SG |
163 | AM_CONDITIONAL([ENABLE_PYTHON], [test "x$enable_python" = "xyes"]) |
164 | ||
165 | AM_COND_IF([ENABLE_PYTHON], | |
8aa4885c | 166 | [AM_PATH_PYTHON([3.2], [], [AC_MSG_ERROR([You must install python3])]) |
59ec0a36 | 167 | PKG_CHECK_MODULES([PYTHONDEV], [python3 >= 3.2],[],[AC_MSG_ERROR([You must install python3-dev])]) |
8aa4885c | 168 | AC_DEFINE_UNQUOTED([ENABLE_PYTHON], 1, [Python3 is available])]) |
be2e4e54 | 169 | |
3a1675bf DE |
170 | # Not in older autoconf versions |
171 | # AS_VAR_COPY(DEST, SOURCE) | |
172 | # ------------------------- | |
173 | # Set the polymorphic shell variable DEST to the contents of the polymorphic | |
174 | # shell variable SOURCE. | |
175 | m4_ifdef([AS_VAR_COPY], [], | |
176 | [AC_DEFUN([AS_VAR_COPY], | |
177 | [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) | |
178 | ]) | |
179 | ||
12e93188 NC |
180 | dnl PKG_CHECK_VAR was introduced with pkg-config 0.28 |
181 | m4_ifdef([PKG_CHECK_VAR], [], | |
182 | [AC_DEFUN([PKG_CHECK_VAR], | |
183 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
184 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl | |
185 | _PKG_CONFIG([$1], [variable="][$3]["], [$2]) | |
186 | AS_VAR_COPY([$1], [pkg_cv_][$1]) | |
187 | AS_VAR_IF([$1], [""], [$5], [$4])dnl | |
188 | ])# PKG_CHECK_VAR | |
189 | ]) | |
f080ffd7 | 190 | |
12e93188 | 191 | # Lua module and scripts |
f080ffd7 DE |
192 | AC_ARG_ENABLE([lua], |
193 | [AC_HELP_STRING([--enable-lua], [enable lua binding])], | |
f756cda0 | 194 | [], [enable_lua=check]) |
f080ffd7 | 195 | |
12e93188 NC |
196 | AC_ARG_WITH([lua-pc], |
197 | [AS_HELP_STRING( | |
198 | [--with-lua-pc=PKG], | |
199 | [Specify pkg-config package name for lua] | |
f756cda0 NC |
200 | )], [], [with_lua_pc=no]) |
201 | ||
202 | if test "x$enable_lua" = "xyes" -a "x$with_lua_pc" != "xno"; then | |
203 | # exit with error if not found | |
204 | PKG_CHECK_MODULES([LUA], [$with_lua_pc], [LUAPKGCONFIG=$with_lua_pc]) | |
205 | fi | |
206 | ||
207 | if test "x$enable_lua" = "xcheck" -a "x$with_lua_pc" != "xno"; then | |
208 | PKG_CHECK_MODULES([LUA], [$with_lua_pc], | |
209 | [LUAPKGCONFIG=$with_lua_pc | |
210 | enable_lua=yes], | |
211 | [enable_lua=no]) | |
212 | fi | |
213 | ||
214 | if test "x$enable_lua" != "xno"; then | |
215 | PKG_CHECK_MODULES([LUA], [lua], [LUAPKGCONFIG=lua], | |
216 | [PKG_CHECK_MODULES([LUA], [lua5.2], [LUAPKGCONFIG=lua5.2], | |
217 | [PKG_CHECK_MODULES([LUA], [lua5.1], [LUAPKGCONFIG=lua5.1], | |
218 | [AS_IF([test "x$enable_lua" = "xyes"], | |
219 | [AC_MSG_ERROR([Lua not found. Please use --with-lua-pc=PKG])], | |
220 | [enable_lua=no])] | |
221 | )] | |
222 | )]) | |
223 | AS_IF([test "x$LUAPKGCONFIG" != "x"], [enable_lua=yes]) | |
224 | fi | |
12e93188 NC |
225 | |
226 | AM_CONDITIONAL([ENABLE_LUA], | |
69c757b3 | 227 | [test "x$enable_lua" = "xyes"]) |
f080ffd7 DE |
228 | |
229 | AM_COND_IF([ENABLE_LUA], | |
f756cda0 | 230 | [AC_MSG_CHECKING([Lua version]) |
12e93188 NC |
231 | PKG_CHECK_VAR([LUA_VERSION], [$LUAPKGCONFIG], [V],, |
232 | [PKG_CHECK_VAR([LUA_VERSION], [$LUAPKGCONFIG], [major_version])]) | |
233 | AC_MSG_RESULT([$LUA_VERSION]) | |
234 | PKG_CHECK_VAR([LUA_INSTALL_CMOD], [$LUAPKGCONFIG], [INSTALL_CMOD],, | |
235 | [LUA_INSTALL_CMOD=$libdir/lua/$LUA_VERSION]) | |
236 | PKG_CHECK_VAR([LUA_INSTALL_LMOD], [$LUAPKGCONFIG], [INSTALL_LMOD],, | |
237 | [LUA_INSTALL_LMOD=$datadir/lua/$LUA_VERSION]) | |
238 | ]) | |
f080ffd7 | 239 | |
8aa4885c | 240 | # Optional test binaries |
525421c9 SG |
241 | AC_ARG_ENABLE([tests], |
242 | [AC_HELP_STRING([--enable-tests], [build test/example binaries])], | |
243 | [enable_tests=yes], [enable_tests=no]) | |
525421c9 SG |
244 | AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"]) |
245 | ||
8aa4885c | 246 | # LXC container path, where the containers are actually stored |
fbf5de31 | 247 | # This is overridden by an entry in the file called LXCCONF |
2a59a681 | 248 | # (i.e. /etc/lxc/lxc.conf) |
aef4ebcf AN |
249 | AC_ARG_WITH([config-path], |
250 | [AC_HELP_STRING( | |
251 | [--with-config-path=dir], | |
e892973e | 252 | [lxc configuration repository path] |
1c41ddcb | 253 | )], [], [with_config_path=['${localstatedir}/lib/lxc']]) |
aef4ebcf | 254 | |
2a59a681 SH |
255 | # The path of the global lxc configuration file. |
256 | AC_ARG_WITH([global-conf], | |
257 | [AC_HELP_STRING( | |
258 | [--with-global-conf=dir], | |
259 | [global lxc configuration file] | |
260 | )], [], [with_global_conf=['${sysconfdir}/lxc/lxc.conf']]) | |
261 | ||
c75c30ec | 262 | # The path of the userns network configuration file |
070a4b8e SH |
263 | AC_ARG_WITH([usernic-conf], |
264 | [AC_HELP_STRING( | |
265 | [--with-usernic-conf], | |
266 | [user network interface configuration file] | |
267 | )], [], [with_usernic_conf=['${sysconfdir}/lxc/lxc-usernet']]) | |
268 | ||
c75c30ec | 269 | # The path of the runtime usernic database |
070a4b8e SH |
270 | AC_ARG_WITH([usernic-db], |
271 | [AC_HELP_STRING( | |
272 | [--with-usernic-db], | |
273 | [lxc user nic database] | |
274 | )], [], [with_usernic_db=['/run/lxc/nics']]) | |
275 | ||
8aa4885c | 276 | # Rootfs path, where the container mount structure is assembled |
196db713 DL |
277 | AC_ARG_WITH([rootfs-path], |
278 | [AC_HELP_STRING( | |
279 | [--with-rootfs-path=dir], | |
280 | [lxc rootfs mount point] | |
1c41ddcb | 281 | )], [], [with_rootfs_path=['${libdir}/lxc/rootfs']]) |
c75c30ec | 282 | |
6e16552d CS |
283 | # cgroup pattern specification |
284 | AC_ARG_WITH([cgroup-pattern], | |
285 | [AC_HELP_STRING( | |
286 | [--with-cgroup-pattern=pattern], | |
287 | [pattern for container cgroups] | |
288 | )], [], [with_cgroup_pattern=['/lxc/%n']]) | |
196db713 | 289 | |
5e1e7aaf SH |
290 | # Container log path. By default, use $lxcpath. |
291 | AC_MSG_CHECKING([Whether to place logfiles in container config path]) | |
292 | AC_ARG_ENABLE([configpath-log], | |
293 | [AC_HELP_STRING([--enable-configpath-log], [use logfiles in config path])], | |
294 | [use_configpath_logs=yes], [use_configpath_logs=no]) | |
295 | AC_MSG_RESULT([$use_configpath_logs]) | |
296 | AM_CONDITIONAL([USE_CONFIGPATH_LOGS], [test "$use_configpath_logs" = "yes"]) | |
297 | ||
298 | if test "$use_configpath_logs" = "yes"; then | |
299 | default_log_path="${with_config_path}" | |
300 | else | |
89d556d8 | 301 | default_log_path="${localstatedir}/log/lxc" |
5e1e7aaf SH |
302 | fi |
303 | ||
304 | AC_ARG_WITH([log-path], | |
305 | [AC_HELP_STRING( | |
306 | [--with-log-path=dir], | |
307 | [per container log path] | |
308 | )], [], [with_log_path=['${default_log_path}']]) | |
309 | ||
8aa4885c SG |
310 | # Expand some useful variables |
311 | AS_AC_EXPAND(PREFIX, "$prefix") | |
312 | AS_AC_EXPAND(LIBDIR, "$libdir") | |
313 | AS_AC_EXPAND(BINDIR, "$bindir") | |
314 | AS_AC_EXPAND(LIBEXECDIR, "$libexecdir") | |
315 | AS_AC_EXPAND(INCLUDEDIR, "$includedir") | |
316 | AS_AC_EXPAND(SYSCONFDIR, "$sysconfdir") | |
0a18b545 | 317 | AS_AC_EXPAND(LXC_DEFAULT_CONFIG, "$sysconfdir/lxc/default.conf") |
8aa4885c SG |
318 | AS_AC_EXPAND(DATADIR, "$datadir") |
319 | AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir") | |
320 | AS_AC_EXPAND(DOCDIR, "$docdir") | |
3a647d58 | 321 | AS_AC_EXPAND(LXC_DISTRO_CONF, "$distroconf") |
aef4ebcf | 322 | AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)") |
8aa4885c | 323 | AS_AC_EXPAND(LXCPATH, "$with_config_path") |
2a59a681 | 324 | AS_AC_EXPAND(LXC_GLOBAL_CONF, "$with_global_conf") |
070a4b8e SH |
325 | AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf") |
326 | AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db") | |
8aa4885c SG |
327 | AS_AC_EXPAND(LXCROOTFSMOUNT, "$with_rootfs_path") |
328 | AS_AC_EXPAND(LXCTEMPLATEDIR, "$datadir/lxc/templates") | |
906f8c4d | 329 | AS_AC_EXPAND(LXCHOOKDIR, "$datadir/lxc/hooks") |
8aa4885c | 330 | AS_AC_EXPAND(LXCINITDIR, "$libexecdir") |
5e1e7aaf | 331 | AS_AC_EXPAND(LOGPATH, "$with_log_path") |
6e16552d | 332 | AC_SUBST(DEFAULT_CGROUP_PATTERN, ["$with_cgroup_pattern"]) |
881450bb | 333 | |
8aa4885c | 334 | # Check for some standard kernel headers |
910bb4fa | 335 | AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h], |
8aa4885c SG |
336 | [], |
337 | AC_MSG_ERROR([Please install the Linux kernel headers.]), | |
338 | [#include <sys/socket.h>]) | |
35f549fe | 339 | |
495d2046 SG |
340 | # Allow disabling libcap support |
341 | AC_ARG_ENABLE([capabilities], | |
342 | [AC_HELP_STRING([--disable-capabilities], [disable kernel capabilities])], | |
343 | [], [enable_capabilities=yes]) | |
344 | ||
8aa4885c | 345 | # Check for libcap support |
495d2046 SG |
346 | if test "x$enable_capabilities" = "xyes"; then |
347 | AC_CHECK_LIB(cap,cap_set_proc,caplib=yes,caplib=no) | |
348 | AC_MSG_CHECKING([linux capabilities]) | |
349 | if test "x$caplib" = "xyes" ; then | |
350 | CAP_LIBS="-lcap" | |
351 | AC_MSG_RESULT([$CAP_LIBS]) | |
352 | else | |
353 | AC_MSG_RESULT([no]) | |
354 | AC_MSG_ERROR([You are missing libcap support. If you really want to build without kernel capabilities, use --disable-capabilities]) | |
355 | fi | |
0af683cf | 356 | else |
495d2046 | 357 | CAP_LIBS="" |
0af683cf | 358 | fi |
359 | AC_SUBST([CAP_LIBS]) | |
35f549fe | 360 | |
a6168a17 SG |
361 | # Check for alternate C libraries |
362 | AC_MSG_CHECKING(for bionic libc) | |
363 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | |
8aa4885c | 364 | [[#ifndef __ANDROID__ |
a6168a17 SG |
365 | error: Not bionic! |
366 | #endif]])], | |
8aa4885c SG |
367 | [is_bionic=yes], |
368 | [is_bionic=no]) | |
a6168a17 | 369 | if test "x$is_bionic" = "xyes"; then |
8aa4885c SG |
370 | AC_DEFINE([IS_BIONIC], 1, [bionic libc]) |
371 | AC_MSG_RESULT([yes]) | |
a6168a17 | 372 | else |
8aa4885c | 373 | AC_MSG_RESULT([no]) |
a6168a17 SG |
374 | fi |
375 | AM_CONDITIONAL([IS_BIONIC], [test "x$is_bionic" = "xyes"]) | |
376 | ||
656994bb MH |
377 | # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP |
378 | AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>]) | |
379 | ||
e827ff7e | 380 | # Check for some headers |
4ba0d9af | 381 | AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h]) |
ff218c25 | 382 | |
2d76d1d7 | 383 | # Check for some syscalls functions |
511a6936 | 384 | AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr]) |
2d76d1d7 | 385 | |
e827ff7e | 386 | # Check for some functions |
740ee8c7 | 387 | AC_CHECK_LIB(util, openpty) |
edaf8b1b | 388 | AC_CHECK_FUNCS([openpty hasmntopt setmntent endmntent]) |
1ba0013f SG |
389 | AC_CHECK_FUNCS([getline], |
390 | AM_CONDITIONAL(HAVE_GETLINE, true) | |
391 | AC_DEFINE(HAVE_GETLINE,1,[Have getline]), | |
392 | AM_CONDITIONAL(HAVE_GETLINE, false)) | |
393 | AC_CHECK_FUNCS([fgetln], | |
394 | AM_CONDITIONAL(HAVE_FGETLN, true) | |
395 | AC_DEFINE(HAVE_FGETLN,1,[Have fgetln]), | |
396 | AM_CONDITIONAL(HAVE_FGETLN, false)) | |
397 | ||
c9a84173 SG |
398 | # Check for some libraries |
399 | AC_SEARCH_LIBS(sem_open, [rt pthread]) | |
336d5469 | 400 | AC_SEARCH_LIBS(clock_gettime, [rt]) |
c9a84173 | 401 | |
8aa4885c | 402 | # Check for some standard binaries |
5e97c3fc | 403 | AC_PROG_GCC_TRADITIONAL |
95a717e9 | 404 | AC_PROG_SED |
5e97c3fc | 405 | |
406 | if test "x$GCC" = "xyes"; then | |
8aa4885c | 407 | CFLAGS="$CFLAGS -Wall -Werror" |
5e97c3fc | 408 | fi |
409 | ||
8aa4885c | 410 | # Files requiring some variable expansion |
5e97c3fc | 411 | AC_CONFIG_FILES([ |
288063bd | 412 | Makefile |
b6345ba1 | 413 | lxc.pc |
5e97c3fc | 414 | lxc.spec |
288063bd | 415 | config/Makefile |
d823d5b9 | 416 | |
288063bd | 417 | doc/Makefile |
4019712d SG |
418 | doc/legacy/lxc-ls.sgml |
419 | doc/lxc-attach.sgml | |
420 | doc/lxc-cgroup.sgml | |
421 | doc/lxc-checkconfig.sgml | |
422 | doc/lxc-checkpoint.sgml | |
11cddd70 | 423 | doc/lxc-clone.sgml |
4019712d | 424 | doc/lxc-console.sgml |
d823d5b9 | 425 | doc/lxc-create.sgml |
426 | doc/lxc-destroy.sgml | |
4019712d | 427 | doc/lxc-device.sgml |
d823d5b9 | 428 | doc/lxc-execute.sgml |
d823d5b9 | 429 | doc/lxc-freeze.sgml |
4019712d SG |
430 | doc/lxc-info.sgml |
431 | doc/lxc-kill.sgml | |
d823d5b9 | 432 | doc/lxc-ls.sgml |
4019712d SG |
433 | doc/lxc-monitor.sgml |
434 | doc/lxc-netstat.sgml | |
d823d5b9 | 435 | doc/lxc-ps.sgml |
4019712d | 436 | doc/lxc-restart.sgml |
813a4837 | 437 | doc/lxc-snapshot.sgml |
4019712d SG |
438 | doc/lxc-start-ephemeral.sgml |
439 | doc/lxc-start.sgml | |
440 | doc/lxc-stop.sgml | |
f080ffd7 | 441 | doc/lxc-top.sgml |
4019712d SG |
442 | doc/lxc-unfreeze.sgml |
443 | doc/lxc-unshare.sgml | |
444 | doc/lxc-version.sgml | |
445 | doc/lxc-wait.sgml | |
446 | ||
8a67a2b2 | 447 | doc/lxc.conf.sgml |
8b8b04f8 | 448 | doc/lxc.sgml |
10fba81b | 449 | doc/common_options.sgml |
99e4008c | 450 | doc/see_also.sgml |
d823d5b9 | 451 | |
baf6671f DL |
452 | doc/rootfs/Makefile |
453 | ||
0f71d073 DL |
454 | doc/examples/Makefile |
455 | doc/examples/lxc-macvlan.conf | |
26c39028 | 456 | doc/examples/lxc-vlan.conf |
0f71d073 DL |
457 | doc/examples/lxc-no-netns.conf |
458 | doc/examples/lxc-empty-netns.conf | |
459 | doc/examples/lxc-phys.conf | |
460 | doc/examples/lxc-veth.conf | |
c553a9c2 | 461 | doc/examples/lxc-complex.conf |
0f71d073 | 462 | |
57da8c32 KY |
463 | doc/ja/Makefile |
464 | doc/ja/legacy/lxc-ls.sgml | |
465 | doc/ja/lxc-attach.sgml | |
466 | doc/ja/lxc-cgroup.sgml | |
467 | doc/ja/lxc-checkconfig.sgml | |
468 | doc/ja/lxc-checkpoint.sgml | |
469 | doc/ja/lxc-clone.sgml | |
470 | doc/ja/lxc-console.sgml | |
471 | doc/ja/lxc-create.sgml | |
472 | doc/ja/lxc-destroy.sgml | |
473 | doc/ja/lxc-device.sgml | |
474 | doc/ja/lxc-execute.sgml | |
475 | doc/ja/lxc-freeze.sgml | |
476 | doc/ja/lxc-info.sgml | |
477 | doc/ja/lxc-kill.sgml | |
478 | doc/ja/lxc-ls.sgml | |
479 | doc/ja/lxc-monitor.sgml | |
480 | doc/ja/lxc-netstat.sgml | |
481 | doc/ja/lxc-ps.sgml | |
482 | doc/ja/lxc-restart.sgml | |
ebe0aeb1 | 483 | doc/ja/lxc-snapshot.sgml |
57da8c32 KY |
484 | doc/ja/lxc-start-ephemeral.sgml |
485 | doc/ja/lxc-start.sgml | |
486 | doc/ja/lxc-stop.sgml | |
487 | doc/ja/lxc-top.sgml | |
488 | doc/ja/lxc-unfreeze.sgml | |
489 | doc/ja/lxc-unshare.sgml | |
490 | doc/ja/lxc-version.sgml | |
491 | doc/ja/lxc-wait.sgml | |
492 | ||
493 | doc/ja/lxc.conf.sgml | |
494 | doc/ja/lxc.sgml | |
495 | doc/ja/common_options.sgml | |
496 | doc/ja/see_also.sgml | |
497 | ||
906f8c4d SG |
498 | hooks/Makefile |
499 | ||
c01d62f2 | 500 | templates/Makefile |
58a46e06 | 501 | templates/lxc-cirros |
c01d62f2 | 502 | templates/lxc-debian |
7c382572 | 503 | templates/lxc-ubuntu |
d1458ac8 | 504 | templates/lxc-ubuntu-cloud |
c840b37d | 505 | templates/lxc-opensuse |
c01d62f2 DL |
506 | templates/lxc-busybox |
507 | templates/lxc-fedora | |
9aad9d12 | 508 | templates/lxc-openmandriva |
708f4a80 | 509 | templates/lxc-oracle |
262f4e48 | 510 | templates/lxc-altlinux |
c01d62f2 | 511 | templates/lxc-sshd |
f6267d90 | 512 | templates/lxc-archlinux |
2a9a0a08 | 513 | templates/lxc-alpine |
cab79123 | 514 | templates/lxc-plamo |
c9844b87 | 515 | |
288063bd | 516 | src/Makefile |
5e97c3fc | 517 | src/lxc/Makefile |
518 | src/lxc/lxc-ps | |
9d0195cb | 519 | src/lxc/lxc-netstat |
237315ff | 520 | src/lxc/lxc-checkconfig |
bcd952a1 | 521 | src/lxc/lxc-version |
5b12984b | 522 | src/lxc/lxc-start-ephemeral |
6a85cf91 | 523 | src/lxc/legacy/lxc-ls |
2a59a681 | 524 | src/lxc/lxc.functions |
c9844b87 | 525 | |
be2e4e54 SG |
526 | src/python-lxc/Makefile |
527 | ||
f080ffd7 DE |
528 | src/lua-lxc/Makefile |
529 | ||
72d0e1cb | 530 | src/tests/Makefile |
5e97c3fc | 531 | ]) |
532 | AC_CONFIG_COMMANDS([default],[[]],[[]]) | |
533 | AC_OUTPUT |