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