[PATCH 3/9] virt-nss: Introduce more checks before enabling NSS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The plugin depends on more modules than we currently check for,
i.e. network driver and yajl library.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 configure.ac   |  2 +-
 m4/virt-nss.m4 | 36 +++++++++++++++++++++++++++---------
 2 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9a0507577..c67ba79c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -294,7 +294,6 @@ LIBVIRT_CHECK_LIBSSH
 LIBVIRT_CHECK_LIBXML
 LIBVIRT_CHECK_MACVTAP
 LIBVIRT_CHECK_NETCF
-LIBVIRT_CHECK_NSS
 LIBVIRT_CHECK_NUMACTL
 LIBVIRT_CHECK_NWFILTER
 LIBVIRT_CHECK_OPENWSMAN
@@ -479,6 +478,7 @@ LIBVIRT_CHECK_LOGIN_SHELL
 LIBVIRT_CHECK_HOST_VALIDATE
 LIBVIRT_CHECK_TLS_PRIORITY
 LIBVIRT_CHECK_SYSCTL_CONFIG
+LIBVIRT_CHECK_NSS
 
 
 
diff --git a/m4/virt-nss.m4 b/m4/virt-nss.m4
index f50b1b91c..8840e7b24 100644
--- a/m4/virt-nss.m4
+++ b/m4/virt-nss.m4
@@ -27,16 +27,34 @@ AC_DEFUN([LIBVIRT_CHECK_NSS],[
   bsd_nss=no
   fail=0
   if test "x$with_nss_plugin" != "xno" ; then
-    AC_CHECK_HEADERS([nss.h], [
-        with_nss_plugin=yes
-      ],[
-        if test "x$with_nss_plugin" = "xyes" ; then
-          fail = 1
-        fi
-      ])
+    if test "x$with_yajl" != "xyes" ; then
+      if test "x$with_nss_plugin" = "xyes" ; then
+        AC_MSG_ERROR([Can't build nss plugin without yajl])
+      else
+        with_nss_plugin=no
+      fi
+    fi
 
-    if test $fail = 1 ; then
-      AC_MSG_ERROR([Can't build nss plugin without nss.h])
+    if test "x$with_network" != "xyes" ; then
+      if test "x$with_nss_plugin" = "xyes" ; then
+        AC_MSG_ERROR([Can't build nss plugin without yajl])
+      else
+        with_nss_plugin=no
+      fi
+    fi
+
+    if test "x$with_nss_plugin" != "xno" ; then
+      AC_CHECK_HEADERS([nss.h], [
+          with_nss_plugin=yes
+        ],[
+          if test "x$with_nss_plugin" = "xyes" ; then
+            fail = 1
+          fi
+        ])
+
+      if test $fail = 1 ; then
+        AC_MSG_ERROR([Can't build nss plugin without nss.h])
+      fi
     fi
 
     if test "x$with_nss_plugin" = "xyes" ; then
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux