mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
LXC driver requires sched.h and unshare()
* configure.in: make it check by default for both
This commit is contained in:
parent
16928a161b
commit
a3a623dd57
36
configure.in
36
configure.in
@ -194,7 +194,7 @@ AC_ARG_WITH([phyp],
|
|||||||
AC_ARG_WITH([vbox],
|
AC_ARG_WITH([vbox],
|
||||||
[ --with-vbox add VirtualBox support (on)],[],[with_vbox=yes])
|
[ --with-vbox add VirtualBox support (on)],[],[with_vbox=yes])
|
||||||
AC_ARG_WITH([lxc],
|
AC_ARG_WITH([lxc],
|
||||||
[ --with-lxc add Linux Container support (on)],[],[with_lxc=yes])
|
[ --with-lxc add Linux Container support (on)],[],[with_lxc=check])
|
||||||
AC_ARG_WITH([one],
|
AC_ARG_WITH([one],
|
||||||
[ --with-one add ONE support (on)],[],[with_one=check])
|
[ --with-one add ONE support (on)],[],[with_one=check])
|
||||||
AC_ARG_WITH([esx],
|
AC_ARG_WITH([esx],
|
||||||
@ -429,6 +429,40 @@ dnl check for kvm headers
|
|||||||
dnl
|
dnl
|
||||||
AC_CHECK_HEADERS([linux/kvm.h])
|
AC_CHECK_HEADERS([linux/kvm.h])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl check for sufficient headers for LXC
|
||||||
|
dnl
|
||||||
|
if test "$with_lxc" = "yes" -o "$with_lxc" = "check"; then
|
||||||
|
AC_CHECK_HEADER([sched.h],
|
||||||
|
dnl Header is there, check for unshare()
|
||||||
|
[
|
||||||
|
AC_TRY_LINK([#define _GNU_SOURCE
|
||||||
|
#include <sched.h>], [
|
||||||
|
unshare (1);
|
||||||
|
], [
|
||||||
|
with_lxc=yes
|
||||||
|
], [
|
||||||
|
if test "$with_lxc" = "check"; then
|
||||||
|
with_lxc=no
|
||||||
|
AC_MSG_NOTICE([Function unshare() not present in <sched.h> header but required for LXC driver, disabling it])
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Function unshare() not present in <sched.h> header, but required for LXC driver])
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Header is not there
|
||||||
|
],[
|
||||||
|
if test "$with_lxc" = "check"; then
|
||||||
|
with_lxc=no
|
||||||
|
AC_MSG_NOTICE([Header <sched.h> not found but required for LXC driver, disabling it])
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Header <sched.h> not found but required for LXC driver])
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl OpenNebula driver Compilation setting
|
dnl OpenNebula driver Compilation setting
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user