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