AC_SUBST(bashcompdir)
])
+# Build the command line tools
+AC_ARG_ENABLE([tools],
+ [AC_HELP_STRING([--enable-tools], [build the command line tools [default=yes]])],
+ [], [enable_tools=yes])
+AM_CONDITIONAL([ENABLE_TOOLS], [test "x$enable_tools" = "xyes"])
+
+# Build the liblxc commands
+AC_ARG_ENABLE([commands],
+ [AC_HELP_STRING([--enable-commands], [build the liblxc commands [default=yes]])],
+ [], [enable_commands=yes])
+AM_CONDITIONAL([ENABLE_COMMANDS], [test "x$enable_commands" = "xyes"])
+
# Optional test binaries
AC_ARG_ENABLE([tests],
[AC_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
cat << EOF
----------------------------
+Binaries
+ - Command Line Tools:
+ - lxc-attach: $enable_tools
+ - lxc-autostart: $enable_tools
+ - lxc-cgroup: $enable_tools
+ - lxc-checkpoint: $enable_tools
+ - lxc-config: $enable_tools
+ - lxc-console: $enable_tools
+ - lxc-copy: $enable_tools
+ - lxc-create: $enable_tools
+ - lxc-destroy: $enable_tools
+ - lxc-device: $enable_tools
+ - lxc-execute: $enable_tools
+ - lxc-freeze: $enable_tools
+ - lxc-info: $enable_tools
+ - lxc-ls: $enable_tools
+ - lxc-monitor: $enable_tools
+ - lxc-snapshot: $enable_tools
+ - lxc-start: $enable_tools
+ - lxc-stop: $enable_tools
+ - lxc-top: $enable_tools
+ - lxc-unfreeze: $enable_tools
+ - lxc-unshare: $enable_tools
+ - lxc-wait: $enable_tools
+
+ - liblxc Commands:
+ - lxc-checkconfig: $enable_commands
+ - lxc-update-config: $enable_commands
+ - lxc-init: $enable_commands
+ - lxc-monitord: $enable_commands
+ - lxc-user-nic: $enable_commands
+ - lxc-usernsexec: $enable_commands
+
Environment:
- compiler: $CC
- distribution: $with_distro
liblxc_la_LIBADD = $(CAP_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
-bin_SCRIPTS = cmd/lxc-checkconfig \
- cmd/lxc-update-config
+bin_SCRIPTS=
+if ENABLE_COMMANDS
+bin_SCRIPTS += cmd/lxc-checkconfig \
+ cmd/lxc-update-config
+endif
+
+if ENABLE_TOOLS
EXTRA_DIST = \
tools/lxc-top.lua
bin_SCRIPTS += tools/lxc-start-ephemeral
endif
endif
+endif
+if ENABLE_TOOLS
bin_PROGRAMS = \
lxc-attach \
lxc-autostart \
if ENABLE_DEPRECATED
bin_PROGRAMS += lxc-clone
endif
+endif
+if ENABLE_COMMANDS
sbin_PROGRAMS = init.lxc
pkglibexec_PROGRAMS = \
lxc-monitord \
lxc-user-nic
+endif
AM_LDFLAGS = -Wl,-E
if ENABLE_RPATH
endif
LDADD=liblxc.la @CAP_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
+if ENABLE_TOOLS
lxc_attach_SOURCES = tools/lxc_attach.c tools/arguments.c tools/tool_utils.c
lxc_autostart_SOURCES = tools/lxc_autostart.c tools/arguments.c tools/tool_utils.c
lxc_cgroup_SOURCES = tools/lxc_cgroup.c tools/arguments.c tools/tool_utils.c
lxc_create_SOURCES = tools/lxc_create.c tools/arguments.c tools/tool_utils.c
lxc_snapshot_SOURCES = tools/lxc_snapshot.c tools/arguments.c tools/tool_utils.c
lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c tools/arguments.c tools/tool_utils.c
+endif
+if ENABLE_COMMANDS
# Binaries shipping with liblxc
init_lxc_SOURCES = cmd/lxc_init.c
lxc_monitord_SOURCES = cmd/lxc_monitord.c
lxc_user_nic_SOURCES = cmd/lxc_user_nic.c namespace.c network.c parse.c
lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c
+endif
+
+if ENABLE_TOOLS
if ENABLE_DEPRECATED
lxc_clone_SOURCES = tools/lxc_clone.c tools/arguments.c
endif
if !HAVE_GETSUBOPT
lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
endif
+endif
+if ENABLE_COMMANDS
if HAVE_STATIC_LIBCAP
sbin_PROGRAMS += init.lxc.static
init_lxc_static_LDADD = @CAP_LIBS@
init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
endif
+endif
if ENABLE_PAM
if HAVE_PAM