]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
configure.ac SELinux fixes
authorSpencer Shimko <sshimko@tresys.com>
Wed, 21 Apr 2010 17:44:29 +0000 (13:44 -0400)
committerEric Blake <eblake@redhat.com>
Thu, 22 Apr 2010 16:50:49 +0000 (10:50 -0600)
* 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: Spencer Shimko <sshimko@tresys.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
configure.ac

index 42c09b42a0256034a94b845c6a39ca836492803f..99bc90639644bcc1ca6b88801d6797a191544f48 100644 (file)
@@ -869,14 +869,14 @@ if test "$with_selinux" != "no"; then
     AC_CHECK_HEADER([selinux/selinux.h],[],[fail=1])
     AC_CHECK_LIB([selinux], [fgetfilecon],[],[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
   CFLAGS="$old_cflags"
   LIBS="$old_libs"
 fi
 if test "$with_selinux" = "yes"; then
   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
 AM_CONDITIONAL([HAVE_SELINUX], [test "$with_selinux" != "no"])
 AC_SUBST([SELINUX_CFLAGS])
@@ -891,8 +891,8 @@ AC_ARG_WITH([secdriver-selinux],
 if test "$with_selinux" != "yes" ; then
   if test "$with_secdriver_selinux" = "check" ; then
     with_secdriver_selinux=no
-  else
-    AC_MSG_ERROR([You must install the SELinux development package in order to compile libvirt])
+  elif test "$with_secdriver_selinux" = "yes"; then
+        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
 else
   old_cflags="$CFLAGS"
@@ -910,7 +910,7 @@ else
     if test "$with_secdriver_selinux" = "check" ; then
       with_secdriver_selinux=no
     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
   else
     with_secdriver_selinux=yes