~ubuntu-branches/ubuntu/precise/lxc/precise-updates

« back to all changes in this revision

Viewing changes to .pc/0060-lxc-shutdown/configure.ac

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2012-03-21 08:20:06 UTC
  • Revision ID: package-import@ubuntu.com-20120321082006-bsepg8w3z7qb79xt
Tags: 0.7.5-3ubuntu41
* add lxc-shutdown command:
  - 0060-lxc-shutdown: add the command to the source
  - debian/lxc.upstart: use lxc-shutdown to shut down containers cleanly
  - debian/lxc.default: add LXC_SHUTDOWN_TIMEOUT (default 120s)
* support per-container apparmor policies:  (LP: #953453)
  - 0061-lxc-start-apparmor: add lxc.aa_profile to config file.  If not
    specified, lxc-default profile is used for container.  Otherwise, the
    specified profile is used.
    Note that per-container profiles must be named 'lxc-*'.
  - split debian/lxc-default.apparmor from debian/lxc.apparmor.
  - have /etc/apparmor.d/lxc-containers #include /etc/apparmor.d/lxc/*
  - debian/lxc.postinst: load the new lxc-containers profiles
  - debian/lxc.postrm: remove lxc-containers profiles
  - debian/rules: make new etc/apparmor.d/lxc dir and copy lxc-default into it
  - debian/control: add libapparmor-dev to build-depends
  - debian/lxc.upstart: load apparmor per-container policies at pre-start.
* debian/lxc.apparmor: insert the stricter mount rules for lxc-start
  (LP: #645625) (LP: #942934)
* debian/local/lxc-start-ephemeral: re-enable aufs option (LP: #960262)
* replace upstream lxc-wait with our own bash script (LP: #951181)
  - debian/local/lxc-wait: the script
  - debian/rules: copy the script into place
* 0062-templates-relative-paths: update templates to use relative paths,
  and make lxc-start always accept /var/lib/lxc/CN/rootfs as target prefix,
  to make lvm containers work.  (LP: #960860)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#                                               -*- Autoconf -*-
 
2
# Process this file with autoconf to produce a configure script.
 
3
 
 
4
AC_INIT([lxc], [0.7.5])
 
5
 
 
6
AC_CONFIG_SRCDIR([configure.ac])
 
7
AC_CONFIG_AUX_DIR([config])
 
8
AM_CONFIG_HEADER([src/config.h])
 
9
AM_INIT_AUTOMAKE([-Wno-portability])
 
10
AC_CANONICAL_HOST
 
11
AM_PROG_CC_C_O
 
12
AC_GNU_SOURCE
 
13
AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
 
14
 
 
15
AC_ARG_ENABLE([doc],
 
16
        [AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
 
17
        [], [enable_doc=auto])
 
18
 
 
19
if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
 
20
        AC_CHECK_PROG(have_docbook, [docbook2man], [yes], [no])
 
21
 
 
22
        test "x$have_docbook" = "xno" -a "x$enable_doc" = "xyes" && \
 
23
                AC_MSG_ERROR([docbook2man required by man request, but not found])
 
24
fi
 
25
 
 
26
AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
 
27
 
 
28
AC_ARG_ENABLE([examples],
 
29
        [AC_HELP_STRING([--disable-examples], [do not install configuration examples])],
 
30
        [], [enable_examples=yes])
 
31
 
 
32
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
 
33
 
 
34
AS_AC_EXPAND(PREFIX, $prefix)
 
35
AS_AC_EXPAND(LIBDIR, $libdir)
 
36
AS_AC_EXPAND(BINDIR, $bindir)
 
37
AS_AC_EXPAND(INCLUDEDIR, $includedir)
 
38
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
 
39
AS_AC_EXPAND(DATADIR, $datadir)
 
40
AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
 
41
AS_AC_EXPAND(DOCDIR, $docdir)
 
42
 
 
43
AC_ARG_WITH([config-path],
 
44
        [AC_HELP_STRING(
 
45
                [--with-config-path=dir],
 
46
                [lxc configuration repository path]
 
47
        )], [], [with_config_path="${localstatedir}/lib/lxc"])
 
48
 
 
49
AC_ARG_WITH([rootfs-path],
 
50
        [AC_HELP_STRING(
 
51
                [--with-rootfs-path=dir],
 
52
                [lxc rootfs mount point]
 
53
        )], [], [with_rootfs_path="${libdir}/lxc/rootfs"])
 
54
 
 
55
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
 
56
 
 
57
AS_AC_EXPAND(LXCPATH, "${with_config_path}")
 
58
AS_AC_EXPAND(LXCROOTFSMOUNT, "${with_rootfs_path}")
 
59
AS_AC_EXPAND(LXCINITDIR, $libdir)
 
60
AS_AC_EXPAND(LXCTEMPLATEDIR, $libdir/templates)
 
61
AH_TEMPLATE([LXCPATH], [lxc configuration repository])
 
62
AH_TEMPLATE([LXCINITDIR], [lxc-init directory location])
 
63
AH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point])
 
64
AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
 
65
AC_DEFINE_UNQUOTED(LXCINITDIR, "$LXCINITDIR")
 
66
AC_DEFINE_UNQUOTED(LXCROOTFSMOUNT, "$LXCROOTFSMOUNT")
 
67
 
 
68
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
 
69
                                  [],
 
70
                                  AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
 
71
                                  [#include <sys/socket.h>
 
72
                 ])
 
73
 
 
74
AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
 
75
[#include <sys/types.h>
 
76
#include <sys/capability.h>])
 
77
AC_CHECK_LIB(cap,cap_set_proc,caplib=yes,caplib=no)
 
78
AC_MSG_CHECKING([linux capabilities])
 
79
if test "x$caplib" = "xyes" ; then
 
80
   CAP_LIBS="-lcap"
 
81
   AC_MSG_RESULT([$CAP_LIBS])
 
82
else
 
83
   AC_MSG_ERROR([not found])
 
84
fi
 
85
AC_SUBST([CAP_LIBS])
 
86
 
 
87
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
 
88
AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
 
89
 
 
90
AC_CHECK_HEADERS([sys/signalfd.h])
 
91
 
 
92
AC_PROG_GCC_TRADITIONAL
 
93
 
 
94
AC_LINUX
 
95
 
 
96
if test "x$GCC" = "xyes"; then
 
97
  CFLAGS="$CFLAGS -Wall"
 
98
fi
 
99
 
 
100
AC_CONFIG_FILES([
 
101
        Makefile
 
102
        lxc.pc
 
103
        lxc.spec
 
104
        config/Makefile
 
105
 
 
106
        doc/Makefile
 
107
        doc/lxc-create.sgml
 
108
        doc/lxc-destroy.sgml
 
109
        doc/lxc-execute.sgml
 
110
        doc/lxc-start.sgml
 
111
        doc/lxc-checkpoint.sgml
 
112
        doc/lxc-restart.sgml
 
113
        doc/lxc-stop.sgml
 
114
        doc/lxc-console.sgml
 
115
        doc/lxc-freeze.sgml
 
116
        doc/lxc-unfreeze.sgml
 
117
        doc/lxc-monitor.sgml
 
118
        doc/lxc-wait.sgml
 
119
        doc/lxc-ls.sgml
 
120
        doc/lxc-ps.sgml
 
121
        doc/lxc-cgroup.sgml
 
122
        doc/lxc-kill.sgml
 
123
        doc/lxc.conf.sgml
 
124
        doc/lxc.sgml
 
125
        doc/common_options.sgml
 
126
        doc/see_also.sgml
 
127
 
 
128
        doc/rootfs/Makefile
 
129
 
 
130
        doc/examples/Makefile
 
131
        doc/examples/lxc-macvlan.conf
 
132
        doc/examples/lxc-vlan.conf
 
133
        doc/examples/lxc-no-netns.conf
 
134
        doc/examples/lxc-empty-netns.conf
 
135
        doc/examples/lxc-phys.conf
 
136
        doc/examples/lxc-veth.conf
 
137
        doc/examples/lxc-complex.conf
 
138
 
 
139
        templates/Makefile
 
140
        templates/lxc-lenny
 
141
        templates/lxc-debian
 
142
        templates/lxc-ubuntu
 
143
        templates/lxc-ubuntu-cloud
 
144
        templates/lxc-opensuse
 
145
        templates/lxc-busybox
 
146
        templates/lxc-fedora
 
147
        templates/lxc-sshd
 
148
 
 
149
        src/Makefile
 
150
        src/lxc/Makefile
 
151
        src/lxc/lxc-ps
 
152
        src/lxc/lxc-ls
 
153
        src/lxc/lxc-netstat
 
154
        src/lxc/lxc-checkconfig
 
155
        src/lxc/lxc-setcap
 
156
        src/lxc/lxc-setuid
 
157
        src/lxc/lxc-version
 
158
        src/lxc/lxc-create
 
159
        src/lxc/lxc-clone
 
160
        src/lxc/lxc-destroy
 
161
 
 
162
])
 
163
AC_CONFIG_COMMANDS([default],[[]],[[]])
 
164
AC_OUTPUT
 
165
 
 
166
if test "x$SETCAP" = "xno"; then
 
167
   AC_MSG_NOTICE([
 
168
 
 
169
Warning:
 
170
--------
 
171
 
 
172
The setcap binary was not found. This means the tools to set the
 
173
privilege for the lxc commands are not available, that's ok, but you
 
174
will need to run these commands as root or install libcap-2.
 
175
 
 
176
])
 
177
 
 
178
else
 
179
 
 
180
   AC_MSG_NOTICE([
 
181
 
 
182
Advice:
 
183
-------
 
184
 
 
185
If you wish to have a non root user to use the lxc tools,
 
186
you can add the needed capabilities to the tools by invoking
 
187
the 'lxc-setcap' script. To remove the capabilities, use
 
188
'lxc-setcap -d'.
 
189
])
 
190
 
 
191
fi