2008-08-06 14:32:29 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2009-07-24 15:25:43 +02:00
|
|
|
AC_INIT([lxc], [0.6.3])
|
2008-08-06 14:32:29 +00:00
|
|
|
|
2009-04-26 11:43:41 +02:00
|
|
|
AC_CONFIG_SRCDIR([configure.ac])
|
2008-08-06 14:32:29 +00:00
|
|
|
AC_CONFIG_AUX_DIR([config])
|
|
|
|
AM_CONFIG_HEADER([src/config.h])
|
|
|
|
AM_INIT_AUTOMAKE([-Wno-portability])
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_GNU_SOURCE
|
2009-07-02 15:42:18 +02:00
|
|
|
AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
|
configure.ac - allow user to switch off/on documentation generation
Andrian Nord <NightNord@gmail.com>:
>> > > As documentation requires docbook2man to be installed, which is not,
>> > > otherwise, required for proper LXC work or compilation process, it
>> > > might be usefull to be able to switch it off.
Michel Normand <normand@fr.ibm.com>:
> > For me, it is Ok to add a --enable/disable/-doc,
> > but not make configure to fail if no option specified
> > and no docbook2man package.
> >
> > For me it should be optionnal.
> > I like the current behaviour where configure is running without option
> > and is enabling/disabling by itself the doc building.
> > Could you send a new patch with this idea ?
Andrian Nord <NightNord@gmail.com>:
Of course. You mean, that you what default behaviour to remain
auto-detection? That is:
--enable-doc: require docbook2man or fail, generate mans
--enable-doc=auto, or not specified (default): check for docbook2man,
generate mans if found, silently ignore if not found (I suppose
diagnostic message is redundant, as information already contains into
./configure --help)
--disable-doc: never check for docbook2man and don't gen mans
Here comes a patch what do this, as far as I see
(I'm sorry for violating post-rules in previous mail, now I'll do all
right, I hope. Should I attach patch anyway, as it might be usefull
for applying?)
Signed-off-by: Andrian Nord <NightNord@gmail.com>
Acked-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-11-04 14:03:44 +01:00
|
|
|
|
|
|
|
AC_ARG_ENABLE([doc],
|
|
|
|
[AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
|
|
|
|
[], [enable_doc=auto])
|
|
|
|
|
|
|
|
if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
|
|
|
|
AC_CHECK_PROG(have_docbook, [docbook2man], [yes], [no])
|
|
|
|
|
|
|
|
test "x$have_docbook" = "xno" -a "x$enable_doc" = "xyes" && \
|
|
|
|
AC_MSG_ERROR([docbook2man required by man request, but not found])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
|
|
|
|
|
2009-11-13 11:48:29 +01:00
|
|
|
AC_ARG_ENABLE([examples],
|
|
|
|
[AC_HELP_STRING([--disable-examples], [do not install configuration examples])],
|
|
|
|
[], [enable_examples=yes])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
|
|
|
|
|
2009-06-10 18:21:48 +02:00
|
|
|
AS_AC_EXPAND(PREFIX, $prefix)
|
|
|
|
AS_AC_EXPAND(LIBDIR, $libdir)
|
2008-12-01 11:50:43 +00:00
|
|
|
AS_AC_EXPAND(BINDIR, $bindir)
|
2009-06-10 18:21:48 +02:00
|
|
|
AS_AC_EXPAND(INCLUDEDIR, $includedir)
|
2009-03-18 17:27:27 +00:00
|
|
|
AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
|
2008-12-01 11:50:43 +00:00
|
|
|
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
|
2009-06-10 18:21:48 +02:00
|
|
|
AS_AC_EXPAND(DATADIR, $datadir)
|
2008-12-01 11:50:43 +00:00
|
|
|
AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
|
2009-03-30 10:12:13 +01:00
|
|
|
AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
|
2009-05-07 19:36:33 +02:00
|
|
|
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
|
2008-10-24 20:14:57 +00:00
|
|
|
|
2009-10-22 15:33:40 +02:00
|
|
|
AH_TEMPLATE([LXCPATH], [lxc configuration repository])
|
|
|
|
AH_TEMPLATE([LXCLIBEXECDIR], [lxc executable library path])
|
|
|
|
AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
|
|
|
|
AC_DEFINE_UNQUOTED(LXCLIBEXECDIR, "$LIBEXECDIR")
|
|
|
|
|
2009-07-26 17:44:12 +02:00
|
|
|
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
|
|
|
|
[],
|
|
|
|
AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
|
|
|
|
[#include <sys/socket.h>
|
|
|
|
])
|
2008-12-09 17:49:21 +00:00
|
|
|
|
|
|
|
AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
|
2009-06-12 16:02:14 +02:00
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <sys/capability.h>])
|
2008-12-09 17:49:21 +00:00
|
|
|
|
2009-03-08 17:09:27 +01:00
|
|
|
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
|
|
|
|
AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
|
|
|
|
|
2009-02-02 14:50:00 +00:00
|
|
|
AC_CHECK_HEADERS([sys/signalfd.h])
|
|
|
|
|
2008-08-06 14:32:29 +00:00
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
|
|
|
|
if test "x$GCC" = "xyes"; then
|
2008-08-06 14:54:00 +00:00
|
|
|
CFLAGS="$CFLAGS -Wall"
|
2008-08-06 14:32:29 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
2009-06-10 18:21:48 +02:00
|
|
|
lxc.pc
|
2008-08-06 14:32:29 +00:00
|
|
|
lxc.spec
|
|
|
|
config/Makefile
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
doc/Makefile
|
|
|
|
doc/lxc-create.sgml
|
|
|
|
doc/lxc-destroy.sgml
|
|
|
|
doc/lxc-execute.sgml
|
|
|
|
doc/lxc-start.sgml
|
|
|
|
doc/lxc-stop.sgml
|
2009-01-25 21:52:38 +00:00
|
|
|
doc/lxc-console.sgml
|
2008-11-18 13:45:49 +00:00
|
|
|
doc/lxc-freeze.sgml
|
|
|
|
doc/lxc-unfreeze.sgml
|
|
|
|
doc/lxc-monitor.sgml
|
|
|
|
doc/lxc-wait.sgml
|
|
|
|
doc/lxc-ls.sgml
|
|
|
|
doc/lxc-ps.sgml
|
2008-11-18 14:27:12 +00:00
|
|
|
doc/lxc-cgroup.sgml
|
2008-11-19 16:58:09 +00:00
|
|
|
doc/lxc.conf.sgml
|
2008-11-20 15:04:09 +00:00
|
|
|
doc/lxc.sgml
|
2009-05-28 15:32:30 +02:00
|
|
|
doc/common_options.sgml
|
2009-05-28 15:32:29 +02:00
|
|
|
doc/see_also.sgml
|
2008-11-18 13:45:49 +00:00
|
|
|
|
2008-11-28 15:36:51 +00:00
|
|
|
scripts/Makefile
|
|
|
|
scripts/lxc-debian
|
2009-03-08 17:09:27 +01:00
|
|
|
scripts/lxc-fedora
|
2008-11-28 15:36:51 +00:00
|
|
|
scripts/lxc-sshd
|
|
|
|
|
2008-08-06 14:32:29 +00:00
|
|
|
src/Makefile
|
|
|
|
src/lxc/Makefile
|
|
|
|
src/lxc/lxc-ps
|
2008-11-18 13:45:49 +00:00
|
|
|
src/lxc/lxc-ls
|
2008-11-21 18:17:38 +00:00
|
|
|
src/lxc/lxc-netstat
|
2009-03-24 13:56:37 +01:00
|
|
|
src/lxc/lxc-checkconfig
|
|
|
|
src/lxc/lxc-setcap
|
2009-06-10 18:49:16 +02:00
|
|
|
src/lxc/lxc-version
|
2009-11-13 11:48:29 +01:00
|
|
|
src/lxc/lxc-create
|
|
|
|
src/lxc/lxc-destroy
|
2008-11-28 15:36:51 +00:00
|
|
|
|
2009-11-13 11:48:29 +01:00
|
|
|
doc/examples/Makefile
|
|
|
|
doc/examples/lxc-macvlan.conf
|
|
|
|
doc/examples/lxc-no-netns.conf
|
|
|
|
doc/examples/lxc-empty-netns.conf
|
|
|
|
doc/examples/lxc-phys.conf
|
|
|
|
doc/examples/lxc-veth.conf
|
|
|
|
doc/examples/lxc-complex-config
|
2008-08-06 14:32:29 +00:00
|
|
|
])
|
|
|
|
AC_CONFIG_COMMANDS([default],[[]],[[]])
|
|
|
|
AC_OUTPUT
|
2008-10-24 20:14:57 +00:00
|
|
|
|
|
|
|
if test "x$SETCAP" = "xno"; then
|
2009-04-26 11:43:41 +02:00
|
|
|
AC_MSG_NOTICE([
|
2008-10-24 20:14:57 +00:00
|
|
|
|
|
|
|
Warning:
|
|
|
|
--------
|
|
|
|
|
2009-07-02 15:42:18 +02:00
|
|
|
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.
|
2008-10-24 20:14:57 +00:00
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2009-04-26 11:43:41 +02:00
|
|
|
AC_MSG_NOTICE([
|
2008-10-24 20:14:57 +00:00
|
|
|
|
|
|
|
Advice:
|
|
|
|
-------
|
|
|
|
|
2009-07-02 15:42:18 +02:00
|
|
|
If you wish to have a non root user to use the lxc tools,
|
2009-03-24 13:56:37 +01:00
|
|
|
you can add the needed capabilities to the tools by invoking
|
|
|
|
the 'lxc-setcap' script. To remove the capabilities, use
|
2009-07-02 15:42:18 +02:00
|
|
|
'lxc-setcap -d'.
|
2008-10-24 20:14:57 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
fi
|