mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-11 22:04:58 +00:00
autotools: add --{enable,disable}-{commands,tools}
This allows users to only compile the shared libray without having to compile any of the command line tools or command helpers for the shared library. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
19462d43e8
commit
8d0609371e
45
configure.ac
45
configure.ac
@ -477,6 +477,18 @@ AM_COND_IF([ENABLE_BASH],
|
|||||||
AC_SUBST(bashcompdir)
|
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
|
# Optional test binaries
|
||||||
AC_ARG_ENABLE([tests],
|
AC_ARG_ENABLE([tests],
|
||||||
[AC_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
|
[AC_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
|
||||||
@ -950,6 +962,39 @@ AC_OUTPUT
|
|||||||
cat << EOF
|
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:
|
Environment:
|
||||||
- compiler: $CC
|
- compiler: $CC
|
||||||
- distribution: $with_distro
|
- distribution: $with_distro
|
||||||
|
@ -15,46 +15,41 @@ EXTRA_DIST = \
|
|||||||
FAQ.txt
|
FAQ.txt
|
||||||
|
|
||||||
if ENABLE_DOCBOOK
|
if ENABLE_DOCBOOK
|
||||||
man_MANS = \
|
man_MANS = lxc.conf.5 \
|
||||||
lxc-attach.1 \
|
lxc.container.conf.5 \
|
||||||
lxc-autostart.1 \
|
lxc.system.conf.5 \
|
||||||
lxc-cgroup.1 \
|
lxc-usernet.5 \
|
||||||
lxc-checkconfig.1 \
|
lxc.7
|
||||||
lxc-checkpoint.1 \
|
if ENABLE_TOOLS
|
||||||
lxc-config.1 \
|
man_MANS += lxc-attach.1 \
|
||||||
lxc-console.1 \
|
lxc-autostart.1 \
|
||||||
lxc-copy.1 \
|
lxc-cgroup.1 \
|
||||||
lxc-create.1 \
|
lxc-checkconfig.1 \
|
||||||
lxc-destroy.1 \
|
lxc-checkpoint.1 \
|
||||||
lxc-device.1 \
|
lxc-config.1 \
|
||||||
lxc-execute.1 \
|
lxc-console.1 \
|
||||||
lxc-freeze.1 \
|
lxc-copy.1 \
|
||||||
lxc-info.1 \
|
lxc-create.1 \
|
||||||
lxc-ls.1 \
|
lxc-destroy.1 \
|
||||||
lxc-monitor.1 \
|
lxc-device.1 \
|
||||||
lxc-snapshot.1 \
|
lxc-execute.1 \
|
||||||
lxc-start.1 \
|
lxc-freeze.1 \
|
||||||
lxc-stop.1 \
|
lxc-info.1 \
|
||||||
lxc-top.1 \
|
lxc-ls.1 \
|
||||||
lxc-unfreeze.1 \
|
lxc-monitor.1 \
|
||||||
lxc-unshare.1 \
|
lxc-snapshot.1 \
|
||||||
lxc-update-config.1 \
|
lxc-start.1 \
|
||||||
lxc-user-nic.1 \
|
lxc-stop.1 \
|
||||||
lxc-usernsexec.1 \
|
lxc-top.1 \
|
||||||
lxc-wait.1 \
|
lxc-unfreeze.1 \
|
||||||
\
|
lxc-unshare.1 \
|
||||||
lxc.conf.5 \
|
lxc-wait.1
|
||||||
lxc.container.conf.5 \
|
|
||||||
lxc.system.conf.5 \
|
|
||||||
lxc-usernet.5 \
|
|
||||||
\
|
|
||||||
lxc.7
|
|
||||||
|
|
||||||
if ENABLE_DEPRECATED
|
|
||||||
man_MANS += lxc-clone.1
|
|
||||||
if ENABLE_PYTHON
|
|
||||||
man_MANS += lxc-start-ephemeral.1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if ENABLE_COMMANDS
|
||||||
|
man_MANS += lxc-update-config.1 \
|
||||||
|
lxc-user-nic.1 \
|
||||||
|
lxc-usernsexec.1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%.1 : %.sgml
|
%.1 : %.sgml
|
||||||
|
@ -200,9 +200,14 @@ liblxc_la_LDFLAGS = \
|
|||||||
|
|
||||||
liblxc_la_LIBADD = $(CAP_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
|
liblxc_la_LIBADD = $(CAP_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
|
||||||
|
|
||||||
bin_SCRIPTS = cmd/lxc-checkconfig \
|
bin_SCRIPTS=
|
||||||
cmd/lxc-update-config
|
|
||||||
|
|
||||||
|
if ENABLE_COMMANDS
|
||||||
|
bin_SCRIPTS += cmd/lxc-checkconfig \
|
||||||
|
cmd/lxc-update-config
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_TOOLS
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
tools/lxc-top.lua
|
tools/lxc-top.lua
|
||||||
|
|
||||||
@ -211,7 +216,9 @@ if ENABLE_PYTHON
|
|||||||
bin_SCRIPTS += tools/lxc-start-ephemeral
|
bin_SCRIPTS += tools/lxc-start-ephemeral
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_TOOLS
|
||||||
bin_PROGRAMS = \
|
bin_PROGRAMS = \
|
||||||
lxc-attach \
|
lxc-attach \
|
||||||
lxc-autostart \
|
lxc-autostart \
|
||||||
@ -240,11 +247,14 @@ bin_PROGRAMS = \
|
|||||||
if ENABLE_DEPRECATED
|
if ENABLE_DEPRECATED
|
||||||
bin_PROGRAMS += lxc-clone
|
bin_PROGRAMS += lxc-clone
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_COMMANDS
|
||||||
sbin_PROGRAMS = init.lxc
|
sbin_PROGRAMS = init.lxc
|
||||||
pkglibexec_PROGRAMS = \
|
pkglibexec_PROGRAMS = \
|
||||||
lxc-monitord \
|
lxc-monitord \
|
||||||
lxc-user-nic
|
lxc-user-nic
|
||||||
|
endif
|
||||||
|
|
||||||
AM_LDFLAGS = -Wl,-E
|
AM_LDFLAGS = -Wl,-E
|
||||||
if ENABLE_RPATH
|
if ENABLE_RPATH
|
||||||
@ -252,6 +262,7 @@ AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
|
|||||||
endif
|
endif
|
||||||
LDADD=liblxc.la @CAP_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
|
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_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_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_cgroup_SOURCES = tools/lxc_cgroup.c tools/arguments.c tools/tool_utils.c
|
||||||
@ -274,13 +285,18 @@ lxc_wait_SOURCES = tools/lxc_wait.c tools/arguments.c tools/tool_utils.c
|
|||||||
lxc_create_SOURCES = tools/lxc_create.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_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
|
lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c tools/arguments.c tools/tool_utils.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_COMMANDS
|
||||||
# Binaries shipping with liblxc
|
# Binaries shipping with liblxc
|
||||||
init_lxc_SOURCES = cmd/lxc_init.c
|
init_lxc_SOURCES = cmd/lxc_init.c
|
||||||
lxc_monitord_SOURCES = cmd/lxc_monitord.c
|
lxc_monitord_SOURCES = cmd/lxc_monitord.c
|
||||||
lxc_user_nic_SOURCES = cmd/lxc_user_nic.c namespace.c network.c parse.c
|
lxc_user_nic_SOURCES = cmd/lxc_user_nic.c namespace.c network.c parse.c
|
||||||
lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c
|
lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
if ENABLE_TOOLS
|
||||||
if ENABLE_DEPRECATED
|
if ENABLE_DEPRECATED
|
||||||
lxc_clone_SOURCES = tools/lxc_clone.c tools/arguments.c
|
lxc_clone_SOURCES = tools/lxc_clone.c tools/arguments.c
|
||||||
endif
|
endif
|
||||||
@ -288,7 +304,9 @@ endif
|
|||||||
if !HAVE_GETSUBOPT
|
if !HAVE_GETSUBOPT
|
||||||
lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
|
lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_COMMANDS
|
||||||
if HAVE_STATIC_LIBCAP
|
if HAVE_STATIC_LIBCAP
|
||||||
sbin_PROGRAMS += init.lxc.static
|
sbin_PROGRAMS += init.lxc.static
|
||||||
|
|
||||||
@ -304,6 +322,7 @@ init_lxc_static_LDFLAGS = -all-static
|
|||||||
init_lxc_static_LDADD = @CAP_LIBS@
|
init_lxc_static_LDADD = @CAP_LIBS@
|
||||||
init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
|
init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
if ENABLE_PAM
|
if ENABLE_PAM
|
||||||
if HAVE_PAM
|
if HAVE_PAM
|
||||||
|
Loading…
Reference in New Issue
Block a user