configure.ac revision 6371febf3c7d181cb0f11209df67c35f9d7b233b
154N/A# -*- Autoconf -*-
154N/A# Process this file with autoconf to produce a configure script.
154N/A
154N/AAC_INIT([lxc], [0.7.5])
154N/A
154N/AAC_CONFIG_SRCDIR([configure.ac])
154N/AAC_CONFIG_AUX_DIR([config])
154N/AAM_CONFIG_HEADER([src/config.h])
154N/AAM_INIT_AUTOMAKE([-Wno-portability])
154N/AAC_CANONICAL_HOST
154N/AAM_PROG_CC_C_O
154N/AAC_GNU_SOURCE
154N/AAC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
154N/A
154N/AAC_ARG_ENABLE([doc],
154N/A [AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
154N/A [], [enable_doc=auto])
154N/A
154N/Aif test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
154N/A AC_CHECK_PROG(have_docbook, [docbook2man], [yes], [no])
533N/A
154N/A test "x$have_docbook" = "xno" -a "x$enable_doc" = "xyes" && \
3301N/A AC_MSG_ERROR([docbook2man required by man request, but not found])
154N/Afi
154N/A
61N/AAM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
61N/A
155N/AAC_ARG_ENABLE([examples],
61N/A [AC_HELP_STRING([--disable-examples], [do not install configuration examples])],
533N/A [], [enable_examples=yes])
533N/A
533N/AAM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
154N/A
61N/AAS_AC_EXPAND(PREFIX, $prefix)
3301N/AAS_AC_EXPAND(LIBDIR, $libdir)
61N/AAS_AC_EXPAND(BINDIR, $bindir)
61N/AAS_AC_EXPAND(INCLUDEDIR, $includedir)
61N/AAS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
1173N/AAS_AC_EXPAND(DATADIR, $datadir)
1173N/AAS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
1173N/AAS_AC_EXPAND(DOCDIR, $docdir)
1173N/A
155N/AAC_ARG_WITH([config-path],
61N/A [AC_HELP_STRING(
61N/A [--with-config-path=dir],
61N/A [lxc configuration repository path]
61N/A )], [], [with_config_path="${localstatedir}/lib/lxc"])
61N/A
61N/AAC_ARG_WITH([rootfs-path],
61N/A [AC_HELP_STRING(
61N/A [--with-rootfs-path=dir],
61N/A [lxc rootfs mount point]
61N/A )], [], [with_rootfs_path="${libdir}/lxc/rootfs"])
61N/A
155N/AAS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
61N/A
61N/AAS_AC_EXPAND(LXCPATH, "${with_config_path}")
155N/AAS_AC_EXPAND(LXCROOTFSMOUNT, "${with_rootfs_path}")
61N/AAS_AC_EXPAND(LXCINITDIR, $libdir/lxc)
61N/AAS_AC_EXPAND(LXCTEMPLATEDIR, $libdir/lxc/templates)
61N/AAH_TEMPLATE([LXCPATH], [lxc configuration repository])
61N/AAH_TEMPLATE([LXCINITDIR], [lxc-init directory location])
61N/AAH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point])
61N/AAC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
61N/AAC_DEFINE_UNQUOTED(LXCINITDIR, "$LXCINITDIR")
61N/AAC_DEFINE_UNQUOTED(LXCROOTFSMOUNT, "$LXCROOTFSMOUNT")
61N/A
61N/AAC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
61N/A [],
61N/A AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
61N/A [#include <sys/socket.h>
61N/A ])
61N/A
61N/AAC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
61N/A[#include <sys/types.h>
61N/A#include <sys/capability.h>])
1173N/AAC_CHECK_LIB(cap,cap_set_proc,caplib=yes,caplib=no)
1173N/AAC_MSG_CHECKING([linux capabilities])
1173N/Aif test "x$caplib" = "xyes" ; then
1173N/A CAP_LIBS="-lcap"
155N/A AC_MSG_RESULT([$CAP_LIBS])
61N/Aelse
61N/A AC_MSG_ERROR([not found])
61N/Afi
155N/AAC_SUBST([CAP_LIBS])
61N/A
61N/A# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
61N/AAC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
155N/A
61N/AAC_CHECK_HEADERS([sys/signalfd.h])
61N/A
61N/AAC_PROG_GCC_TRADITIONAL
61N/A
61N/AAC_LINUX
61N/A
61N/Aif test "x$GCC" = "xyes"; then
533N/A CFLAGS="$CFLAGS -Wall"
533N/Afi
61N/A
61N/AAC_CONFIG_FILES([
61N/A Makefile
1185N/A lxc.pc
61N/A lxc.spec
61N/A config/Makefile
61N/A
61N/A doc/Makefile
533N/A doc/lxc-create.sgml
533N/A doc/lxc-destroy.sgml
61N/A doc/lxc-execute.sgml
61N/A doc/lxc-start.sgml
533N/A doc/lxc-checkpoint.sgml
533N/A doc/lxc-restart.sgml
61N/A doc/lxc-stop.sgml
61N/A doc/lxc-console.sgml
154N/A doc/lxc-freeze.sgml
61N/A doc/lxc-unfreeze.sgml
61N/A doc/lxc-monitor.sgml
61N/A doc/lxc-wait.sgml
61N/A doc/lxc-ls.sgml
155N/A doc/lxc-ps.sgml
61N/A doc/lxc-cgroup.sgml
61N/A doc/lxc-kill.sgml
61N/A doc/lxc.conf.sgml
61N/A doc/lxc.sgml
155N/A doc/common_options.sgml
533N/A doc/see_also.sgml
533N/A
61N/A doc/rootfs/Makefile
155N/A
61N/A doc/examples/Makefile
61N/A doc/examples/lxc-macvlan.conf
61N/A doc/examples/lxc-vlan.conf
61N/A doc/examples/lxc-no-netns.conf
61N/A doc/examples/lxc-empty-netns.conf
154N/A doc/examples/lxc-phys.conf
533N/A doc/examples/lxc-veth.conf
61N/A doc/examples/lxc-complex.conf
61N/A
155N/A templates/Makefile
61N/A templates/lxc-lenny
61N/A templates/lxc-debian
61N/A templates/lxc-ubuntu
61N/A templates/lxc-opensuse
61N/A templates/lxc-busybox
533N/A templates/lxc-fedora
533N/A templates/lxc-sshd
61N/A
61N/A src/Makefile
61N/A src/lxc/Makefile
61N/A src/lxc/lxc-ps
533N/A src/lxc/lxc-ls
533N/A src/lxc/lxc-netstat
61N/A src/lxc/lxc-checkconfig
61N/A src/lxc/lxc-setcap
154N/A src/lxc/lxc-setuid
533N/A src/lxc/lxc-version
61N/A src/lxc/lxc-create
61N/A src/lxc/lxc-clone
155N/A src/lxc/lxc-destroy
533N/A
533N/A])
61N/AAC_CONFIG_COMMANDS([default],[[]],[[]])
533N/AAC_OUTPUT
61N/A
if test "x$SETCAP" = "xno"; then
AC_MSG_NOTICE([
Warning:
--------
The setcap binary was not found. This means the tools to set the
privilege for the lxc commands are not available, that's ok, but you
will need to run these commands as root or install libcap-2.
])
else
AC_MSG_NOTICE([
Advice:
-------
If you wish to have a non root user to use the lxc tools,
you can add the needed capabilities to the tools by invoking
the 'lxc-setcap' script. To remove the capabilities, use
'lxc-setcap -d'.
])
fi