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