提交 e5c668a0 编写于 作者: S Spencer Shimko 提交者: Eric Blake

configure.ac SELinux fixes

* Fix a logic error in configure.ac that prevented --with-selinux=no
  from being used with --with-secdriver-selinux=no.

* Fix some strings to clarify the difference between --with-selinux
  and --with-secdriver-selinux.
Signed-off-by: NSpencer Shimko <sshimko@tresys.com>
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 9772beba
...@@ -869,14 +869,14 @@ if test "$with_selinux" != "no"; then ...@@ -869,14 +869,14 @@ if test "$with_selinux" != "no"; then
AC_CHECK_HEADER([selinux/selinux.h],[],[fail=1]) AC_CHECK_HEADER([selinux/selinux.h],[],[fail=1])
AC_CHECK_LIB([selinux], [fgetfilecon],[],[fail=1]) AC_CHECK_LIB([selinux], [fgetfilecon],[],[fail=1])
test $fail = 1 && test $fail = 1 &&
AC_MSG_ERROR([You must install the SELinux development package in order to compile libvirt]) AC_MSG_ERROR([You must install the libselinux development package in order to compile libvirt with basic SELinux support])
fi fi
CFLAGS="$old_cflags" CFLAGS="$old_cflags"
LIBS="$old_libs" LIBS="$old_libs"
fi fi
if test "$with_selinux" = "yes"; then if test "$with_selinux" = "yes"; then
SELINUX_LIBS="-lselinux" SELINUX_LIBS="-lselinux"
AC_DEFINE_UNQUOTED([HAVE_SELINUX], 1, [whether SELinux is available for security]) AC_DEFINE_UNQUOTED([HAVE_SELINUX], 1, [whether basic SELinux functionality is available])
fi fi
AM_CONDITIONAL([HAVE_SELINUX], [test "$with_selinux" != "no"]) AM_CONDITIONAL([HAVE_SELINUX], [test "$with_selinux" != "no"])
AC_SUBST([SELINUX_CFLAGS]) AC_SUBST([SELINUX_CFLAGS])
...@@ -891,8 +891,8 @@ AC_ARG_WITH([secdriver-selinux], ...@@ -891,8 +891,8 @@ AC_ARG_WITH([secdriver-selinux],
if test "$with_selinux" != "yes" ; then if test "$with_selinux" != "yes" ; then
if test "$with_secdriver_selinux" = "check" ; then if test "$with_secdriver_selinux" = "check" ; then
with_secdriver_selinux=no with_secdriver_selinux=no
else elif test "$with_secdriver_selinux" = "yes"; then
AC_MSG_ERROR([You must install the SELinux development package in order to compile libvirt]) AC_MSG_ERROR([You must install the libselinux development package and enable SELinux with the --with-selinux=yes in order to compile libvirt --with-secdriver-selinux=yes])
fi fi
else else
old_cflags="$CFLAGS" old_cflags="$CFLAGS"
...@@ -910,7 +910,7 @@ else ...@@ -910,7 +910,7 @@ else
if test "$with_secdriver_selinux" = "check" ; then if test "$with_secdriver_selinux" = "check" ; then
with_secdriver_selinux=no with_secdriver_selinux=no
else else
AC_MSG_ERROR([You must install the SELinux development package in order to compile libvirt]) AC_MSG_ERROR([You must install libselinux development package >= 2.0.82 in order to compile libvirt --with-secdriver-selinux=yes])
fi fi
else else
with_secdriver_selinux=yes with_secdriver_selinux=yes
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册