提交 2de2d525 编写于 作者: E Eric Blake

build: simplify checks for sched.h

* configure.ac: Remove redundant checks.
上级 062a25f0
...@@ -108,7 +108,7 @@ LIBS=$old_libs ...@@ -108,7 +108,7 @@ LIBS=$old_libs
dnl Availability of various common headers (non-fatal if missing). dnl Availability of various common headers (non-fatal if missing).
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h \ AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h \
sched.h termios.h sys/poll.h syslog.h mntent.h net/ethernet.h]) termios.h sys/poll.h syslog.h mntent.h net/ethernet.h])
dnl Where are the XDR functions? dnl Where are the XDR functions?
dnl If portablexdr is installed, prefer that. dnl If portablexdr is installed, prefer that.
...@@ -495,11 +495,9 @@ if test "$with_libvirtd" = "no" ; then ...@@ -495,11 +495,9 @@ if test "$with_libvirtd" = "no" ; then
with_lxc=no with_lxc=no
fi fi
if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then
AC_CHECK_HEADER([sched.h],
dnl Header is there, check for unshare()
[
AC_TRY_LINK([#define _GNU_SOURCE AC_TRY_LINK([#define _GNU_SOURCE
#include <sched.h>], [ #include <sched.h>
], [
unshare (1); unshare (1);
], [ ], [
with_lxc=yes with_lxc=yes
...@@ -510,18 +508,6 @@ if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then ...@@ -510,18 +508,6 @@ if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then
else else
AC_MSG_ERROR([Function unshare() not present in <sched.h> header, but required for LXC driver]) AC_MSG_ERROR([Function unshare() not present in <sched.h> header, but required for LXC driver])
fi 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 fi
if test "$with_lxc" = "yes" ; then if test "$with_lxc" = "yes" ; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册